home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaMiscModsCD3.iso / _PROGRAMME / PLAYER / GUI / EasyPlayer.lha / EYP / Source / modsrc / vanilla.e < prev    next >
Encoding:
Text File  |  1999-03-10  |  861 b   |  45 lines

  1. OPT MODULE
  2.  
  3. MODULE 'tools/EasyGUI',
  4.        'intuition/intuition'
  5.  
  6. EXPORT OBJECT vanilla OF plugin
  7.     code:PTR TO LONG,
  8.     hit,
  9.     qual
  10. ENDOBJECT
  11.  
  12. PROC vanilla(code) OF vanilla
  13.     self.code:=List(ListLen(code))
  14.     ListCopy(self.code,code)
  15.     self.hit:=-1
  16. ENDPROC
  17.  
  18. PROC end() OF vanilla
  19.     DisposeLink(self.code)
  20. ENDPROC
  21.  
  22. PROC will_resize() OF vanilla IS FALSE
  23.  
  24. PROC min_size(ta,fh) OF vanilla IS 0,0
  25.  
  26. PROC render(ta,x,y,xs,ys,w:PTR TO window) OF vanilla IS EMPTY
  27.  
  28. PROC message_test(imsg:PTR TO intuimessage,win:PTR TO window) OF vanilla
  29. DEF i=0,bool,return=FALSE
  30.     IF (imsg.class=IDCMP_VANILLAKEY)
  31. ->PrintF('\d\n',imsg.code)
  32.         REPEAT
  33.             IF (bool:=(imsg.code=self.code[i]))
  34.                 self.hit:=self.code[i]
  35.                 return:=TRUE
  36.             ENDIF
  37.             i++
  38.         UNTIL (i=ListLen(self.code)) OR bool
  39.     ENDIF
  40. ENDPROC return
  41.  
  42. PROC message_action(class,qual,code,win) OF vanilla
  43.     self.qual:=qual
  44. ENDPROC TRUE
  45.