home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 113 / EnigmaAmiga113CD.iso / software / sviluppo / easygui_os12 / source / easyplugins / space_os12.e < prev    next >
Encoding:
Text File  |  2000-06-11  |  1.5 KB  |  79 lines

  1.  
  2. /*
  3.  
  4.     $VER: space_plugin 1.2 (25.5.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
  16. OPT PREPROCESS
  17.  
  18. -> RST: Added conditional EASY_OS12 support
  19. #define EASY_OS12
  20.  
  21. #ifdef EASY_OS12
  22.   MODULE 'tools/easygui_os12','hybrid/tagdata'
  23.   #define GetTagData getTagData
  24. #endif
  25. #ifndef EASY_OS12
  26.   OPT OSVERSION=37
  27.   MODULE 'tools/easygui', 'utility'
  28. #endif
  29.  
  30. MODULE 'intuition/intuition',
  31.        'utility/tagitem'
  32.  
  33. EXPORT OBJECT space_plugin OF plugin PRIVATE
  34.  
  35.     w, h
  36.  
  37.     rx, ry
  38.  
  39. ENDOBJECT
  40.  
  41. -> PROGRAMMER_ID | MODULE_ID
  42. ->      $01      |   $05
  43.  
  44.  
  45. EXPORT ENUM PLA_Space_Width=$81050001,   ->[I..]
  46.             PLA_Space_Height,            ->[I..]
  47.             PLA_Space_ResizeX,           ->[I..]
  48.             PLA_Space_ResizeY            ->[I..]
  49.  
  50.  
  51. PROC space(tags=NIL:PTR TO tagitem) OF space_plugin
  52.  
  53. #ifndef EASY_OS12
  54.     IF utilitybase
  55. #endif
  56.  
  57.         self.w  := GetTagData(PLA_Space_Width, 0, tags)
  58.         self.h  := GetTagData(PLA_Space_Height, 0, tags)
  59.         self.rx := GetTagData(PLA_Space_ResizeX, FALSE, tags)
  60.         self.ry := GetTagData(PLA_Space_ResizeY, FALSE, tags)
  61.  
  62. #ifndef EASY_OS12
  63.     ELSE
  64.  
  65.         Raise("util")
  66.  
  67.     ENDIF
  68. #endif
  69.  
  70. ENDPROC
  71.  
  72. PROC min_size(ta,fh) OF space_plugin IS self.w, self.h
  73.  
  74. PROC will_resize() OF space_plugin IS ((IF self.rx THEN RESIZEX ELSE NIL) OR (IF self.ry THEN RESIZEY ELSE NIL))
  75.  
  76. PROC render(ta,x,y,xs,ys,w:PTR TO window) OF space_plugin IS EMPTY
  77.  
  78.  
  79.