home *** CD-ROM | disk | FTP | other *** search
/ CD Exchange / CD Exchange - Volume 1.iso / utils / misc / mui_dev / mui20dev.lha / MUI / Developer / Assembler / Include / libraries / mui.i < prev   
Encoding:
Text File  |  1994-02-11  |  67.3 KB  |  1,983 lines

  1. ****************************************************************************
  2. **
  3. ** MUI - MagicUserInterface
  4. ** (c) 1993 by Stefan Stuntz
  5. **
  6. ** Main Header File
  7. **
  8. *** Assembler modifications 26-Aug-93 by Henri Veisterä.
  9. **
  10. ****************************************************************************
  11. ** General Header File Information
  12. ****************************************************************************
  13. **
  14. ** All macro and structure definitions follow these rules:
  15. **
  16. ** Name                       Meaning
  17. **
  18. ** MUIC_<class>               Name of a class
  19. ** MUIM_<class>_<method>      Method
  20. ** MUIP_<class>_<method>      Methods parameter structure
  21. ** MUIV_<class>_<method>_<x>  Special method value
  22. ** MUIA_<class>_<attrib>      Attribute
  23. ** MUIV_<class>_<attrib>_<x>  Special attribute value
  24. ** MUIE_<error>               Error return code from MUI_Error()
  25. ** MUII_<name>                Standard MUI image
  26. **
  27. ** MUIA_... attribute definitions are followed by a comment
  28. ** consisting of the three possible letters I, S and G.
  29. ** I: it's possible to specify this attribute at object creation time.
  30. ** S: it's possible to change this attribute with SetAttrs().
  31. ** G: it's possible to get this attribute with GetAttr().
  32. **
  33.  
  34.  
  35.    IFND LIBRARIES_MUI_I
  36. LIBRARIES_MUI_I SET 1
  37.  
  38.    IFND EXEC_TYPES_I
  39.    INCLUDE "exec/types.i"
  40.    ENDC  ;EXEC_TYPES_I
  41.  
  42.    IFND INTUITION_CLASSES_I
  43.    INCLUDE "intuition/classes.i"
  44.    ENDC  ;INTUITION_CLASSES_I
  45.  
  46.    IFND INTUITION_SCREENS_I
  47.    INCLUDE "intuition/screens.i"
  48.    ENDC  ;INTUITION_SCREENS_I
  49.  
  50.    IFND UTILITY_HOOKS_I
  51.    INCLUDE "utility/hooks.i"
  52.    ENDC  ;UTILITY_HOOKS_I
  53.  
  54.  
  55.  
  56. ****************************************************************************
  57. ** Library specification
  58. ****************************************************************************
  59.  
  60. MUIMASTER_NAME MACRO
  61.          dc.b     "muimaster.library",0
  62.          even
  63.          ENDM
  64. MUIMASTER_VMIN EQU 4
  65. CALLMUI  MACRO   ; Func
  66.          move.l   _MUIMasterBase(pc),a6
  67.          jsr      _LVO\1(a6)
  68.          ENDM
  69. NULL     equ      0
  70. TRUE     equ      1
  71. FALSE    equ      NULL
  72.  
  73.  
  74. ****************************************************************************
  75. ** ARexx Interface
  76. ****************************************************************************
  77.  
  78.  STRUCTURE MUI_Command,0
  79.    APTR     mc_Name
  80.    APTR     mc_Template
  81.    LONG     mc_Parameters
  82.    STRUCT   mc_Hook,h_SIZEOF
  83.    STRUCT   mc_Reserved,4*5
  84.    LABEL    MUI_Command_SIZEOF
  85.  
  86. MC_TEMPLATE_ID EQU ~0
  87.  
  88.  
  89. ****************************************************************************
  90. ** Return values for MUI_Error()
  91. ****************************************************************************
  92.  
  93. MUIE_OK                    EQU 0
  94. MUIE_OutOfMemory           EQU 1
  95. MUIE_OutOfGfxMemory        EQU 2
  96. MUIE_InvalidWindowObject   EQU 3
  97. MUIE_MissingLibrary        EQU 4
  98. MUIE_NoARexx               EQU 5
  99. MUIE_SingleTask            EQU 6
  100.  
  101.  
  102.  
  103. ****************************************************************************
  104. ** Standard MUI Images
  105. ****************************************************************************
  106.  
  107. MUII_WindowBack      EQU 0
  108. MUII_RequesterBack   EQU 1
  109. MUII_ButtonBack      EQU 2
  110. MUII_ListBack        EQU 3
  111. MUII_TextBack        EQU 4
  112. MUII_PropBack        EQU 5
  113. MUII_ActiveBack      EQU 6
  114. MUII_SelectedBack    EQU 7
  115. MUII_ListCursor      EQU 8
  116. MUII_ListSelect      EQU 9
  117. MUII_ListSelCur      EQU 10
  118. MUII_ArrowUp         EQU 11
  119. MUII_ArrowDown       EQU 12
  120. MUII_ArrowLeft       EQU 13
  121. MUII_ArrowRight      EQU 14
  122. MUII_CheckMark       EQU 15
  123. MUII_RadioButton     EQU 16
  124. MUII_Cycle           EQU 17
  125. MUII_PopUp           EQU 18
  126. MUII_PopFile         EQU 19
  127. MUII_PopDrawer       EQU 20
  128. MUII_PropKnob        EQU 21
  129. MUII_Drawer          EQU 22
  130. MUII_HardDisk        EQU 23
  131. MUII_Disk            EQU 24
  132. MUII_Chip            EQU 25
  133. MUII_Volume          EQU 26
  134. MUII_Count           EQU 27
  135.  
  136. MUII_BACKGROUND      EQU (128+0)
  137. MUII_SHADOW          EQU (128+1)
  138. MUII_SHINE           EQU (128+2)
  139. MUII_FILL            EQU (128+3)
  140. MUII_SHADOWBACK      EQU (128+4)
  141. MUII_SHADOWFILL      EQU (128+5)
  142. MUII_SHADOWSHINE     EQU (128+6)
  143. MUII_FILLBACK        EQU (128+7)
  144. MUII_FILLSHINE       EQU (128+8)
  145. MUII_SHINEBACK       EQU (128+9)
  146. MUII_FILLBACK2       EQU (128+10)
  147.  
  148.  
  149. ****************************************************************************
  150. ** Special values for some methods 
  151. ****************************************************************************
  152.  
  153. MUIV_TriggerValue       EQU $49893131
  154. MUIV_EveryTime          EQU $49893131
  155.  
  156. MUIV_Application_Save_ENV     EQU 0
  157. MUIV_Application_Save_ENVARC  EQU ~0
  158. MUIV_Application_Load_ENV     EQU 0
  159. MUIV_Application_Load_ENVARC  EQU ~0
  160.  
  161. MUIV_Application_ReturnID_Quit   EQU -1
  162.  
  163. MUIV_List_Insert_Top       EQU 0
  164. MUIV_List_Insert_Active    EQU -1
  165. MUIV_List_Insert_Sorted    EQU -2
  166. MUIV_List_Insert_Bottom    EQU -3
  167.  
  168. MUIV_List_Remove_First     EQU 0
  169. MUIV_List_Remove_Active    EQU -1
  170. MUIV_List_Remove_Last      EQU -2
  171.  
  172. MUIV_List_Select_Off       EQU 0
  173. MUIV_List_Select_On        EQU 1
  174. MUIV_List_Select_Toggle    EQU 2
  175. MUIV_List_Select_Ask       EQU 3
  176.  
  177. MUIV_List_Jump_Active      EQU -1
  178. MUIV_List_GetEntry_Active  EQU -1
  179. MUIV_List_Select_Active    EQU -1
  180.  
  181. MUIV_List_Redraw_Active    EQU -1
  182. MUIV_List_Redraw_All       EQU -2
  183.  
  184. MUIV_List_Exchange_Active  EQU -1
  185.  
  186.  
  187.  
  188.  
  189. ;****************************************************************************
  190. ;** Notify.mui 7.13 (01.12.93)                                             **
  191. ;****************************************************************************
  192.  
  193. ;** Methods **
  194.  
  195. MUIM_CallHook                  EQU $8042b96b
  196. MUIM_KillNotify                EQU $8042d240
  197. MUIM_MultiSet                  EQU $8042d356
  198. MUIM_Notify                    EQU $8042c9cb
  199. MUIM_Set                       EQU $8042549a
  200. MUIM_SetAsString               EQU $80422590
  201. MUIM_WriteLong                 EQU $80428d86
  202. MUIM_WriteString               EQU $80424bf4
  203.  
  204. ;** Attributes **
  205.  
  206. MUIA_AppMessage                 EQU $80421955 ;** ..g struct AppMessage * **
  207. MUIA_HelpFile                   EQU $80423a6e ;** isg STRPTR            **
  208. MUIA_HelpLine                   EQU $8042a825 ;** isg LONG              **
  209. MUIA_HelpNode                   EQU $80420b85 ;** isg STRPTR            **
  210. MUIA_NoNotify                   EQU $804237f9 ;** .s. BOOL              **
  211. MUIA_Revision                   EQU $80427eaa ;** ..g LONG              **
  212. MUIA_UserData                   EQU $80420313 ;** isg ULONG             **
  213. MUIA_Version                    EQU $80422301 ;** ..g LONG              **
  214.  
  215.  
  216.  
  217. ;****************************************************************************
  218. ;** Application.mui 7.12 (28.11.93)                                        **
  219. ;****************************************************************************
  220.  
  221. ;** Methods **
  222.  
  223. MUIM_Application_GetMenuCheck  EQU $8042c0a7
  224. MUIM_Application_GetMenuState  EQU $8042a58f
  225. MUIM_Application_Input         EQU $8042d0f5
  226. MUIM_Application_InputBuffered EQU $80427e59
  227. MUIM_Application_Load          EQU $8042f90d
  228. MUIM_Application_PushMethod    EQU $80429ef8
  229. MUIM_Application_ReturnID      EQU $804276ef
  230. MUIM_Application_Save          EQU $804227ef
  231. MUIM_Application_SetMenuCheck  EQU $8042a707
  232. MUIM_Application_SetMenuState  EQU $80428bef
  233. MUIM_Application_ShowHelp      EQU $80426479
  234.  
  235. ;** Attributes **
  236.  
  237. MUIA_Application_Active         EQU $804260ab ;** isg BOOL              **
  238. MUIA_Application_Author         EQU $80424842 ;** i.g STRPTR            **
  239. MUIA_Application_Base           EQU $8042e07a ;** i.g STRPTR            **
  240. MUIA_Application_Broker         EQU $8042dbce ;** ..g Broker *          **
  241. MUIA_Application_BrokerHook     EQU $80428f4b ;** isg struct Hook *     **
  242. MUIA_Application_BrokerPort     EQU $8042e0ad ;** ..g struct MsgPort *  **
  243. MUIA_Application_BrokerPri      EQU $8042c8d0 ;** i.g LONG              **
  244. MUIA_Application_Commands       EQU $80428648 ;** isg struct MUI_Command * **
  245. MUIA_Application_Copyright      EQU $8042ef4d ;** i.g STRPTR            **
  246. MUIA_Application_Description    EQU $80421fc6 ;** i.g STRPTR            **
  247. MUIA_Application_DiskObject     EQU $804235cb ;** isg struct DiskObject * **
  248. MUIA_Application_DoubleStart    EQU $80423bc6 ;** ..g BOOL              **
  249. MUIA_Application_DropObject     EQU $80421266 ;** is. Object *          **
  250. MUIA_Application_Iconified      EQU $8042a07f ;** .sg BOOL              **
  251. MUIA_Application_Menu           EQU $80420e1f ;** i.g struct NewMenu *  **
  252. MUIA_Application_MenuAction     EQU $80428961 ;** ..g ULONG             **
  253. MUIA_Application_MenuHelp       EQU $8042540b ;** ..g ULONG             **
  254. MUIA_Application_RexxHook       EQU $80427c42 ;** isg struct Hook *     **
  255. MUIA_Application_RexxMsg        EQU $8042fd88 ;** ..g struct RxMsg *    **
  256. MUIA_Application_RexxString     EQU $8042d711 ;** .s. STRPTR            **
  257. MUIA_Application_SingleTask     EQU $8042a2c8 ;** i.. BOOL              **
  258. MUIA_Application_Sleep          EQU $80425711 ;** .s. BOOL              **
  259. MUIA_Application_Title          EQU $804281b8 ;** i.g STRPTR            **
  260. MUIA_Application_Version        EQU $8042b33f ;** i.g STRPTR            **
  261. MUIA_Application_Window         EQU $8042bfe0 ;** i.. Object *          **
  262.  
  263.  
  264.  
  265. ;****************************************************************************
  266. ;** Window.mui 7.16 (03.12.93)                                             **
  267. ;****************************************************************************
  268.  
  269. ;** Methods **
  270.  
  271. MUIM_Window_GetMenuCheck       EQU $80420414
  272. MUIM_Window_GetMenuState       EQU $80420d2f
  273. MUIM_Window_ScreenToBack       EQU $8042913d
  274. MUIM_Window_ScreenToFront      EQU $804227a4
  275. MUIM_Window_SetCycleChain      EQU $80426510
  276. MUIM_Window_SetMenuCheck       EQU $80422243
  277. MUIM_Window_SetMenuState       EQU $80422b5e
  278. MUIM_Window_ToBack             EQU $8042152e
  279. MUIM_Window_ToFront            EQU $8042554f
  280.  
  281. ;** Attributes **
  282.  
  283. MUIA_Window_Activate            EQU $80428d2f ;** isg BOOL              **
  284. MUIA_Window_ActiveObject        EQU $80427925 ;** .sg Object *          **
  285. MUIA_Window_AltHeight           EQU $8042cce3 ;** i.g LONG              **
  286. MUIA_Window_AltLeftEdge         EQU $80422d65 ;** i.g LONG              **
  287. MUIA_Window_AltTopEdge          EQU $8042e99b ;** i.g LONG              **
  288. MUIA_Window_AltWidth            EQU $804260f4 ;** i.g LONG              **
  289. MUIA_Window_AppWindow           EQU $804280cf ;** i.. BOOL              **
  290. MUIA_Window_Backdrop            EQU $8042c0bb ;** i.. BOOL              **
  291. MUIA_Window_Borderless          EQU $80429b79 ;** i.. BOOL              **
  292. MUIA_Window_CloseGadget         EQU $8042a110 ;** i.. BOOL              **
  293. MUIA_Window_CloseRequest        EQU $8042e86e ;** ..g BOOL              **
  294. MUIA_Window_DefaultObject       EQU $804294d7 ;** isg Object *          **
  295. MUIA_Window_DepthGadget         EQU $80421923 ;** i.. BOOL              **
  296. MUIA_Window_DragBar             EQU $8042045d ;** i.. BOOL              **
  297. MUIA_Window_Height              EQU $80425846 ;** i.g LONG              **
  298. MUIA_Window_ID                  EQU $804201bd ;** isg ULONG             **
  299. MUIA_Window_InputEvent          EQU $804247d8 ;** ..g struct InputEvent * **
  300. MUIA_Window_LeftEdge            EQU $80426c65 ;** i.g LONG              **
  301. MUIA_Window_Menu                EQU $8042db94 ;** i.. struct NewMenu *  **
  302. MUIA_Window_NoMenus             EQU $80429df5 ;** .s. BOOL              **
  303. MUIA_Window_Open                EQU $80428aa0 ;** .sg BOOL              **
  304. MUIA_Window_PublicScreen        EQU $804278e4 ;** isg STRPTR            **
  305. MUIA_Window_RefWindow           EQU $804201f4 ;** is. Object *          **
  306. MUIA_Window_RootObject          EQU $8042cba5 ;** i.. Object *          **
  307. MUIA_Window_Screen              EQU $8042df4f ;** isg struct Screen *   **
  308. MUIA_Window_ScreenTitle         EQU $804234b0 ;** isg STRPTR            **
  309. MUIA_Window_SizeGadget          EQU $8042e33d ;** i.. BOOL              **
  310. MUIA_Window_SizeRight           EQU $80424780 ;** i.. BOOL              **
  311. MUIA_Window_Sleep               EQU $8042e7db ;** .sg BOOL              **
  312. MUIA_Window_Title               EQU $8042ad3d ;** isg STRPTR            **
  313. MUIA_Window_TopEdge             EQU $80427c66 ;** i.g LONG              **
  314. MUIA_Window_Width               EQU $8042dcae ;** i.g LONG              **
  315. MUIA_Window_Window              EQU $80426a42 ;** ..g struct Window *   **
  316.  
  317. MUIV_Window_ActiveObjectNone    EQU 0
  318. MUIV_Window_ActiveObjectNext    EQU -1
  319. MUIV_Window_ActiveObjectPrev    EQU -2
  320. MUIV_Window_AltHeightMinMax     EQU 0
  321. MUIV_Window_AltHeightVisible    EQU -100
  322. MUIV_Window_AltHeightScreen     EQU -200
  323. MUIV_Window_AltHeightScaled     EQU -1000
  324. MUIV_Window_AltLeftEdgeCentered EQU -1
  325. MUIV_Window_AltLeftEdgeMoused   EQU -2
  326. MUIV_Window_AltLeftEdgeNoChange EQU -1000
  327. MUIV_Window_AltTopEdgeCentered  EQU -1
  328. MUIV_Window_AltTopEdgeMoused    EQU -2
  329. MUIV_Window_AltTopEdgeDelta     EQU -3
  330. MUIV_Window_AltTopEdgeNoChange  EQU -1000
  331. MUIV_Window_AltWidthMinMax      EQU 0
  332. MUIV_Window_AltWidthVisible     EQU -100
  333. MUIV_Window_AltWidthScreen      EQU -200
  334. MUIV_Window_AltWidthScaled      EQU -1000
  335. MUIV_Window_HeightMinMax        EQU 0
  336. MUIV_Window_HeightVisible       EQU -100
  337. MUIV_Window_HeightScreen        EQU -200
  338. MUIV_Window_HeightScaled        EQU -1000
  339. MUIV_Window_HeightDefault       EQU -1001
  340. MUIV_Window_LeftEdgeCentered    EQU -1
  341. MUIV_Window_LeftEdgeMoused      EQU -2
  342. MUIV_Window_MenuNoMenu          EQU -1
  343. MUIV_Window_TopEdgeCentered     EQU -1
  344. MUIV_Window_TopEdgeMoused       EQU -2
  345. MUIV_Window_TopEdgeDelta        EQU -3
  346. MUIV_Window_WidthMinMax         EQU 0
  347. MUIV_Window_WidthVisible        EQU -100
  348. MUIV_Window_WidthScreen         EQU -200
  349. MUIV_Window_WidthScaled         EQU -1000
  350. MUIV_Window_WidthDefault        EQU -1001
  351.  
  352.  
  353. ;****************************************************************************
  354. ;** Area.mui 7.15 (28.11.93)                                               **
  355. ;****************************************************************************
  356.  
  357. ;** Methods **
  358.  
  359. MUIM_AskMinMax                 EQU $80423874
  360. MUIM_Cleanup                   EQU $8042d985
  361. MUIM_Draw                      EQU $80426f3f
  362. MUIM_HandleInput               EQU $80422a1a
  363. MUIM_Hide                      EQU $8042f20f
  364. MUIM_Setup                     EQU $80428354
  365. MUIM_Show                      EQU $8042cc84
  366.  
  367. ;** Attributes **
  368.  
  369. MUIA_ApplicationObject          EQU $8042d3ee ;** ..g Object *          **
  370. MUIA_Background                 EQU $8042545b ;** is. LONG              **
  371. MUIA_BottomEdge                 EQU $8042e552 ;** ..g LONG              **
  372. MUIA_ControlChar                EQU $8042120b ;** i.. char              **
  373. MUIA_Disabled                   EQU $80423661 ;** isg BOOL              **
  374. MUIA_ExportID                   EQU $8042d76e ;** isg LONG              **
  375. MUIA_FixHeight                  EQU $8042a92b ;** i.. LONG              **
  376. MUIA_FixHeightTxt               EQU $804276f2 ;** i.. LONG              **
  377. MUIA_FixWidth                   EQU $8042a3f1 ;** i.. LONG              **
  378. MUIA_FixWidthTxt                EQU $8042d044 ;** i.. STRPTR            **
  379. MUIA_Font                       EQU $8042be50 ;** i.g struct TextFont * **
  380. MUIA_Frame                      EQU $8042ac64 ;** i.. LONG              **
  381. MUIA_FramePhantomHoriz          EQU $8042ed76 ;** i.. BOOL              **
  382. MUIA_FrameTitle                 EQU $8042d1c7 ;** i.. STRPTR            **
  383. MUIA_Height                     EQU $80423237 ;** ..g LONG              **
  384. MUIA_HorizWeight                EQU $80426db9 ;** i.. LONG              **
  385. MUIA_InnerBottom                EQU $8042f2c0 ;** i.. LONG              **
  386. MUIA_InnerLeft                  EQU $804228f8 ;** i.. LONG              **
  387. MUIA_InnerRight                 EQU $804297ff ;** i.. LONG              **
  388. MUIA_InnerTop                   EQU $80421eb6 ;** i.. LONG              **
  389. MUIA_InputMode                  EQU $8042fb04 ;** i.. LONG              **
  390. MUIA_LeftEdge                   EQU $8042bec6 ;** ..g LONG              **
  391. MUIA_Pressed                    EQU $80423535 ;** ..g BOOL              **
  392. MUIA_RightEdge                  EQU $8042ba82 ;** ..g LONG              **
  393. MUIA_Selected                   EQU $8042654b ;** isg BOOL              **
  394. MUIA_ShowMe                     EQU $80429ba8 ;** isg BOOL              **
  395. MUIA_ShowSelState               EQU $8042caac ;** i.. BOOL              **
  396. MUIA_Timer                      EQU $80426435 ;** ..g LONG              **
  397. MUIA_TopEdge                    EQU $8042509b ;** ..g LONG              **
  398. MUIA_VertWeight                 EQU $804298d0 ;** i.. LONG              **
  399. MUIA_Weight                     EQU $80421d1f ;** i.. LONG              **
  400. MUIA_Width                      EQU $8042b59c ;** ..g LONG              **
  401. MUIA_Window                     EQU $80421591 ;** ..g struct Window *   **
  402. MUIA_WindowObject               EQU $8042669e ;** ..g Object *          **
  403.  
  404. MUIV_FontInherit                EQU 0
  405. MUIV_FontNormal                 EQU -1
  406. MUIV_FontList                   EQU -2
  407. MUIV_FontTiny                   EQU -3
  408. MUIV_FontFixed                  EQU -4
  409. MUIV_FontTitle                  EQU -5
  410. MUIV_FrameNone                  EQU 0
  411. MUIV_FrameButton                EQU 1
  412. MUIV_FrameImageButton           EQU 2
  413. MUIV_FrameText                  EQU 3
  414. MUIV_FrameString                EQU 4
  415. MUIV_FrameReadList              EQU 5
  416. MUIV_FrameInputList             EQU 6
  417. MUIV_FrameProp                  EQU 7
  418. MUIV_FrameGauge                 EQU 8
  419. MUIV_FrameGroup                 EQU 9
  420. MUIV_FramePopUp                 EQU 10
  421. MUIV_FrameVirtual               EQU 11
  422. MUIV_FrameSlider                EQU 12
  423. MUIV_FrameCount                 EQU 13
  424. MUIV_InputModeNone              EQU 0
  425. MUIV_InputModeRelVerify         EQU 1
  426. MUIV_InputModeImmediate         EQU 2
  427. MUIV_InputModeToggle            EQU 3
  428.  
  429.  
  430. ;****************************************************************************
  431. ;** Rectangle.mui 7.14 (28.11.93)                                          **
  432. ;****************************************************************************
  433.  
  434. ;** Attributes **
  435.  
  436. MUIA_Rectangle_HBar             EQU $8042c943 ;** i.g BOOL              **
  437. MUIA_Rectangle_VBar             EQU $80422204 ;** i.g BOOL              **
  438.  
  439.  
  440.  
  441. ;****************************************************************************
  442. ;** Image.mui 7.13 (28.11.93)                                              **
  443. ;****************************************************************************
  444.  
  445. ;** Attributes **
  446.  
  447. MUIA_Image_FontMatch            EQU $8042815d ;** i.. BOOL              **
  448. MUIA_Image_FontMatchHeight      EQU $80429f26 ;** i.. BOOL              **
  449. MUIA_Image_FontMatchWidth       EQU $804239bf ;** i.. BOOL              **
  450. MUIA_Image_FreeHoriz            EQU $8042da84 ;** i.. BOOL              **
  451. MUIA_Image_FreeVert             EQU $8042ea28 ;** i.. BOOL              **
  452. MUIA_Image_OldImage             EQU $80424f3d ;** i.. struct Image *    **
  453. MUIA_Image_Spec                 EQU $804233d5 ;** i.. char *            **
  454. MUIA_Image_State                EQU $8042a3ad ;** is. LONG              **
  455.  
  456.  
  457.  
  458. ;****************************************************************************
  459. ;** Text.mui 7.15 (28.11.93)                                               **
  460. ;****************************************************************************
  461.  
  462. ;** Attributes **
  463.  
  464. MUIA_Text_Contents              EQU $8042f8dc ;** isg STRPTR            **
  465. MUIA_Text_HiChar                EQU $804218ff ;** i.. char              **
  466. MUIA_Text_PreParse              EQU $8042566d ;** isg STRPTR            **
  467. MUIA_Text_SetMax                EQU $80424d0a ;** i.. BOOL              **
  468. MUIA_Text_SetMin                EQU $80424e10 ;** i.. BOOL              **
  469.  
  470.  
  471.  
  472. ;****************************************************************************
  473. ;** String.mui 7.13 (28.11.93)                                             **
  474. ;****************************************************************************
  475.  
  476. ;** Attributes **
  477.  
  478. MUIA_String_Accept              EQU $8042e3e1 ;** isg STRPTR            **
  479. MUIA_String_Acknowledge         EQU $8042026c ;** ..g STRPTR            **
  480. MUIA_String_AttachedList        EQU $80420fd2 ;** i.. Object *          **
  481. MUIA_String_BufferPos           EQU $80428b6c ;** .sg LONG              **
  482. MUIA_String_Contents            EQU $80428ffd ;** isg STRPTR            **
  483. MUIA_String_DisplayPos          EQU $8042ccbf ;** .sg LONG              **
  484. MUIA_String_EditHook            EQU $80424c33 ;** isg struct Hook *     **
  485. MUIA_String_Format              EQU $80427484 ;** i.g LONG              **
  486. MUIA_String_Integer             EQU $80426e8a ;** isg ULONG             **
  487. MUIA_String_MaxLen              EQU $80424984 ;** i.. LONG              **
  488. MUIA_String_Reject              EQU $8042179c ;** isg STRPTR            **
  489. MUIA_String_Secret              EQU $80428769 ;** i.g BOOL              **
  490.  
  491. MUIV_String_FormatLeft          EQU 0
  492. MUIV_String_FormatCenter        EQU 1
  493. MUIV_String_FormatRight         EQU 2
  494.  
  495.  
  496. ;****************************************************************************
  497. ;** Prop.mui 7.12 (28.11.93)                                               **
  498. ;****************************************************************************
  499.  
  500. ;** Attributes **
  501.  
  502. MUIA_Prop_Entries               EQU $8042fbdb ;** isg LONG              **
  503. MUIA_Prop_First                 EQU $8042d4b2 ;** isg LONG              **
  504. MUIA_Prop_Horiz                 EQU $8042f4f3 ;** i.g BOOL              **
  505. MUIA_Prop_Slider                EQU $80429c3a ;** isg BOOL              **
  506. MUIA_Prop_Visible               EQU $8042fea6 ;** isg LONG              **
  507.  
  508.  
  509.  
  510. ;****************************************************************************
  511. ;** Gauge.mui 7.42 (10.02.94)                                              **
  512. ;****************************************************************************
  513.  
  514. ;** Attributes **
  515.  
  516. MUIA_Gauge_Current              EQU $8042f0dd ;** isg LONG              **
  517. MUIA_Gauge_Divide               EQU $8042d8df ;** isg BOOL              **
  518. MUIA_Gauge_Horiz                EQU $804232dd ;** i.. BOOL              **
  519. MUIA_Gauge_InfoText             EQU $8042bf15 ;** isg char *            **
  520. MUIA_Gauge_Max                  EQU $8042bcdb ;** isg LONG              **
  521.  
  522.  
  523.  
  524. ;****************************************************************************
  525. ;** Scale.mui 7.38 (10.02.94)                                              **
  526. ;****************************************************************************
  527.  
  528. ;** Attributes **
  529.  
  530. MUIA_Scale_Horiz                EQU $8042919a ;** isg BOOL              **
  531.  
  532.  
  533.  
  534. ;****************************************************************************
  535. ;** Boopsi.mui 7.37 (10.02.94)                                             **
  536. ;****************************************************************************
  537.  
  538. ;** Attributes **
  539.  
  540. MUIA_Boopsi_Class               EQU $80426999 ;** isg struct IClass *   **
  541. MUIA_Boopsi_ClassID             EQU $8042bfa3 ;** isg char *            **
  542. MUIA_Boopsi_MaxHeight           EQU $8042757f ;** isg ULONG             **
  543. MUIA_Boopsi_MaxWidth            EQU $8042bcb1 ;** isg ULONG             **
  544. MUIA_Boopsi_MinHeight           EQU $80422c93 ;** isg ULONG             **
  545. MUIA_Boopsi_MinWidth            EQU $80428fb2 ;** isg ULONG             **
  546. MUIA_Boopsi_Object              EQU $80420178 ;** ..g Object *          **
  547. MUIA_Boopsi_Remember            EQU $8042f4bd ;** i.. ULONG             **
  548. MUIA_Boopsi_TagDrawInfo         EQU $8042bae7 ;** isg ULONG             **
  549. MUIA_Boopsi_TagScreen           EQU $8042bc71 ;** isg ULONG             **
  550. MUIA_Boopsi_TagWindow           EQU $8042e11d ;** isg ULONG             **
  551.  
  552.  
  553.  
  554. ;****************************************************************************
  555. ;** Colorfield.mui 7.39 (10.02.94)                                         **
  556. ;****************************************************************************
  557.  
  558. ;** Attributes **
  559.  
  560. MUIA_Colorfield_Blue            EQU $8042d3b0 ;** isg ULONG             **
  561. MUIA_Colorfield_Green           EQU $80424466 ;** isg ULONG             **
  562. MUIA_Colorfield_Pen             EQU $8042713a ;** ..g ULONG             **
  563. MUIA_Colorfield_Red             EQU $804279f6 ;** isg ULONG             **
  564. MUIA_Colorfield_RGB             EQU $8042677a ;** isg ULONG *           **
  565.  
  566.  
  567.  
  568. ;****************************************************************************
  569. ;** List.mui 7.22 (28.11.93)                                               **
  570. ;****************************************************************************
  571.  
  572. ;** Methods **
  573.  
  574. MUIM_List_Clear                EQU $8042ad89
  575. MUIM_List_Exchange             EQU $8042468c
  576. MUIM_List_GetEntry             EQU $804280ec
  577. MUIM_List_Insert               EQU $80426c87
  578. MUIM_List_InsertSingle         EQU $804254d5
  579. MUIM_List_Jump                 EQU $8042baab
  580. MUIM_List_NextSelected         EQU $80425f17
  581. MUIM_List_Redraw               EQU $80427993
  582. MUIM_List_Remove               EQU $8042647e
  583. MUIM_List_Select               EQU $804252d8
  584. MUIM_List_Sort                 EQU $80422275
  585.  
  586. ;** Attributes **
  587.  
  588. MUIA_List_Active                EQU $8042391c ;** isg LONG              **
  589. MUIA_List_AdjustHeight          EQU $8042850d ;** i.. BOOL              **
  590. MUIA_List_AdjustWidth           EQU $8042354a ;** i.. BOOL              **
  591. MUIA_List_CompareHook           EQU $80425c14 ;** is. struct Hook *     **
  592. MUIA_List_ConstructHook         EQU $8042894f ;** is. struct Hook *     **
  593. MUIA_List_DestructHook          EQU $804297ce ;** is. struct Hook *     **
  594. MUIA_List_DisplayHook           EQU $8042b4d5 ;** is. struct Hook *     **
  595. MUIA_List_Entries               EQU $80421654 ;** ..g LONG              **
  596. MUIA_List_First                 EQU $804238d4 ;** ..g LONG              **
  597. MUIA_List_Format                EQU $80423c0a ;** isg STRPTR            **
  598. MUIA_List_MultiTestHook         EQU $8042c2c6 ;** is. struct Hook *     **
  599. MUIA_List_Quiet                 EQU $8042d8c7 ;** .s. BOOL              **
  600. MUIA_List_SourceArray           EQU $8042c0a0 ;** i.. APTR              **
  601. MUIA_List_Title                 EQU $80423e66 ;** isg char *            **
  602. MUIA_List_Visible               EQU $8042191f ;** ..g LONG              **
  603.  
  604. MUIV_List_ActiveOff             EQU -1
  605. MUIV_List_ActiveTop             EQU -2
  606. MUIV_List_ActiveBottom          EQU -3
  607. MUIV_List_ActiveUp              EQU -4
  608. MUIV_List_ActiveDown            EQU -5
  609. MUIV_List_ActivePageUp          EQU -6
  610. MUIV_List_ActivePageDown        EQU -7
  611. MUIV_List_ConstructHookString   EQU -1
  612. MUIV_List_DestructHookString    EQU -1
  613.  
  614.  
  615. ;****************************************************************************
  616. ;** Floattext.mui 7.40 (10.02.94)                                          **
  617. ;****************************************************************************
  618.  
  619. ;** Attributes **
  620.  
  621. MUIA_Floattext_Justify          EQU $8042dc03 ;** isg BOOL              **
  622. MUIA_Floattext_SkipChars        EQU $80425c7d ;** is. STRPTR            **
  623. MUIA_Floattext_TabSize          EQU $80427d17 ;** is. LONG              **
  624. MUIA_Floattext_Text             EQU $8042d16a ;** isg STRPTR            **
  625.  
  626.  
  627.  
  628. ;****************************************************************************
  629. ;** Volumelist.mui 7.37 (10.02.94)                                         **
  630. ;****************************************************************************
  631.  
  632.  
  633. ;****************************************************************************
  634. ;** Scrmodelist.mui 7.45 (10.02.94)                                        **
  635. ;****************************************************************************
  636.  
  637. ;** Attributes **
  638.  
  639.  
  640.  
  641.  
  642. ;****************************************************************************
  643. ;** Dirlist.mui 7.38 (10.02.94)                                            **
  644. ;****************************************************************************
  645.  
  646. ;** Methods **
  647.  
  648. MUIM_Dirlist_ReRead            EQU $80422d71
  649.  
  650. ;** Attributes **
  651.  
  652. MUIA_Dirlist_AcceptPattern      EQU $8042760a ;** is. STRPTR            **
  653. MUIA_Dirlist_Directory          EQU $8042ea41 ;** is. STRPTR            **
  654. MUIA_Dirlist_DrawersOnly        EQU $8042b379 ;** is. BOOL              **
  655. MUIA_Dirlist_FilesOnly          EQU $8042896a ;** is. BOOL              **
  656. MUIA_Dirlist_FilterDrawers      EQU $80424ad2 ;** is. BOOL              **
  657. MUIA_Dirlist_FilterHook         EQU $8042ae19 ;** is. struct Hook *     **
  658. MUIA_Dirlist_MultiSelDirs       EQU $80428653 ;** is. BOOL              **
  659. MUIA_Dirlist_NumBytes           EQU $80429e26 ;** ..g LONG              **
  660. MUIA_Dirlist_NumDrawers         EQU $80429cb8 ;** ..g LONG              **
  661. MUIA_Dirlist_NumFiles           EQU $8042a6f0 ;** ..g LONG              **
  662. MUIA_Dirlist_Path               EQU $80426176 ;** ..g STRPTR            **
  663. MUIA_Dirlist_RejectIcons        EQU $80424808 ;** is. BOOL              **
  664. MUIA_Dirlist_RejectPattern      EQU $804259c7 ;** is. STRPTR            **
  665. MUIA_Dirlist_SortDirs           EQU $8042bbb9 ;** is. LONG              **
  666. MUIA_Dirlist_SortHighLow        EQU $80421896 ;** is. BOOL              **
  667. MUIA_Dirlist_SortType           EQU $804228bc ;** is. LONG              **
  668. MUIA_Dirlist_Status             EQU $804240de ;** ..g LONG              **
  669.  
  670. MUIV_Dirlist_SortDirsFirst      EQU 0
  671. MUIV_Dirlist_SortDirsLast       EQU 1
  672. MUIV_Dirlist_SortDirsMix        EQU 2
  673. MUIV_Dirlist_SortTypeName       EQU 0
  674. MUIV_Dirlist_SortTypeDate       EQU 1
  675. MUIV_Dirlist_SortTypeSize       EQU 2
  676. MUIV_Dirlist_StatusInvalid      EQU 0
  677. MUIV_Dirlist_StatusReading      EQU 1
  678. MUIV_Dirlist_StatusValid        EQU 2
  679.  
  680.  
  681. ;****************************************************************************
  682. ;** Group.mui 7.12 (28.11.93)                                              **
  683. ;****************************************************************************
  684.  
  685. ;** Methods **
  686.  
  687.  
  688. ;** Attributes **
  689.  
  690. MUIA_Group_ActivePage           EQU $80424199 ;** isg LONG              **
  691. MUIA_Group_Child                EQU $804226e6 ;** i.. Object *          **
  692. MUIA_Group_Columns              EQU $8042f416 ;** is. LONG              **
  693. MUIA_Group_Horiz                EQU $8042536b ;** i.. BOOL              **
  694. MUIA_Group_HorizSpacing         EQU $8042c651 ;** is. LONG              **
  695. MUIA_Group_PageMode             EQU $80421a5f ;** is. BOOL              **
  696. MUIA_Group_Rows                 EQU $8042b68f ;** is. LONG              **
  697. MUIA_Group_SameHeight           EQU $8042037e ;** i.. BOOL              **
  698. MUIA_Group_SameSize             EQU $80420860 ;** i.. BOOL              **
  699. MUIA_Group_SameWidth            EQU $8042b3ec ;** i.. BOOL              **
  700. MUIA_Group_Spacing              EQU $8042866d ;** is. LONG              **
  701. MUIA_Group_VertSpacing          EQU $8042e1bf ;** is. LONG              **
  702.  
  703.  
  704.  
  705. ;****************************************************************************
  706. ;** Group.mui 7.12 (28.11.93)                                              **
  707. ;****************************************************************************
  708.  
  709. ;** Attributes **
  710.  
  711. MUIA_Register_Frame             EQU $8042349b ;** i.g BOOL              **
  712. MUIA_Register_Titles            EQU $804297ec ;** i.g STRPTR *          **
  713.  
  714.  
  715.  
  716. ;****************************************************************************
  717. ;** Virtgroup.mui 7.37 (10.02.94)                                          **
  718. ;****************************************************************************
  719.  
  720. ;** Methods **
  721.  
  722.  
  723. ;** Attributes **
  724.  
  725. MUIA_Virtgroup_Height           EQU $80423038 ;** ..g LONG              **
  726. MUIA_Virtgroup_Left             EQU $80429371 ;** isg LONG              **
  727. MUIA_Virtgroup_Top              EQU $80425200 ;** isg LONG              **
  728. MUIA_Virtgroup_Width            EQU $80427c49 ;** ..g LONG              **
  729.  
  730.  
  731.  
  732. ;****************************************************************************
  733. ;** Scrollgroup.mui 7.35 (10.02.94)                                        **
  734. ;****************************************************************************
  735.  
  736. ;** Attributes **
  737.  
  738. MUIA_Scrollgroup_Contents       EQU $80421261 ;** i.. Object *          **
  739.  
  740.  
  741.  
  742. ;****************************************************************************
  743. ;** Scrollbar.mui 7.12 (28.11.93)                                          **
  744. ;****************************************************************************
  745.  
  746.  
  747. ;****************************************************************************
  748. ;** Listview.mui 7.13 (28.11.93)                                           **
  749. ;****************************************************************************
  750.  
  751. ;** Attributes **
  752.  
  753. MUIA_Listview_ClickColumn       EQU $8042d1b3 ;** ..g LONG              **
  754. MUIA_Listview_DefClickColumn    EQU $8042b296 ;** isg LONG              **
  755. MUIA_Listview_DoubleClick       EQU $80424635 ;** i.g BOOL              **
  756. MUIA_Listview_Input             EQU $8042682d ;** i.. BOOL              **
  757. MUIA_Listview_List              EQU $8042bcce ;** i.. Object *          **
  758. MUIA_Listview_MultiSelect       EQU $80427e08 ;** i.. LONG              **
  759. MUIA_Listview_SelectChange      EQU $8042178f ;** ..g BOOL              **
  760.  
  761. MUIV_Listview_MultiSelectNone   EQU 0
  762. MUIV_Listview_MultiSelectDefaul EQU 1
  763. MUIV_Listview_MultiSelectShifte EQU 2
  764. MUIV_Listview_MultiSelectAlways EQU 3
  765.  
  766.  
  767. ;****************************************************************************
  768. ;** Radio.mui 7.12 (28.11.93)                                              **
  769. ;****************************************************************************
  770.  
  771. ;** Attributes **
  772.  
  773. MUIA_Radio_Active               EQU $80429b41 ;** isg LONG              **
  774. MUIA_Radio_Entries              EQU $8042b6a1 ;** i.. STRPTR *          **
  775.  
  776.  
  777.  
  778. ;****************************************************************************
  779. ;** Cycle.mui 7.16 (28.11.93)                                              **
  780. ;****************************************************************************
  781.  
  782. ;** Attributes **
  783.  
  784. MUIA_Cycle_Active               EQU $80421788 ;** isg LONG              **
  785. MUIA_Cycle_Entries              EQU $80420629 ;** i.. STRPTR *          **
  786.  
  787. MUIV_Cycle_ActiveNext           EQU -1
  788. MUIV_Cycle_ActivePrev           EQU -2
  789.  
  790.  
  791. ;****************************************************************************
  792. ;** Slider.mui 7.12 (28.11.93)                                             **
  793. ;****************************************************************************
  794.  
  795. ;** Attributes **
  796.  
  797. MUIA_Slider_Level               EQU $8042ae3a ;** isg LONG              **
  798. MUIA_Slider_Max                 EQU $8042d78a ;** i.. LONG              **
  799. MUIA_Slider_Min                 EQU $8042e404 ;** i.. LONG              **
  800. MUIA_Slider_Quiet               EQU $80420b26 ;** i.. BOOL              **
  801. MUIA_Slider_Reverse             EQU $8042f2a0 ;** isg BOOL              **
  802.  
  803.  
  804.  
  805. ;****************************************************************************
  806. ;** Coloradjust.mui 7.47 (10.02.94)                                        **
  807. ;****************************************************************************
  808.  
  809. ;** Attributes **
  810.  
  811. MUIA_Coloradjust_Blue           EQU $8042b8a3 ;** isg ULONG             **
  812. MUIA_Coloradjust_Green          EQU $804285ab ;** isg ULONG             **
  813. MUIA_Coloradjust_ModeID         EQU $8042ec59 ;** isg ULONG             **
  814. MUIA_Coloradjust_Red            EQU $80420eaa ;** isg ULONG             **
  815. MUIA_Coloradjust_RGB            EQU $8042f899 ;** isg ULONG *           **
  816.  
  817.  
  818.  
  819. ;****************************************************************************
  820. ;** Palette.mui 7.36 (10.02.94)                                            **
  821. ;****************************************************************************
  822.  
  823. ;** Attributes **
  824.  
  825. MUIA_Palette_Entries            EQU $8042a3d8 ;** i.g struct MUI_Palette_Entry * **
  826. MUIA_Palette_Groupable          EQU $80423e67 ;** isg BOOL              **
  827. MUIA_Palette_Names              EQU $8042c3a2 ;** isg char **           **
  828.  
  829.  
  830.  
  831. ;****************************************************************************
  832. ;** Colorpanel.mui 7.12 (10.02.94)                                         **
  833. ;****************************************************************************
  834.  
  835. ;** Methods **
  836.  
  837.  
  838. ;** Attributes **
  839.  
  840.  
  841.  
  842.  
  843. ;****************************************************************************
  844. ;** Popstring.mui 7.19 (02.12.93)                                          **
  845. ;****************************************************************************
  846.  
  847. ;** Methods **
  848.  
  849. MUIM_Popstring_Close           EQU $8042dc52
  850. MUIM_Popstring_Open            EQU $804258ba
  851.  
  852. ;** Attributes **
  853.  
  854. MUIA_Popstring_Button           EQU $8042d0b9 ;** i.g Object *          **
  855. MUIA_Popstring_CloseHook        EQU $804256bf ;** isg struct Hook *     **
  856. MUIA_Popstring_OpenHook         EQU $80429d00 ;** isg struct Hook *     **
  857. MUIA_Popstring_String           EQU $804239ea ;** i.g Object *          **
  858. MUIA_Popstring_Toggle           EQU $80422b7a ;** isg BOOL              **
  859.  
  860.  
  861.  
  862. ;****************************************************************************
  863. ;** Popobject.mui 7.18 (02.12.93)                                          **
  864. ;****************************************************************************
  865.  
  866. ;** Attributes **
  867.  
  868. MUIA_Popobject_Follow           EQU $80424cb5 ;** isg BOOL              **
  869. MUIA_Popobject_Light            EQU $8042a5a3 ;** isg BOOL              **
  870. MUIA_Popobject_Object           EQU $804293e3 ;** i.g Object *          **
  871. MUIA_Popobject_ObjStrHook       EQU $8042db44 ;** isg struct Hook *     **
  872. MUIA_Popobject_StrObjHook       EQU $8042fbe1 ;** isg struct Hook *     **
  873. MUIA_Popobject_Volatile         EQU $804252ec ;** isg BOOL              **
  874.  
  875.  
  876.  
  877. ;****************************************************************************
  878. ;** Popasl.mui 7.5 (03.12.93)                                              **
  879. ;****************************************************************************
  880.  
  881. ;** Attributes **
  882.  
  883. MUIA_Popasl_Active              EQU $80421b37 ;** ..g BOOL              **
  884. MUIA_Popasl_StartHook           EQU $8042b703 ;** isg struct Hook *     **
  885. MUIA_Popasl_StopHook            EQU $8042d8d2 ;** isg struct Hook *     **
  886. MUIA_Popasl_Type                EQU $8042df3d ;** i.g ULONG             **
  887.  
  888.  
  889. ****************************************************************************
  890. **
  891. ** Macro Section
  892. ** -------------
  893. **
  894. ** To make GUI creation more easy and understandable, you can use the
  895. ** macros below. If you dont want, just define MUI_NOSHORTCUTS to disable
  896. ** them.
  897. **
  898. ** These macros are available to C programmers only.
  899. **
  900. *** NOTE: This .i file contains the corresponding macros for
  901. *** assembler programmers.  All assembler related comments are
  902. *** marked with three *'s.  The original comments and examples for
  903. *** C are still intact.
  904. **
  905. ****************************************************************************
  906.  
  907.    IFND MUI_NOSHORTCUTS
  908.  
  909.  
  910.  
  911. ****************************************************************************
  912. **
  913. ** Object Generation
  914. ** -----------------
  915. **
  916. ** The xxxObject (and xChilds) macros generate new instances of MUI classes.
  917. ** Every xxxObject can be followed by tagitems specifying initial create
  918. ** time attributes for the new object and must be terminated with the
  919. ** End macro:
  920. **
  921. ** obj = StringObject,
  922. **          MUIA_String_Contents, "foo",
  923. **          MUIA_String_MaxLen  , 40,
  924. **          End;
  925. **
  926. ** With the Child, SubWindow and WindowContents shortcuts you can
  927. ** construct a complete GUI within one command:
  928. **
  929. ** app = ApplicationObject,
  930. **
  931. **          ...
  932. **
  933. **          SubWindow, WindowObject,
  934. **             WindowContents, VGroup,
  935. **                Child, String("foo",40),
  936. **                Child, String("bar",50),
  937. **                Child, HGroup,
  938. **                   Child, CheckMark(TRUE),
  939. **                   Child, CheckMark(FALSE),
  940. **                   End,
  941. **                End,
  942. **             End,
  943. **
  944. **          SubWindow, WindowObject,
  945. **             WindowContents, HGroup,
  946. **                Child, ...,
  947. **                Child, ...,
  948. **                End,
  949. **             End,
  950. **
  951. **          ...
  952. **
  953. **          End;
  954. **
  955. ****************************************************************************
  956.  
  957.  
  958. ****************************************************************************
  959. ***
  960. *** These assembler macros behave somewhat in the same way as the C macros
  961. *** but with some minor differences:
  962. *** The macro names End, and SET are already in use in most assembler
  963. *** compilers, so they are replaced with Endi and seti (for consistencys
  964. *** sake get is also renamed to geti).
  965. ***
  966. *** You must provide memory for all the taglists needed in the object
  967. *** creation.  The maximum memory needed is passed to you in the 
  968. *** TAG_SPACE variable.  This is not the mimimum memory needed in most
  969. *** cases and is often a few kilos too large, but this is the best I
  970. *** could come up with the assembler macro commands.
  971. *** Note that you must store the value of TAG_SPACE only after all
  972. *** the objects are created.  TAG_SPACE is incremented as object
  973. *** creation macros are called and in the end holds the maximum
  974. *** theoretical tagitem space usage in bytes.  You pass the pointer to
  975. *** this memory (which you have yourself allocated) in the register MR.
  976. *** You can EQUR MR to any of the registers a3, a4 or a5 (the macros
  977. *** don't use these registers).
  978. ***
  979. *** All calls to xxxObject and xxxGroup _must_ be finished with an Endi
  980. *** call.  The Endi macro actually calls the MUI_NewObjectA function
  981. *** and places the result object to the taglist.
  982. ***
  983. *** The MUIT macro is just a handy way of moving mixed stuff to the
  984. *** taglist.  Upto 9 items can be moved to the stack on one source line.
  985. *** You can move _only constants_ with the MUIT macro, use the
  986. *** MUIT2 macro to move more mixed stuff (pointers, registers).
  987. *** Remember to use # to denote constants when using MUIT2.
  988. *** The Endi macro is a special case for the MUIT and MUIT2 macros.
  989. *** This is snooped out and every 'MUIT Endi' call is converted to
  990. *** an Endi macro call.
  991. ***
  992. *** Also the very common calls 'MUIT Child', 'MUIT SubWindow' and
  993. *** 'MUIT WindowContents' have their own macros Childi, SubWindowi
  994. *** and WindowContentsi.  Childi macro can take upto five arguments.
  995. *** There are three versions of Childi: Childi, Child2 and Child3.
  996. *** Templates for these macros are:
  997. *** Childi [macro[,argument1[,argument2[,argument3[,argument4]]]]]
  998. *** Child2 [macro[,macro[,macro[,macro[,macro]]]]]
  999. *** Child3 [macro[,macro[,argument1[,argument2[,argument3]]]]]
  1000. *** Arguments for Childi are interpreted as the first one being a
  1001. *** full macro name and the last four arguments for this macro.
  1002. *** Arguments for Child2 are treated as macros placed on their
  1003. *** own separate lines.  These macros can't have any arguments.
  1004. *** Arguments for Child3 are treated as two macros placed on their
  1005. *** own separate lines.  The last macro can have three arguments.
  1006. ***
  1007. *** The C example above with these assembler macros:
  1008. ***
  1009. ***   ApplicationObject
  1010. ***   
  1011. ***      ...
  1012. ***
  1013. ***      SubWindowi
  1014. ***      WindowObject
  1015. ***         WindowContentsi
  1016. ***         VGroup
  1017. ***            Childi String,foo,40
  1018. ***            Childi String,bar,50
  1019. ***            Childi HGroup
  1020. ***               Childi Checkmark,TRUE
  1021. ***               Childi Checkmark,FALSE
  1022. ***               Endi
  1023. ***            Endi
  1024. ***         Endi
  1025. ***
  1026. ***      SubWindowi
  1027. ***      WindowObject
  1028. ***         WindowContentsi
  1029. ***         HGroup
  1030. ***            Childi
  1031. ***            ...
  1032. ***            Childi
  1033. ***            ...
  1034. ***            Endi
  1035. ***         Endi
  1036. ***
  1037. ***      ...
  1038. ***         
  1039. ***      Endi
  1040. ***      is app
  1041. ***
  1042. ***   app   dc.l  0
  1043. ***   bar   dc.b  "bar",0
  1044. ***   foo   dc.b  "foo",0
  1045. ***
  1046. ****************************************************************************
  1047.  
  1048. *** TAG_SPACE will hold the max taglist size in bytes
  1049.  
  1050. TAG_SPACE SET 0
  1051.  
  1052. *** Macros to move a tagitem to the taglist if it is given
  1053.  
  1054. cmv   MACRO ; Tag
  1055.    IFNC  '\1',''
  1056.    IFC   '\1','Endi'
  1057.       Endi
  1058.    ELSEIF
  1059.       move.l   #\1,(MR)+
  1060. TAG_SPACE SET TAG_SPACE+4
  1061.    ENDC
  1062.    ENDC
  1063.       ENDM
  1064.  
  1065. cmv2  MACRO ; Tag
  1066.    IFNC  '\1',''
  1067.    IFC   '\1','Endi'
  1068.       Endi
  1069.    ELSEIF
  1070.       move.l   \1,(MR)+
  1071. TAG_SPACE SET TAG_SPACE+4
  1072.    ENDC
  1073.    ENDC
  1074.       ENDM
  1075.  
  1076. *** Macro to move a tagitem to stack if it is given
  1077.  
  1078. cmv3  MACRO ; Tag
  1079.    IFNC  '\1',''
  1080.       move.l   \1,-(sp)
  1081.    ENDC
  1082.       ENDM
  1083.  
  1084. *** Macros to move max 9 tagitems to the taglist
  1085.  
  1086. MUIT  MACRO ; Tag1, [...]
  1087.       cmv   \1
  1088.       cmv   \2
  1089.       cmv   \3
  1090.       cmv   \4
  1091.       cmv   \5
  1092.       cmv   \6
  1093.       cmv   \7
  1094.       cmv   \8
  1095.       cmv   \9
  1096.       ENDM
  1097.  
  1098. MUIT2 MACRO ; Tag1, [...]
  1099.       cmv2  \1
  1100.       cmv2  \2
  1101.       cmv2  \3
  1102.       cmv2  \4
  1103.       cmv2  \5
  1104.       cmv2  \6
  1105.       cmv2  \7
  1106.       cmv2  \8
  1107.       cmv2  \9
  1108.       ENDM
  1109.  
  1110. *** DoMethod macro for easier assembler DoMethod'ing, max 20 tagitems.
  1111. *** Note that _DoMethod is defined in amiga.lib, so you must link
  1112. *** your own object code with it.
  1113.  
  1114. DoMethod    MACRO ; obj, MethodID, tag1, [...]
  1115.             movem.l  a0/a2,-(sp)
  1116.             move.l   sp,a2
  1117.             clr.l    -(sp)
  1118.             cmv3     \L
  1119.             cmv3     \K
  1120.             cmv3     \J
  1121.             cmv3     \I
  1122.             cmv3     \H
  1123.             cmv3     \G
  1124.             cmv3     \F
  1125.             cmv3     \E
  1126.             cmv3     \D
  1127.             cmv3     \C
  1128.             cmv3     \B
  1129.             cmv3     \A
  1130.             cmv3     \9
  1131.             cmv3     \8
  1132.             cmv3     \7
  1133.             cmv3     \6
  1134.             cmv3     \5
  1135.             cmv3     \4
  1136.             cmv3     \3
  1137.             cmv3     \2
  1138.             cmv3     \1
  1139.             jsr      _DoMethod
  1140.             move.l   a2,sp
  1141.             movem.l  (sp)+,a0/a2
  1142.             ENDM
  1143.  
  1144. *** MUI_Request macro for easier assembler MUI_Request'ing, max
  1145. *** 20 tagitems.
  1146.  
  1147. MUI_Request MACRO    ; app,win,flags,title,gadgets,format,[params,...]
  1148.             movem.l  a0-a4,-(sp)
  1149.             move.l   sp,a4
  1150.             cmv3     \L
  1151.             cmv3     \K
  1152.             cmv3     \J
  1153.             cmv3     \I
  1154.             cmv3     \H
  1155.             cmv3     \G
  1156.             cmv3     \F
  1157.             cmv3     \E
  1158.             cmv3     \D
  1159.             cmv3     \C
  1160.             cmv3     \B
  1161.             cmv3     \A
  1162.             cmv3     \9
  1163.             cmv3     \8
  1164.             cmv3     \7
  1165.             move.l   a4,a3
  1166.             move.l   #\6,a2
  1167.             move.l   #\5,a1
  1168.             move.l   #\4,a0
  1169.             move.l   #\3,d2
  1170.             move.l   \2,d1
  1171.             move.l   \1,d0
  1172.             CALLMUI  MUI_RequestA
  1173.             move.l   a4,sp
  1174.             movem.l  (sp)+,a0-a4
  1175.             ENDM
  1176.  
  1177. *** Macro for getting a pointer to an object you just created.
  1178. *** This is valid only after an Endi macro.
  1179.  
  1180. is          MACRO    ; pointer
  1181.             move.l   d0,\1
  1182.             ENDM
  1183.  
  1184. WindowObject         MACRO
  1185.                      movem.l  a0/a2,-(sp)
  1186.                      move.l   MUIC_Window,a0
  1187.                      move.l   a4,a2
  1188.                      ENDM
  1189. Endi                 MACRO
  1190.                      clr.l    (MR)+
  1191.                      move.l   a2,a1
  1192.                      CALLMUI  MUI_NewObjectA
  1193.                      move.l   a2,a4
  1194.                      movem.l  (sp)+,a0/a2
  1195.                      cmv2     d0
  1196.                      ENDM
  1197. ImageObject          MACRO
  1198.                      movem.l  a0/a2,-(sp)
  1199.                      move.l   MUIC_Image,a0
  1200.                      move.l   a4,a2
  1201.                      ENDM
  1202. NotifyWindowObject   MACRO
  1203.                      movem.l  a0/a2,-(sp)
  1204.                      move.l   MUIC_Notify,a0
  1205.                      move.l   a4,a2
  1206.                      ENDM
  1207. ApplicationObject    MACRO
  1208.                      movem.l  a0/a2,-(sp)
  1209.                      move.l   MUIC_Application,a0
  1210.                      move.l   a4,a2
  1211.                      ENDM
  1212. TextObject           MACRO
  1213.                      movem.l  a0/a2,-(sp)
  1214.                      move.l   MUIC_Text,a0
  1215.                      move.l   a4,a2
  1216.                      ENDM
  1217. RectangleObject      MACRO
  1218.                      movem.l  a0/a2,-(sp)
  1219.                      move.l   MUIC_Rectangle,a0
  1220.                      move.l   a4,a2
  1221.                      ENDM
  1222. ListObject           MACRO
  1223.                      movem.l  a0/a2,-(sp)
  1224.                      move.l   MUIC_List,a0
  1225.                      move.l   a4,a2
  1226.                      ENDM
  1227. PropObject           MACRO
  1228.                      movem.l  a0/a2,-(sp)
  1229.                      move.l   MUIC_Prop,a0
  1230.                      move.l   a4,a2
  1231.                      ENDM
  1232. StringObject         MACRO
  1233.                      movem.l  a0/a2,-(sp)
  1234.                      move.l   MUIC_String,a0
  1235.                      move.l   a4,a2
  1236.                      ENDM
  1237. ScrollbarObject      MACRO
  1238.                      movem.l  a0/a2,-(sp)
  1239.                      move.l   MUIC_Scrollbar,a0
  1240.                      move.l   a4,a2
  1241.                      ENDM
  1242. ListviewObject       MACRO
  1243.                      movem.l  a0/a2,-(sp)
  1244.                      move.l   MUIC_Listview,a0
  1245.                      move.l   a4,a2
  1246.                      ENDM
  1247. RadioObject          MACRO
  1248.                      movem.l  a0/a2,-(sp)
  1249.                      move.l   MUIC_Radio,a0
  1250.                      move.l   a4,a2
  1251.                      ENDM
  1252. VolumelistObject     MACRO
  1253.                      movem.l  a0/a2,-(sp)
  1254.                      move.l   MUIC_Volumelist,a0
  1255.                      move.l   a4,a2
  1256.                      ENDM
  1257. FloattextObject      MACRO
  1258.                      movem.l  a0/a2,-(sp)
  1259.                      move.l   MUIC_Floattext,a0
  1260.                      move.l   a4,a2
  1261.                      ENDM
  1262. DirlistObject        MACRO
  1263.                      movem.l  a0/a2,-(sp)
  1264.                      move.l   MUIC_Dirlist,a0
  1265.                      move.l   a4,a2
  1266.                      ENDM
  1267. ApplistObject        MACRO
  1268.                      movem.l  a0/a2,-(sp)
  1269.                      move.l   MUIC_Applist,a0
  1270.                      move.l   a4,a2
  1271.                      ENDM
  1272. DatatypeObject       MACRO
  1273.                      movem.l  a0/a2,-(sp)
  1274.                      move.l   MUIC_Datatype,a0
  1275.                      move.l   a4,a2
  1276.                      ENDM
  1277. SliderObject         MACRO
  1278.                      movem.l  a0/a2,-(sp)
  1279.                      move.l   MUIC_Slider,a0
  1280.                      move.l   a4,a2
  1281.                      ENDM
  1282. CycleObject          MACRO
  1283.                      movem.l  a0/a2,-(sp)
  1284.                      move.l   MUIC_Cycle,a0
  1285.                      move.l   a4,a2
  1286.                      ENDM
  1287. GaugeObject          MACRO
  1288.                      movem.l  a0/a2,-(sp)
  1289.                      move.l   MUIC_Gauge,a0
  1290.                      move.l   a4,a2
  1291.                      ENDM
  1292. ScaleObject          MACRO
  1293.                      movem.l  a0/a2,-(sp)
  1294.                      move.l   MUIC_Scale,a0
  1295.                      move.l   a4,a2
  1296.                      ENDM
  1297. BoopsiObject         MACRO
  1298.                      movem.l  a0/a2,-(sp)
  1299.                      move.l   MUIC_Boopsi,a0
  1300.                      move.l   a4,a2
  1301.                      ENDM
  1302. GroupObject          MACRO
  1303.                      movem.l  a0/a2,-(sp)
  1304.                      move.l   MUIC_Group,a0
  1305.                      move.l   a4,a2
  1306.                      ENDM
  1307. VGroup               MACRO
  1308.                      movem.l  a0/a2,-(sp)
  1309.                      move.l   MUIC_Group,a0
  1310.                      move.l   a4,a2
  1311.                      ENDM
  1312. HGroup               MACRO
  1313.                      movem.l  a0/a2,-(sp)
  1314.                      move.l   MUIC_Group,a0
  1315.                      move.l   a4,a2
  1316.                      MUIT     MUIA_Group_Horiz,TRUE
  1317.                      ENDM
  1318. ColGroup             MACRO ; cols
  1319.                      movem.l  a0/a2,-(sp)
  1320.                      move.l   MUIC_Group,a0
  1321.                      move.l   a4,a2
  1322.                      MUIT     MUIA_Group_Columns,\1
  1323.                      ENDM
  1324. RowGroup             MACRO ; rows
  1325.                      movem.l  a0/a2,-(sp)
  1326.                      move.l   MUIC_Group,a0
  1327.                      move.l   a4,a2
  1328.                      MUIT     MUIA_Group_Rows,\1
  1329.                      ENDM
  1330.  
  1331. Childi               MACRO ; [macro[,argument1[,argument2[,argument3[,argument4]]]]]
  1332.                      cmv   MUIA_Group_Child
  1333.                      \1 \2,\3,\4,\5
  1334.                      ENDM
  1335. Child2               MACRO ; [macro[,macro[,macro[,macro[,macro]]]]]
  1336.                      cmv   MUIA_Group_Child
  1337.                      \1
  1338.                      \2
  1339.                      \3
  1340.                      \4
  1341.                      \5
  1342.                      ENDM
  1343. Child3               MACRO ; [macro[,macro[,argument1[,argument2[,argument3]]]]]
  1344.                      cmv   MUIA_Group_Child
  1345.                      \1
  1346.                      \2 \3,\4,\5
  1347.                      ENDM
  1348. SubWindowi           MACRO
  1349.                      cmv   MUIA_Application_Window
  1350.                      ENDM
  1351. WindowContentsi      MACRO
  1352.                      cmv   MUIA_Window_RootObject
  1353.                      ENDM
  1354.  
  1355.  
  1356. Child          EQU   MUIA_Group_Child
  1357. SubWindow      EQU   MUIA_Application_Window
  1358. WindowContents EQU   MUIA_Window_RootObject
  1359.  
  1360.  
  1361.  
  1362. ****************************************************************************
  1363. **
  1364. ** Frame Types
  1365. ** -----------
  1366. **
  1367. ** These macros may be used to specify one of MUI's different frame types.
  1368. ** Note that every macro consists of one or more { ti_Tag, ti_Data }
  1369. ** pairs.
  1370. **
  1371. ** GroupFrameT() is a special kind of frame that contains a centered
  1372. ** title text.
  1373. **
  1374. ** HGroup, GroupFrameT("Horiz Groups"),
  1375. **    Child, RectangleObject, TextFrame  , End,
  1376. **    Child, RectangleObject, StringFrame, End,
  1377. **    Child, RectangleObject, ButtonFrame, End,
  1378. **    Child, RectangleObject, ListFrame  , End,
  1379. **    End,
  1380. **
  1381. ****************************************************************************
  1382.  
  1383. ****************************************************************************
  1384. ***
  1385. *** Assembler version of the above C example:
  1386. ***
  1387. *** HGroup
  1388. ***    GroupFrameT horizg
  1389. ***    Child2 RectangleObject,TextFrame,Endi
  1390. ***    Child2 RectangleObject,StringFrame,Endi
  1391. ***    Child2 RectangleObject,ButtonFrame,Endi
  1392. ***    Child2 RectangleObject,ListFrame,Endi
  1393. ***    Endi
  1394. ***
  1395. *** horizg  dc.b  "Horiz Groups",0
  1396. ***         even
  1397. ***
  1398. ****************************************************************************
  1399.  
  1400. *** These macros call MUIT themselves, do not use eg. 'MUIT NoFrame'
  1401.  
  1402. NoFrame     MACRO
  1403.             MUIT  MUIA_Frame,MUIV_FrameNone
  1404.             ENDM
  1405. ButtonFrame MACRO
  1406.             MUIT  MUIA_Frame,MUIV_FrameButton
  1407.             ENDM
  1408. ImageButtonFrame  MACRO
  1409.             MUIT  MUIA_Frame,MUIV_FrameImageButton
  1410.             ENDM
  1411. TextFrame   MACRO
  1412.             MUIT  MUIA_Frame,MUIV_FrameText
  1413.             ENDM
  1414. StringFrame MACRO
  1415.             MUIT  MUIA_Frame,MUIV_FrameString
  1416.             ENDM
  1417. ReadListFrame  MACRO
  1418.             MUIT  MUIA_Frame,MUIV_FrameReadList
  1419.             ENDM
  1420. InputListFrame MACRO
  1421.             MUIT  MUIA_Frame,MUIV_FrameInputList
  1422.             ENDM
  1423. PropFrame   MACRO
  1424.             MUIT  MUIA_Frame,MUIV_FrameProp
  1425.             ENDM
  1426. GaugeFrame  MACRO
  1427.             MUIT  MUIA_Frame,MUIV_FrameGauge
  1428.             ENDM
  1429. GroupFrame  MACRO
  1430.             MUIT  MUIA_Frame,MUIV_FrameGroup
  1431.             ENDM
  1432. GroupFrameT MACRO ; s
  1433.             MUIT  MUIA_Frame,MUIV_FrameGroup,MUIA_FrameTitle,\1
  1434.             ENDM
  1435.  
  1436.  
  1437.  
  1438. ****************************************************************************
  1439. **
  1440. ** Spacing Macros
  1441. ** --------------
  1442. **
  1443. ****************************************************************************
  1444.  
  1445. *** For these macros tagitem space is allocated from the stack and is
  1446. *** fixed in size.  So, there is no need for a separate Endi call.
  1447.  
  1448. HVSpace     MACRO
  1449.             move.l   a0,-(sp)
  1450.             move.l   MUIC_Rectangle,a0
  1451.             clr.l    -(sp)
  1452.             move.l   sp,a1
  1453.             CALLMUI  MUI_NewObjectA
  1454.             addq.l   #4,sp
  1455.             move.l   (sp)+,a0
  1456.             MUIT2    d0
  1457.             ENDM
  1458.    
  1459. HSpace      MACRO ; x
  1460.             move.l   a0,-(sp)
  1461.             move.l   MUIC_Rectangle,a0
  1462.             clr.l    -(sp)
  1463.             clr.l    -(sp)
  1464.             pea      MUIA_VertWeight
  1465.             move.l   #\1,-(sp)
  1466.          IFND  \1
  1467.             pea      MUIA_FixWidth
  1468.          ELSEIF
  1469.             pea      1.w
  1470.          ENDC
  1471.             move.l   sp,a1
  1472.             CALLMUI  MUI_NewObjectA
  1473.             lea      20(sp),sp
  1474.             move.l   (sp)+,a0
  1475.             MUIT2    d0
  1476.             ENDM
  1477.  
  1478. VSpace      MACRO ; x
  1479.             move.l   a0,-(sp)
  1480.             move.l   MUIC_Rectangle,a0
  1481.             clr.l    -(sp)
  1482.             clr.l    -(sp)
  1483.             pea      MUIA_HorizWeight
  1484.             move.l   #\1,-(sp)
  1485.          IFND  \1
  1486.             pea      MUIA_FixHeight
  1487.          ELSEIF
  1488.             pea      1.w
  1489.          ENDC
  1490.             move.l   sp,a1
  1491.             CALLMUI  MUI_NewObjectA
  1492.             lea      20(sp),sp
  1493.             move.l   (sp)+,a0
  1494.             MUIT2    d0
  1495.             ENDM
  1496.  
  1497. HCenter     MACRO ; obj
  1498.             HGroup
  1499.                GroupSpacing 0
  1500.                Childi HSpace,0
  1501.                Childi MUIT2,\1
  1502.                Childi HSpace,0
  1503.                Endi
  1504.             ENDM
  1505.  
  1506. VCenter     MACRO ; obj
  1507.             VGroup
  1508.                GroupSpacing 0
  1509.                Childi VSpace,0
  1510.                Childi MUIT2,\1
  1511.                Childi VSpace,0
  1512.                Endi
  1513.             ENDM
  1514.  
  1515. InnerSpacing   MACRO ; h,v
  1516.                MUIT MUIA_InnerLeft,\1,MUIA_InnerRight,\1,MUIA_InnerTop,\2,MUIA_InnerBottom,\2
  1517.                ENDM
  1518.  
  1519. GroupSpacing   MACRO ; x
  1520.                MUIT  MUIA_Group_Spacing,\1
  1521.                ENDM
  1522.  
  1523.  
  1524.  
  1525. ****************************************************************************
  1526. ***
  1527. *** You use these assembler macros like this:
  1528. ***
  1529. *** String mystr1,40
  1530. ***
  1531. *** CheckMark TRUE
  1532. ***
  1533. *** SimpleButton mysbut1
  1534. ***
  1535. *** KeyButton mykbut1,"c"
  1536. ***
  1537. *** Cycle myentr1
  1538. ***
  1539. *** KeyCycle myentr1,"k"
  1540. ***
  1541. *** Radio rname1,rbuts1
  1542. ***
  1543. *** String mystr1,35
  1544. *** is strobj1
  1545. *** Popup ST_Font,strobj1,MyHook,MUII_Popup
  1546. ***
  1547. ***
  1548. *** MyHook  rts   ; dummy hook, does nothing
  1549. *** mysrt1  dc.b  "String contents",0
  1550. ***         even
  1551. *** mysbut1 dc.b  "Button",0
  1552. ***         even
  1553. *** mykbut1 dc.b  "Cancel",0
  1554. ***         even
  1555. *** myentr1 dc.l  entrs1,entrs2,entrs3,NULL
  1556. *** entrs1  dc.b  "One",0
  1557. *** entrs2  dc.b  "Two",0
  1558. *** entrs3  dc.b  "Three",0
  1559. ***         even
  1560. *** rname1  dc.b  "Radio Buttons:",0
  1561. ***         even
  1562. *** rbuts1  dc.l  rbut1,rbut2,rbut3,NULL
  1563. *** rbut1   dc.b  "Button1",0
  1564. ***         even
  1565. *** rbut2   dc.b  "Button2",0
  1566. ***         even
  1567. *** rbut3   dc.b  "Button3",0
  1568. ***         even
  1569. *** strobj  dc.l  0
  1570. *** ST_Font dc.l  0
  1571. ***
  1572. ***
  1573. ****************************************************************************
  1574.  
  1575. ****************************************************************************
  1576. **
  1577. ** String-Object
  1578. ** -------------
  1579. **
  1580. ** The following macro creates a simple string gadget.
  1581. **
  1582. ****************************************************************************
  1583.  
  1584. String MACRO ; contents,maxlen
  1585.    StringObject
  1586.       StringFrame
  1587.       MUIT MUIA_String_MaxLen,\2
  1588.       MUIT MUIA_String_Contents,\1
  1589.       Endi
  1590.    ENDM
  1591.  
  1592.  
  1593. ****************************************************************************
  1594. **
  1595. ** CheckMark-Object
  1596. ** ----------------
  1597. **
  1598. ** The following macro creates a checkmark gadget.
  1599. **
  1600. ****************************************************************************
  1601.  
  1602. CheckMark MACRO ; selected
  1603.    ImageObject
  1604.       ImageButtonFrame
  1605.       MUIT MUIA_InputMode,MUIV_InputModeToggle
  1606.       MUIT MUIA_Image_Spec,MUII_CheckMark
  1607.       MUIT MUIA_Image_FreeVert,TRUE
  1608.       MUIT MUIA_Selected,\1
  1609.       MUIT MUIA_Background,MUII_ButtonBack
  1610.       MUIT MUIA_ShowSelState,FALSE
  1611.       Endi
  1612.    ENDM
  1613.  
  1614.  
  1615. ****************************************************************************
  1616. **
  1617. ** Button-Objects
  1618. ** --------------
  1619. **
  1620. ** Note: Use small letters for KeyButtons, e.g.
  1621. **       KeyButton("Cancel",'c')  and not  KeyButton("Cancel",'C') !!
  1622. **
  1623. ****************************************************************************
  1624.  
  1625. SimpleButton MACRO ; name
  1626.    TextObject
  1627.       ButtonFrame
  1628.       MUIT MUIA_Text_Contents,\1
  1629.       MUIT MUIA_Text_PreParse,PreParse
  1630.       MUIT MUIA_Text_SetMax,FALSE
  1631.       MUIT MUIA_InputMode,MUIV_InputModeRelVerify
  1632.       MUIT MUIA_Background,MUII_ButtonBack
  1633.       Endi
  1634.    ENDM
  1635.  
  1636. KeyButton MACRO ; name,key
  1637.    TextObject
  1638.       ButtonFrame
  1639.       MUIT MUIA_Text_Contents,\1
  1640.       MUIT MUIA_Text_PreParse,PreParse
  1641.       MUIT MUIA_Text_SetMax,FALSE
  1642.       MUIT MUIA_Text_HiChar,\2
  1643.       MUIT MUIA_ControlChar,\2
  1644.       MUIT MUIA_InputMode,MUIV_InputModeRelVerify
  1645.       MUIT MUIA_Background,MUII_ButtonBack
  1646.       Endi
  1647.    ENDM
  1648.  
  1649.  
  1650.  
  1651. ****************************************************************************
  1652. **
  1653. ** Cycle-Object
  1654. ** ------------
  1655. **
  1656. ****************************************************************************
  1657.  
  1658. Cycle MACRO ; entries
  1659.    CycleObject
  1660.       MUIT MUIA_Cycle_Entries,\1
  1661.       Endi
  1662.    ENDM
  1663.  
  1664. KeyCycle MACRO ; entries,key
  1665.    CycleObject
  1666.       MUIT  MUIA_Cycle_Entries,\1,MUIA_ControlChar,\2
  1667.       Endi
  1668.    ENDM
  1669.  
  1670.  
  1671.  
  1672. ****************************************************************************
  1673. **
  1674. ** Radio-Object
  1675. ** ------------
  1676. **
  1677. ****************************************************************************
  1678.  
  1679. Radio MACRO ; name,array
  1680.    RadioObject
  1681.       GroupFrameT \1
  1682.       MUIT  MUIA_Radio_Entries,\2
  1683.       Endi
  1684.    ENDM
  1685.  
  1686.  
  1687.  
  1688. ****************************************************************************
  1689. **
  1690. ** Popup-Object
  1691. ** ------------
  1692. **
  1693. ** An often needed GUI element is a string gadget with a little button
  1694. ** that opens up a (small) window with a list containing possible entries
  1695. ** for this gadget. Together with the Popup and the String macro,
  1696. ** such a thing would look like
  1697. **
  1698. ** VGroup,
  1699. **    Child, Popup(ST_Font, String("helvetica/13",32), &Hook, MUII_Popup),
  1700. **    ...,
  1701. **
  1702. ** ST_Font will hold a pointer to the embedded string gadget and can
  1703. ** be used to set and get its contents as with every other string object.
  1704. **
  1705. ** The hook will be called with the string gadget as object whenever
  1706. ** the user releases the popup button and could look like this:
  1707. **
  1708. ** ULONG __asm __saveds HookFunc(register __a2 APTR obj,MUII_File)
  1709. ** {
  1710. **    ...
  1711. **
  1712. **    // put our application to sleep while displaying the requester
  1713. **    set(Application,MUIA_Application_Sleep,TRUE);
  1714. **
  1715. **    // get the calling objects window and position
  1716. **    get(obj,MUIA_Window  ,&window);
  1717. **    get(obj,MUIA_LeftEdge,&l);
  1718. **    get(obj,MUIA_TopEdge ,&t);
  1719. **    get(obj,MUIA_Width   ,&w);
  1720. **    get(obj,MUIA_Height  ,&h);
  1721. **
  1722. **    if (req=MUI_AllocAslRequestTags(ASL_FontRequest,TAG_DONE))
  1723. **    {
  1724. **       if (MUI_AslRequestTags(req,
  1725. **          ASLFO_Window         ,window,
  1726. **          ASLFO_PrivateIDCMP   ,TRUE,
  1727. **          ASLFO_TitleText      ,"Select Font",
  1728. **          ASLFO_InitialLeftEdge,window->LeftEdge + l,
  1729. **          ASLFO_InitialTopEdge ,window->TopEdge  + t+h,
  1730. **          ASLFO_InitialWidth   ,w,
  1731. **          ASLFO_InitialHeight  ,250,
  1732. **          TAG_DONE))
  1733. **       {
  1734. **          // set the new contents for our string gadget
  1735. **          set(obj,MUIA_String_Contents,req->fo_Attr.ta_Name);
  1736. **       }
  1737. **       MUI_FreeAslRequest(req);
  1738. **    }
  1739. **
  1740. **    // wake up our application again
  1741. **    set(Application,MUIA_Application_Sleep,FALSE);
  1742. **
  1743. **    return(0);
  1744. ** }
  1745. **
  1746. ** Note: This macro needs a "APTR dummy;" declaration somewhere in your
  1747. **       code to work.
  1748. **
  1749. ****************************************************************************
  1750.  
  1751. Popup MACRO ; ptr,obj,hook,img
  1752.    HGroup
  1753.       GroupSpacing 1
  1754.       MUIT2 #Child,\2
  1755.       move.l   \2,\1
  1756.       Child2 ImageObject,ImageButtonFrame
  1757.          MUIT MUIA_Image_Spec,\4
  1758.          MUIT MUIA_Image_FontMatchWidth,TRUE
  1759.          MUIT MUIA_Image_FreeVert,TRUE
  1760.          MUIT MUIA_InputMode,MUIV_InputModeRelVerify
  1761.          MUIT MUIA_Background,MUII_BACKGROUND
  1762.          Endi
  1763.       move.l   (sp),dummy
  1764.       MUIT TAG_IGNORE
  1765.       tst.l dummy
  1766.       beq.b pop\@
  1767.       tst.l \1
  1768.       beq.b pop\@
  1769.       DoMethod dummy,#MUIM_Notify,#MUIA_Pressed,#FALSE,\1,#2,#MUIM_CallHook,\2
  1770.       MUIT2 d0
  1771.       bra.b pup\@
  1772. pop\@ MUIT  0
  1773. pup\@ Endi
  1774.    ENDM
  1775.  
  1776.  
  1777.  
  1778. ****************************************************************************
  1779. **
  1780. ** Labeling Objects
  1781. ** ----------------
  1782. **
  1783. ** Labeling objects, e.g. a group of string gadgets,
  1784. **
  1785. **   Small: |foo   |
  1786. **  Normal: |bar   |
  1787. **     Big: |foobar|
  1788. **    Huge: |barfoo|
  1789. **
  1790. ** is done using a 2 column group:
  1791. **
  1792. ** ColGroup(2),
  1793. **    Child, Label2("Small:" ),
  1794. **    Child, StringObject, End,
  1795. **    Child, Label2("Normal:"),
  1796. **    Child, StringObject, End,
  1797. **    Child, Label2("Big:"   ),
  1798. **    Child, StringObject, End,
  1799. **    Child, Label2("Huge:"  ),
  1800. **    Child, StringObject, End,
  1801. **    End,
  1802. **
  1803. ** Note that we have three versions of the label macro, depending on
  1804. ** the frame type of the right hand object:
  1805. **
  1806. ** Label1(): For use with standard frames (e.g. checkmarks).
  1807. ** Label2(): For use with double high frames (e.g. string gadgets).
  1808. ** Label() : For use with objects without a frame.
  1809. **
  1810. ** These macros ensure that your label will look fine even if the
  1811. ** user of your application configured some strange spacing values.
  1812. ** If you want to use your own labeling, you'll have to pay attention
  1813. ** on this topic yourself.
  1814. **
  1815. ****************************************************************************
  1816.  
  1817. ****************************************************************************
  1818. ***
  1819. *** And the above C example in assembler:
  1820. ***
  1821. *** ColGroup 2
  1822. ***   Childi Label2,small
  1823. ***   Child2 StringObject,Endi
  1824. ***   Childi Label2,normal
  1825. ***   Child2 StringObject,Endi
  1826. ***   Childi Label2,big
  1827. ***   Child2 StringObject,Endi
  1828. ***   Childi Label2,huge
  1829. ***   Child2 StringObject,Endi
  1830. ***   Endi
  1831. ***
  1832. *** small   dc.b  "Small:",0
  1833. ***         even
  1834. *** normal  dc.b  "Normal:",0
  1835. ***         even
  1836. *** big     dc.b  "Big:",0
  1837. ***         even
  1838. *** huge    dc.b  "Huge:",0
  1839. ***         even
  1840. ***
  1841. ****************************************************************************
  1842.  
  1843. Label MACRO ; label
  1844.    TextObject
  1845.       MUIT MUIA_Text_PreParse,PreParse2,MUIA_Text_Contents,\1
  1846.       MUIT MUIA_Weight,0,MUIA_InnerLeft,0,MUIA_InnerRight,0
  1847.       Endi
  1848.    ENDM
  1849.  
  1850. Label1 MACRO ; label
  1851.    TextObject
  1852.       MUIT MUIA_Text_PreParse,PreParse2,MUIA_Text_Contents,\1
  1853.       MUIT MUIA_Weight,0,MUIA_InnerLeft,0,MUIA_InnerRight,0
  1854.       ButtonFrame
  1855.       MUIT MUIA_FramePhantomHoriz,TRUE
  1856.       Endi
  1857.    ENDM
  1858.  
  1859. Label2 MACRO ; label
  1860.    TextObject
  1861.       MUIT MUIA_Text_PreParse,PreParse2,MUIA_Text_Contents,\1,
  1862.       MUIT MUIA_Weight,0,MUIA_InnerLeft,0,MUIA_InnerRight,0
  1863.       StringFrame
  1864.       MUIT MUIA_FramePhantomHoriz,TRUE
  1865.       Endi
  1866.    ENDM
  1867.  
  1868. KeyLabel MACRO ; label,hichar
  1869.    TextObject
  1870.       MUIT MUIA_Text_PreParse,PreParse2,MUIA_Text_Contents,\1
  1871.       MUIT MUIA_Weight,0,MUIA_InnerLeft,0,MUIA_InnerRight,0,
  1872.       MUIT MUIA_Text_HiChar,\2
  1873.       Endi
  1874.    ENDM
  1875.  
  1876. KeyLabel1 MACRO ; label,hichar
  1877.    TextObject
  1878.       MUIT MUIA_Text_PreParse,PreParse2,MUIA_Text_Contents,\1
  1879.       MUIT MUIA_Weight,0,MUIA_InnerLeft,0,MUIA_InnerRight,0
  1880.       MUIT MUIA_Text_HiChar,\2
  1881.       ButtonFrame
  1882.       MUIT MUIA_FramePhantomHoriz,TRUE
  1883.       Endi
  1884.    ENDM
  1885.  
  1886. KeyLabel2 MACRO ; label,hichar
  1887.    TextObject
  1888.       MUIT MUIA_Text_PreParse,PreParse2,MUIA_Text_Contents,\1
  1889.       MUIT MUIA_Weight,0,MUIA_InnerLeft,0,MUIA_InnerRight,0
  1890.       MUIT MUIA_Text_HiChar,\2
  1891.       StringFrame
  1892.       MUIT MUIA_FramePhantomHoriz,TRUE
  1893.       Endi
  1894.    ENDM
  1895.  
  1896.  
  1897.  
  1898. ****************************************************************************
  1899. **
  1900. ** Controlling Objects
  1901. ** -------------------
  1902. **
  1903. ** set() and get() are two short stubs for BOOPSI GetAttr() and SetAttrs()
  1904. ** calls:
  1905. **
  1906. ** {
  1907. **    char *x;
  1908. **
  1909. **    set(obj,MUIA_String_Contents,"foobar");
  1910. **    get(obj,MUIA_String_Contents,&x);
  1911. **
  1912. **    printf("gadget contains '%s'\n",x);
  1913. ** }
  1914. **
  1915. ****************************************************************************
  1916.  
  1917. ****************************************************************************
  1918. ***
  1919. *** And the above C example in assembler:
  1920. ***
  1921. *** seti obj,#MUIA_String_Contents,#foobar
  1922. *** geti obj,#MUIA_String_Contents,#x
  1923. ***   move.l   #myfmt,d1
  1924. ***   move.l   #data,d2
  1925. ***   CALLDOS VPrintf
  1926. ***
  1927. *** foobar     dc.b  "foobar",0
  1928. ***            even
  1929. *** data       dc.l  x
  1930. *** x          dcb.b 10
  1931. *** myfmt      dc.b  "gadget contains '%s'",10,0
  1932. ***            even
  1933. ***
  1934. *** The names of the set and get macros have been changed to seti and geti
  1935. *** since most assemblers already have the pseudo op-code SET.
  1936. *** Note that seti is designed to take multiple tagitems (max 8).
  1937. ***
  1938. ****************************************************************************
  1939.  
  1940. geti  MACRO ; obj,attr,store
  1941.       move.l   \2,d0
  1942.       move.l   \1,a0
  1943.       move.l   \3,a1
  1944.       CALLINT GetAttr
  1945.       ENDM
  1946. seti  MACRO ; obj,attr,value [,attr,value,...]
  1947.       move.l   sp,a2
  1948.       cmv3     #TAG_DONE
  1949.       cmv3     \9
  1950.       cmv3     \8
  1951.       cmv3     \7
  1952.       cmv3     \6
  1953.       cmv3     \5
  1954.       cmv3     \4
  1955.       cmv3     \3
  1956.       cmv3     \2
  1957.       move.l   \1,a0
  1958.       move.l   sp,a1
  1959.       CALLINT SetAttrsA
  1960.       move.l   a2,sp
  1961.       ENDM
  1962.  
  1963. setmutex MACRO ; obj,n
  1964.       seti \1,#MUIA_Radio_Active,\2
  1965.       ENDM
  1966. setcycle MACRO ; obj,n
  1967.       seti \1,#MUIA_Cycle_Active,\2
  1968.       ENDM
  1969. setstring MACRO ; obj,s
  1970.       seti \1,#MUIA_String_Contents,\2
  1971.       ENDM
  1972. setcheckmark MACRO ; obj,b
  1973.       seti \1,#MUIA_Selected,\2
  1974.       ENDM
  1975. setslider MACRO ; obj,l
  1976.       seti \1,#MUIA_Slider_Level,\2
  1977.       ENDM
  1978.  
  1979.  
  1980.    ENDC  ;MUI_NOSHORTCUTS
  1981.  
  1982.    ENDC  ;LIBRARIES_MUI_I
  1983.