home *** CD-ROM | disk | FTP | other *** search
/ The Best of Mecomp Multimedia 2 / MECOMP-CD-II.iso / amiga / programmieren / e / easyplugins / source / space.e < prev    next >
Encoding:
Text File  |  1998-03-10  |  1.3 KB  |  63 lines

  1.  
  2. /*
  3.  
  4.     $VER: space_plugin 1.1 (25.3.98)
  5.  
  6.     Author:         Ali Graham
  7.                     <agraham@hal9000.net.au>
  8.  
  9.     Desc.:          Replacement for SPACE with a bit more control over
  10.                     the size.
  11.  
  12. */
  13.  
  14.  
  15. OPT MODULE, OSVERSION=37
  16.  
  17. MODULE 'tools/EasyGUI',
  18.        'intuition/intuition',
  19.        'utility', 'utility/tagitem'
  20.  
  21. EXPORT OBJECT space_plugin OF plugin PRIVATE
  22.  
  23.     w, h
  24.  
  25.     rx, ry
  26.  
  27. ENDOBJECT
  28.  
  29. -> PROGRAMMER_ID | MODULE_ID
  30. ->      $01      |   $05
  31.  
  32.  
  33. EXPORT ENUM PLA_Space_Width=$81005001,   ->[I..]
  34.             PLA_Space_Height,            ->[I..]
  35.             PLA_Space_ResizeX,           ->[I..]
  36.             PLA_Space_ResizeY            ->[I..]
  37.  
  38.  
  39. PROC space(tags=NIL:PTR TO tagitem) OF space_plugin
  40.  
  41.     IF utilitybase
  42.  
  43.         self.w  := GetTagData(PLA_Space_Width, 0, tags)
  44.         self.h  := GetTagData(PLA_Space_Height, 0, tags)
  45.         self.rx := GetTagData(PLA_Space_ResizeX, FALSE, tags)
  46.         self.ry := GetTagData(PLA_Space_ResizeY, FALSE, tags)
  47.  
  48.     ELSE
  49.  
  50.         Raise("util")
  51.  
  52.     ENDIF
  53.  
  54. ENDPROC
  55.  
  56. PROC min_size(ta,fh) OF space_plugin IS self.w, self.h
  57.  
  58. PROC will_resize() OF space_plugin IS ((IF self.rx THEN RESIZEX ELSE NIL) OR (IF self.ry THEN RESIZEY ELSE NIL))
  59.  
  60. PROC render(ta,x,y,xs,ys,w:PTR TO window) OF space_plugin IS EMPTY
  61.  
  62.  
  63.