home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / developer-tools / c-tools / mui2c / test.m < prev   
Encoding:
Text File  |  1996-06-22  |  1.4 KB  |  119 lines

  1.  
  2. You can put stuff here.
  3.  
  4. Class ( MyClass :: MUIC_Area ) : 0x12340000
  5.  
  6.  
  7. Note that whitespace is ignored between tokens.
  8.  
  9. /* Some comment on the class, if you like. */
  10.  
  11. #include <any files you need>
  12.  
  13. This can be anything at all, it will simply be passed through. Well, unless it
  14. contains a "Data" in the appropriate context. :-)
  15.  
  16. Data ( struct instancedata )
  17.  
  18. struct {
  19.         long a;
  20.         long b;
  21. } instancedata;
  22.  
  23. Method ( OM_NEW )
  24. {
  25.         some stuff  {
  26.             some more stuff
  27.         }
  28. }
  29.  
  30.     Method(MUIM_MyClass_Test)
  31.     {
  32.         testing...
  33.     }
  34.  
  35. Method (MUIM_AskMinMax)
  36. {
  37.     minmax stuff
  38. }
  39.  
  40. Method (MUIM_Setup)
  41. {
  42.     setup
  43. }
  44.  
  45. Method (MUIM_Cleanup)
  46. {
  47.     cleanup
  48. }
  49.  
  50. Method (OM_DISPOSE)
  51. {
  52.     dispose
  53. }
  54.  
  55. Method (MUIM_Draw)
  56. {
  57.     draw stuff
  58. }
  59.  
  60. Method*(MUIM_MyClass):public
  61. {
  62.     struct instancedata *data = GetData();
  63.  
  64.     do things manually for this method
  65.  
  66.     return (Super());
  67. }
  68.  
  69. /*
  70. Method(MUIM_MyClass_Commented)
  71. {
  72.     This will be ignored.
  73.     /* Comments can also nest. */
  74. }
  75. */
  76.  
  77. // Method(MUIM_MyClass_C++Commented)
  78. // {
  79. //      This will be ignored, too.
  80. // }
  81.  
  82. Method  ( OM_GET  )
  83. {
  84.     Attributes
  85.     {
  86.         MUIA_MyClass_TestAttribute:public
  87.         {
  88.             *store = data->a;
  89.         }
  90.  
  91.         MUIA_MyClass_TestSmallAtt*:public
  92.         {
  93.             *store = data->b;
  94.  
  95.             return (TRUE);
  96.         }
  97.  
  98.         MUIA_MyClass_TestPrivAtt
  99.         {
  100.             *store = data->b;
  101.         }
  102.     }
  103. }
  104.  
  105. Method(OM_SET)
  106. {
  107.     Attributes
  108.     {
  109.         MUIA_MyClass_TestPrivAtt
  110.         {
  111.             b = tag->ti_Data;
  112.         }
  113.         MUIA_MyClass_TestAttribute:public
  114.         {
  115.             a = tag->ti_Data;
  116.         }
  117.     }
  118. }
  119.