home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / developer-tools / e-tools / plugins / frumsplugs / examples / busyboxexample.e < prev    next >
Encoding:
Text File  |  1992-09-02  |  757 b   |  33 lines

  1. /* Example for BusyBoxPlugin */
  2. -> $VER: BusyBoxExample.e V1.0 Stephen Sinclair (96.06.16)
  3.  
  4. MODULE 'Tools/EasyGUI','Plugins/BusyBox'
  5.  
  6. DEF bb:PTR TO busyboxplugin
  7.  
  8. PROC main() HANDLE
  9.   easygui('BusyBoxPlugin Example',
  10.     [EQROWS,
  11.       [TEXT,'BusyBox:',NIL,TRUE,STRLEN],
  12.  
  13. /* create a busybox which expands both ways and has a priority of -15. */
  14.       [PLUGIN,0,NEW bb.busyboxplugin([1,2,3]:INT)],
  15.       [EQCOLS,
  16.         [BUTTON,{turnon},'On'],
  17.         [BUTTON,{turnoff},'Off']
  18.       ],
  19.       [BUTTON,0,'Quit']
  20.     ]
  21.   )
  22. EXCEPT DO
  23.  
  24. /* Always END the object! */
  25.   END bb
  26.   IF exception<>0 THEN WriteF('\s\n',[exception,0])
  27. ENDPROC
  28.  
  29. CHAR '$VER: BusyBoxExample V1.0 Stephen Sinclair (96.06.16)',0
  30.  
  31. PROC turnon(x) IS bb.on(TRUE)
  32. PROC turnoff(x) IS bb.on(FALSE)
  33.