home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d502 / cells.lha / CELLS / CELLSSource.lzh / cGadget.h < prev    next >
C/C++ Source or Header  |  1991-04-20  |  3KB  |  135 lines

  1. /*
  2.  *  CELLS       An Implementation of the WireWorld cellular automata
  3.  *              as described in Scientific American, Jan 1990.
  4.  *
  5.  *              Copyright 1990 by Davide P. Cervone.
  6.  *  You may use this code, provided this copyright notice is kept intact.
  7.  *  See the CELLS.HELP file for complete information on distribution conditions.
  8.  */
  9.  
  10. /*
  11.  *  File:  cGadget.h            Defines for main Control Panel gadgets
  12.  */
  13.  
  14.  
  15. #include "Cells.h"
  16. #include "cBoxes.h"
  17.  
  18. /*
  19.  *  Gadget IDs and array positions
  20.  */
  21.  
  22. #define ID_START    0
  23. #define ID_RESET    1
  24. #define ID_SAVE     2
  25. #define ID_LOAD     3
  26. #define ID_SELECT   4
  27. #define ID_MOVE     5
  28. #define ID_CLEAR    6
  29. #define ID_PART     7
  30. #define ID_UNDO     8
  31. #define ID_HELP     9
  32. #define ID_QUIT     10
  33.  
  34. #define ID_BLANKC   11
  35. #define ID_WIREC    12
  36. #define ID_TAILC    13
  37. #define ID_HEADC    14
  38.  
  39. #define ID_SLIDEH   15
  40. #define ID_SLIDEV   16
  41. #define ID_UARROW   17
  42. #define ID_DARROW   18
  43. #define ID_LARROW   19
  44. #define ID_RARROW   20
  45. #define ID_ZOOM     21
  46. #define ID_BRDRGADG 22
  47. #define ID_IMGADG   23
  48.  
  49. #define GADGET_COUNT    24
  50. #define ID_OFFSET       25
  51. #define TEXT_OFFSET     11
  52.  
  53. #define TEXT_STOP       (TEXT_OFFSET+TEXT_OFFSET)
  54.  
  55. #define ID_STEP     (ID_START+ID_OFFSET)
  56. #define ID_WIPE     (ID_RESET+ID_OFFSET)
  57. #define ID_RENAME   (ID_SAVE+ID_OFFSET)
  58. #define ID_NEW      (ID_LOAD+ID_OFFSET)
  59. #define ID_COPY     (ID_MOVE+ID_OFFSET)
  60. #define ID_CLIP     (ID_CLEAR+ID_OFFSET)
  61. #define ID_CENTER   (ID_UNDO+ID_OFFSET)
  62. #define ID_ABOUT    (ID_HELP+ID_OFFSET)
  63. #define ID_STOP     (ID_STEP+ID_OFFSET)
  64.  
  65. #define ID_SHRINK   (ID_OFFSET-1)
  66.  
  67.  
  68. /*
  69.  * Array positions
  70.  */
  71.  
  72. #define BRDR_PANEL  0
  73. #define BRDR_FRAME1 2
  74. #define BRDR_FRAME2 4
  75. #define BRDR_FRAME3 6
  76. #define BRDR_FRAME4 8
  77. #define BRDR_FRAME5 10
  78. #define BRDR_SLIDEH 12
  79. #define BRDR_SLIDEV 14
  80. #define BRDR_BLANKC 16
  81. #define BRDR_WIREC  17
  82. #define BRDR_TAILC  18
  83. #define BRDR_HEADC  19
  84. #define BRDR_BUTTON 20
  85.  
  86. #define IM_PANEL    0
  87. #define IM_SLIDEH   1
  88. #define IM_SLIDEV   2
  89. #define IM_UARROW   3
  90. #define IM_DARROW   4
  91. #define IM_LARROW   5
  92. #define IM_RARROW   6
  93. #define IM_ZOOM     7
  94. #define IM_SHRINK   8
  95. #define IM_BLANKC   9
  96. #define IM_WIREC    10
  97. #define IM_TAILC    11
  98. #define IM_HEADC    12
  99.  
  100. #define PROP_SLIDEH     0
  101. #define PROP_SLIDEV     1
  102.  
  103.  
  104. /*
  105.  *  Sizes and screen positions
  106.  */
  107.  
  108. #define PANELW      (WINDOWW-PANELX)
  109. #define PANELH      (WINDOWH-PANELY)
  110. #define PANELX      (BOARDW+SLIDEWH)
  111. #define PANELY      0
  112.  
  113. #define FRAMEX      (BUTX-3)
  114. #define FRAMEY      (BUTY-3)
  115.  
  116. #define BUTW        42
  117. #define BUTH        12
  118. #define BUTX        (PANELX+6)
  119. #define BUTY        (CBOXY+CBOXH+10)
  120.  
  121. #define CBOXW       9
  122. #define CBOXH       9
  123. #define CBOXX       (PANELX+7)
  124. #define CBOXY       (PANELY+8)
  125.  
  126. #define CFRAMEW     (4*CBOXW+12)
  127. #define CFRAMEH     (CBOXH+8)
  128. #define CFRAMEX     (CBOXX-4)
  129. #define CFRAMEY     (CBOXY-4)
  130.  
  131. #define IS_BUTTON           BIT(31)
  132. #define BUTTON_SELECTED     BIT(30)
  133. #define BUTTON_NOSHIFT      BIT(29)
  134. #define BUTTON_RUNSHIFT     BIT(28)
  135.