home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 5 / FreshFish_July-August1994.bin / bbs / util / yak-1.59.lha / Yak-1.59 / Src / gui.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-05-26  |  8.6 KB  |  278 lines

  1. /*
  2.  *  Source machine generated by GadToolsBox V2.0b
  3.  *  which is (c) Copyright 1991-1993 Jaba Development
  4.  *
  5.  *  GUI Designed by : Martin W Scott
  6.  */
  7.  
  8. #define GetString(g) (((struct StringInfo *)g->SpecialInfo)->Buffer )
  9. #define GetNumber(g) (((struct StringInfo *)g->SpecialInfo)->LongInt)
  10.  
  11. /* Windows identifiers */
  12.  
  13. #define NO_WINDOW          0
  14. #define ROOT_WINDOW        1
  15. #define HOTKEY_WINDOW      2
  16. #define MISC_WINDOW        3
  17. #define BLANK_WINDOW       4
  18. #define KEYDEF_WINDOW      5
  19.     
  20. /* Root Window gadgets */
  21.  
  22. #define GD_Hide            0
  23. #define GD_Quit            1
  24. #define GD_AutoCheck       2
  25. #define GD_KeyActCheck     3
  26. #define GD_CTFCheck        4
  27. #define GD_CTBCheck        5
  28. #define GD_ScrCycleCheck   6
  29. #define GD_ScrActCheck     7
  30. #define GD_AutoPopCheck    8
  31. #define GD_RMBActCheck     9
  32. #define GD_Miscellaneous  10
  33. #define GD_EditHotkeys    11
  34. #define GD_AutoPat        12
  35. #define GD_ClickPat       13
  36. #define GD_PopPat         14
  37. #define GD_ClickWinPat    15
  38. #define GD_MMBActCheck    16
  39. #define GD_Blanking       17
  40.  
  41. #define GDX_Hide            0
  42. #define GDX_Quit            1
  43. #define GDX_AutoCheck       2
  44. #define GDX_KeyActCheck     3
  45. #define GDX_CTFCheck        4
  46. #define GDX_CTBCheck        5
  47. #define GDX_ScrCycleCheck   6
  48. #define GDX_ScrActCheck     7
  49. #define GDX_AutoPopCheck    8
  50. #define GDX_RMBActCheck     9
  51. #define GDX_Miscellaneous  10
  52. #define GDX_EditHotkeys    11
  53. #define GDX_AutoPat        12
  54. #define GDX_ClickPat       13
  55. #define GDX_PopPat         14
  56. #define GDX_ClickWinPat    15
  57. #define GDX_MMBActCheck    16
  58. #define GDX_Blanking       17
  59.  
  60.  
  61. /* HotKeys Window gadgets */
  62.  
  63. #define GD_Hotkeys         0
  64. #define GD_Actions         1
  65. #define GD_Argument        2
  66. #define GD_Options         3
  67. #define GD_Add             4
  68. #define GD_Delete          5
  69. #define GD_Return          6
  70.  
  71. #define GDX_Hotkeys        0
  72. #define GDX_Actions        1
  73. #define GDX_Argument       2
  74. #define GDX_Options        3
  75. #define GDX_Add            4
  76. #define GDX_Delete         5
  77. #define GDX_Return         6
  78.  
  79. /* Miscellaneous Window gadgets */
  80.  
  81. #define GD_ClickVol              0
  82. #define GD_AutoPointDelay        1
  83. #define GD_Return2               2
  84. #define GD_BlackBorderCheck      3
  85. #define GD_WildStarCheck         4
  86. #define GD_NoClickCheck          5
  87.  
  88. #define GDX_ClickVol             0
  89. #define GDX_AutoPointDelay       1
  90. #define GDX_Return2              2
  91. #define GDX_BlackBorderCheck     3
  92. #define GDX_WildStarCheck        4
  93. #define GDX_NoClickCheck         5
  94.  
  95. /* Blanking Window gadgets */
  96.  
  97. #define GD_ScrTONum         0
  98. #define GD_MouseTONum       1
  99. #define GD_MBMethod         2
  100. #define GD_Return3          3
  101. #define GD_BlankMouseOnKey  4
  102.  
  103. #define GDX_ScrTONum        0
  104. #define GDX_MouseTONum      1
  105. #define GDX_MBMethod        2
  106. #define GDX_Return3         3
  107. #define GDX_BlankMouseOnKey 4
  108.  
  109.  
  110. /* KeyDef window gadgets */
  111.  
  112. #define GD_Class             0
  113. #define GD_Stroke            1
  114. #define GD_Desc              2
  115. #define GD_Ok                3
  116. #define GD_Cancel            4
  117.  
  118. #define GDX_Class            0
  119. #define GDX_Stroke           1
  120. #define GDX_Desc             2
  121. #define GDX_Ok               3
  122. #define GDX_Cancel           4
  123.  
  124.  
  125. /* Number of gadgets for each window */
  126.  
  127. #define Root_CNT          18
  128. #define HotKey_CNT         7
  129. #define Misc_CNT           6
  130. #define Blank_CNT          5
  131. #define KeyDef_CNT         5
  132.  
  133.  
  134.  
  135. /* Global variables */
  136.  
  137.  
  138. GLOBAL struct Library      *GadToolsBase;
  139. GLOBAL struct Screen       *Scr;
  140. GLOBAL struct Window       *curwin;
  141. GLOBAL UBYTE               *PubScreenName;
  142. GLOBAL APTR                 VisualInfo;
  143. GLOBAL struct Window       *RootWnd;
  144. GLOBAL struct Window       *HotKeyWnd;
  145. GLOBAL struct Window       *MiscWnd;
  146. GLOBAL struct Window       *BlankWnd;
  147.  
  148. GLOBAL struct Gadget       *RootGList;
  149. GLOBAL struct Gadget       *HotKeyGList;
  150. GLOBAL struct Gadget       *MiscGList;
  151. GLOBAL struct Gadget       *BlankGList;
  152. GLOBAL struct Menu         *RootMenus;
  153. GLOBAL struct Gadget       *RootGadgets[Root_CNT];
  154. GLOBAL struct Gadget       *HotKeyGadgets[HotKey_CNT];
  155. GLOBAL struct Gadget       *MiscGadgets[Misc_CNT];
  156. GLOBAL struct Gadget       *BlankGadgets[Blank_CNT];
  157. GLOBAL UWORD                RootLeft;
  158. GLOBAL UWORD                RootWidth;
  159. GLOBAL UWORD                RootHeight;
  160. GLOBAL UWORD                HotKeyLeft;
  161. GLOBAL UWORD                HotKeyWidth;
  162. GLOBAL UWORD                HotKeyHeight;
  163. GLOBAL UWORD                MiscLeft;
  164. GLOBAL UWORD                MiscWidth;
  165. GLOBAL UWORD                MiscHeight;
  166. GLOBAL UWORD                BlankLeft;
  167. GLOBAL UWORD                BlankWidth;
  168. GLOBAL UWORD                BlankHeight;
  169. GLOBAL UBYTE               *RootWdt;
  170. GLOBAL UBYTE               *HotKeyWdt;
  171. GLOBAL UBYTE               *MiscWdt;
  172. GLOBAL UBYTE               *BlankWdt;
  173. GLOBAL UWORD                WindowTop;
  174. GLOBAL struct TextAttr     *Font, Attr;
  175. GLOBAL UWORD                FontX, FontY;
  176. GLOBAL UWORD                OffX, OffY;
  177. GLOBAL UBYTE               *MBMethod0Labels[];
  178. GLOBAL UBYTE               *Options1Labels[];
  179. GLOBAL struct MinList       Actions1List;
  180. GLOBAL struct IntuiText     RootIText[];
  181. GLOBAL struct IntuiText     BlankIText[];
  182. GLOBAL struct NewMenu       RootNewMenu[];
  183. GLOBAL UWORD                RootGTypes[];
  184. GLOBAL UWORD                HotKeyGTypes[];
  185. GLOBAL UWORD                MiscGTypes[];
  186. GLOBAL UWORD                BlankGTypes[];
  187. GLOBAL struct NewGadget     RootNGad[];
  188. GLOBAL struct NewGadget     HotKeyNGad[];
  189. GLOBAL struct NewGadget     MiscNGad[];
  190. GLOBAL struct NewGadget     BlankNGad[];
  191. GLOBAL ULONG                RootGTags[];
  192. GLOBAL ULONG                HotKeyGTags[];
  193. GLOBAL ULONG                MiscGTags[];
  194. GLOBAL ULONG                BlankGTags[];
  195. GLOBAL struct               Node Actions1Nodes[];
  196.  
  197.  
  198.  
  199. GLOBAL struct Window        *KeyDefWnd;
  200. GLOBAL struct Gadget        *KeyDefGList;
  201. GLOBAL struct Gadget        *KeyDefGadgets[KeyDef_CNT];
  202. GLOBAL UWORD                 KeyDefLeft;
  203. GLOBAL UWORD                 KeyDefTop;
  204. GLOBAL UWORD                 KeyDefWidth;
  205. GLOBAL UWORD                 KeyDefHeight;
  206. GLOBAL UBYTE                *KeyDefWdt;
  207. GLOBAL UBYTE                *Class0Labels[];
  208. GLOBAL UBYTE                *Stroke0Labels[];
  209. GLOBAL UWORD                 KeyDefGTypes[];
  210. GLOBAL struct NewGadget      KeyDefNGad[];
  211. GLOBAL ULONG                 KeyDefGTags[];
  212.  
  213.  
  214. /* Functions prototypes */
  215.  
  216. GLOBAL VOID  InitMBMethod0Labels (VOID);
  217. GLOBAL VOID  InitOptions1Label   (VOID);
  218. GLOBAL VOID  InitActions1Nodes   (VOID);
  219. GLOBAL VOID  InitClass0Labels    (VOID);
  220. GLOBAL VOID  InitStroke0Labels   (VOID);
  221. GLOBAL VOID  InitBlankNGad       (VOID);
  222. GLOBAL VOID  InitHotKeyNGad      (VOID);
  223. GLOBAL VOID  InitMiscNGad        (VOID);
  224. GLOBAL VOID  InitKeyDefNGad      (VOID);
  225. GLOBAL VOID  InitRootIText       (VOID);
  226. GLOBAL int   SetupScreen         (VOID);
  227. GLOBAL VOID  CloseDownScreen     (VOID);
  228. GLOBAL VOID  RootRender          (VOID);
  229. GLOBAL int   OpenRootWindow      (VOID);
  230. GLOBAL VOID  CloseRootWindow     (VOID);
  231. GLOBAL VOID  HotKeyRender        (VOID);
  232. GLOBAL int   OpenHotKeyWindow    (VOID);
  233. GLOBAL VOID  CloseHotKeyWindow   (VOID);
  234. GLOBAL VOID  MiscRender          (VOID);
  235. GLOBAL int   OpenMiscWindow      (VOID);
  236. GLOBAL VOID  CloseMiscWindow     (VOID);
  237. GLOBAL VOID  BlankRender         (VOID);
  238. GLOBAL int   OpenBlankWindow     (VOID);
  239. GLOBAL VOID  CloseBlankWindow    (VOID);
  240. GLOBAL VOID CloseKeyDefWindow    ( VOID );
  241. GLOBAL int   OpenKeyDefWindow    ( VOID );
  242. GLOBAL VOID  KeyDefRender        ( VOID );
  243. GLOBAL VOID  InitGUI             (VOID);
  244. GLOBAL UBYTE *GetPubScreenName   (struct Screen *s);
  245. GLOBAL UWORD ComputeX            (UWORD value);
  246. GLOBAL UWORD ComputeY            (UWORD value);
  247. GLOBAL VOID  ComputeFont         (UWORD width,UWORD height);
  248. GLOBAL VOID  CloseOneWindow      (struct Window *Wnd, struct Menu *Menus, struct Gadget *GList);
  249. GLOBAL LONG  HandleBlankIDCMP    (VOID);
  250. GLOBAL LONG  HandleMiscIDCMP     (VOID);
  251. GLOBAL LONG  HandleHotKeyIDCMP   (VOID);
  252. GLOBAL LONG  HandleRootIDCMP     (VOID);
  253. GLOBAL LONG  HandleKeyDefIDCMP   (VOID);
  254. GLOBAL __regargs VOID InitToggleGadgets( UBYTE WindowID );
  255. GLOBAL __regargs VOID InitWindowGadget(UWORD num, LONG tagtype, LONG tagvalue, UBYTE WindowID);
  256. GLOBAL BOOL  ShowBlankWindow     (VOID);
  257. GLOBAL BOOL  ShowHotKeyWindow    (VOID);
  258. GLOBAL BOOL  ShowMiscWindow      (VOID);
  259. GLOBAL BOOL  ShowRootWindow      (VOID);
  260. GLOBAL BOOL  ShowKeyDefWindow    (VOID);
  261. GLOBAL VOID  UpdateWindowsPosition (VOID);
  262. GLOBAL BOOL  SwitchToKeyDefWindow(VOID);
  263.  
  264.  
  265.  
  266. #ifndef GTMN_NewLookMenus
  267. #define GTMN_NewLookMenus GT_TagBase+67
  268. #endif
  269.  
  270. #ifndef WA_NewLookMenus
  271. #define WA_NewLookMenus WA_Dummy+0x30
  272. #endif
  273.  
  274. /* other changes: CreateMenus call and OpenWindow call for NewLookMenus */
  275.  
  276. #include <graphics/text.h>
  277. #define CalcFontX() (TextLength(&Scr->RastPort,"ABCDEFGHIJKLMNOPQRSTUVWXYZ",26)/26)
  278.