home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 113 / EnigmaAmiga113CD.iso / software / sviluppo / easygui_os12 / examples / easyplugins / icongad_os12_demo.e < prev    next >
Encoding:
Text File  |  2000-06-06  |  1.0 KB  |  53 lines

  1. /*
  2.  
  3.   $VER: IconGad Demo V1.10 - By Fabio Rotondo (fsoft@intercom.it)
  4.  
  5.   This source is Public Domain
  6.  
  7.   Part of EasyPLUGINs distribution.
  8.  
  9. */
  10.  
  11. OPT PREPROCESS
  12.  
  13. -> RST: Added conditional EASY_OS12 support
  14. #define EASY_OS12
  15.  
  16. #ifdef EASY_OS12
  17.   MODULE 'tools/easygui_os12', 'easyplugins/icongad_os12'
  18. #endif
  19. #ifndef EASY_OS12
  20.   OPT OSVERSION=37
  21.   MODULE 'tools/easygui', 'easyplugins/icongad'
  22. #endif
  23.  
  24. MODULE 'tools/exceptions'
  25.  
  26. PROC main() HANDLE
  27.   DEF ig=NIL:PTR TO icongad_plugin
  28.  
  29.   NEW ig.init('sys:disk')
  30.  
  31.   easyguiA('Test',
  32.             [ROWS,
  33.               [SBUTTON, {dis}, 'Disable', ig],
  34.               [SBUTTON, {ena}, 'Enable', ig],
  35.               [SPACEV],
  36.               [COLS,
  37.                 [SPACEH],
  38.                 [ICONGAD, {ignore}, ig],     -> Note: ICONGAD keyword.
  39.                 [SPACEH]
  40.               ]
  41.             ]
  42.           )
  43. EXCEPT DO
  44.   report_exception()
  45.   END ig
  46. ENDPROC
  47.  
  48. PROC ignore() IS EMPTY
  49.  
  50. PROC dis(ig:PTR TO icongad_plugin, i) IS ig.disabled()
  51.  
  52. PROC ena(ig:PTR TO icongad_plugin, i) IS ig.disabled(FALSE)
  53.