home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / e / EasyGUI_v33b2.lha / Src / EasyGUI / tapedeck_test.e < prev    next >
Text File  |  1997-02-10  |  714b  |  33 lines

  1. MODULE 'tools/easygui', 'tools/exceptions',
  2.        'plugins/tapedeck'
  3.  
  4. PROC main() HANDLE
  5.   DEF t=NIL:PTR TO tapedeck
  6.   NEW t.tapedeck()
  7.   easyguiA('BOOPSI in EasyGUI!',
  8.     [ROWS,
  9.       [TEXT,'Tapedeck test...',NIL,TRUE,1],
  10.       [PLUGIN,{tapedeckaction},t],
  11.       [EQCOLS,
  12.         [BUTTON,{reset},'Reset',t],
  13.         [BUTTON,{toggle_enabled},'Toggle Enabled',t]
  14.       ]
  15.     ])
  16. EXCEPT DO
  17.   END t
  18.   report_exception()
  19. ENDPROC
  20.  
  21. PROC tapedeckaction(i,t:PTR TO tapedeck)
  22.   PrintF('Action: mode=\d\s\n', t.mode, IF t.paused THEN ' (paused)' ELSE '')
  23. ENDPROC
  24.  
  25. PROC reset(t:PTR TO tapedeck,i)
  26.   t.setmode()
  27.   t.setpaused(FALSE)
  28. ENDPROC
  29.  
  30. PROC toggle_enabled(t:PTR TO tapedeck,i)
  31.   t.setdisabled(t.disabled=FALSE)
  32. ENDPROC
  33.