Guido van Rossum | 5f5b137 | 1991-11-12 15:33:59 +0000 | [diff] [blame] | 1 | # Constants used by the FORMS library (module fl). |
| 2 | # This corresponds to "forms.h". |
| 3 | # Recommended use: import FL; ... FL.NORMAL_BOX ... etc. |
Guido van Rossum | d39e412 | 1991-12-12 17:39:09 +0000 | [diff] [blame] | 4 | # Alternate use: from FL import *; ... NORMAL_BOX ... etc. |
Guido van Rossum | 5f5b137 | 1991-11-12 15:33:59 +0000 | [diff] [blame] | 5 | |
Guido van Rossum | 26e67b0 | 1992-03-27 15:14:25 +0000 | [diff] [blame^] | 6 | _v20 = 1 |
| 7 | ##import fl |
| 8 | ##try: |
| 9 | ## _v20 = (fl.get_rgbmode <> None) |
| 10 | ##except: |
| 11 | ## _v20 = 0 |
| 12 | ##del fl |
Guido van Rossum | ccf0ca2 | 1991-12-10 13:49:34 +0000 | [diff] [blame] | 13 | |
Guido van Rossum | d085cc6 | 1991-08-16 13:15:56 +0000 | [diff] [blame] | 14 | NULL = 0 |
| 15 | FALSE = 0 |
| 16 | TRUE = 1 |
| 17 | |
| 18 | EVENT = -1 |
| 19 | |
| 20 | LABEL_SIZE = 64 |
Guido van Rossum | d39e412 | 1991-12-12 17:39:09 +0000 | [diff] [blame] | 21 | if _v20: |
| 22 | SHORTCUT_SIZE = 32 |
Guido van Rossum | d085cc6 | 1991-08-16 13:15:56 +0000 | [diff] [blame] | 23 | PLACE_FREE = 0 |
| 24 | PLACE_SIZE = 1 |
| 25 | PLACE_ASPECT = 2 |
| 26 | PLACE_MOUSE = 3 |
| 27 | PLACE_CENTER = 4 |
| 28 | PLACE_POSITION = 5 |
| 29 | FIND_INPUT = 0 |
| 30 | FIND_AUTOMATIC = 1 |
| 31 | FIND_MOUSE = 2 |
| 32 | BEGIN_GROUP = 10000 |
| 33 | END_GROUP = 20000 |
| 34 | ALIGN_TOP = 0 |
| 35 | ALIGN_BOTTOM = 1 |
| 36 | ALIGN_LEFT = 2 |
| 37 | ALIGN_RIGHT = 3 |
| 38 | ALIGN_CENTER = 4 |
| 39 | NO_BOX = 0 |
| 40 | UP_BOX = 1 |
| 41 | DOWN_BOX = 2 |
| 42 | FLAT_BOX = 3 |
| 43 | BORDER_BOX = 4 |
| 44 | SHADOW_BOX = 5 |
| 45 | FRAME_BOX = 6 |
Guido van Rossum | 5f5b137 | 1991-11-12 15:33:59 +0000 | [diff] [blame] | 46 | ROUNDED_BOX = 7 |
| 47 | RFLAT_BOX = 8 |
| 48 | RSHADOW_BOX = 9 |
Guido van Rossum | d085cc6 | 1991-08-16 13:15:56 +0000 | [diff] [blame] | 49 | TOP_BOUND_COL = 51 |
| 50 | LEFT_BOUND_COL = 55 |
| 51 | BOT_BOUND_COL = 40 |
| 52 | RIGHT_BOUND_COL = 35 |
| 53 | COL1 = 47 |
| 54 | MCOL = 49 |
| 55 | LCOL = 0 |
| 56 | BOUND_WIDTH = 3.0 |
| 57 | DRAW = 0 |
| 58 | PUSH = 1 |
| 59 | RELEASE = 2 |
| 60 | ENTER = 3 |
| 61 | LEAVE = 4 |
| 62 | MOUSE = 5 |
| 63 | FOCUS = 6 |
| 64 | UNFOCUS = 7 |
| 65 | KEYBOARD = 8 |
| 66 | STEP = 9 |
| 67 | MOVE = 10 |
| 68 | FONT_NAME = 'Helvetica' |
| 69 | FONT_BOLDNAME = 'Helvetica-Bold' |
| 70 | FONT_ITALICNAME = 'Helvetica-Oblique' |
| 71 | FONT_FIXEDNAME = 'Courier' |
Guido van Rossum | 5f5b137 | 1991-11-12 15:33:59 +0000 | [diff] [blame] | 72 | FONT_ICONNAME = 'Icon' |
Guido van Rossum | d085cc6 | 1991-08-16 13:15:56 +0000 | [diff] [blame] | 73 | SMALL_FONT = 8.0 |
| 74 | NORMAL_FONT = 11.0 |
| 75 | LARGE_FONT = 20.0 |
| 76 | NORMAL_STYLE = 0 |
| 77 | BOLD_STYLE = 1 |
| 78 | ITALIC_STYLE = 2 |
| 79 | FIXED_STYLE = 3 |
| 80 | ENGRAVED_STYLE = 4 |
Guido van Rossum | 5f5b137 | 1991-11-12 15:33:59 +0000 | [diff] [blame] | 81 | ICON_STYLE = 5 |
Guido van Rossum | d085cc6 | 1991-08-16 13:15:56 +0000 | [diff] [blame] | 82 | BITMAP = 3 |
| 83 | NORMAL_BITMAP = 0 |
| 84 | BITMAP_BOXTYPE = NO_BOX |
| 85 | BITMAP_COL1 = 0 |
| 86 | BITMAP_COL2 = COL1 |
| 87 | BITMAP_LCOL = LCOL |
| 88 | BITMAP_ALIGN = ALIGN_BOTTOM |
| 89 | BITMAP_MAXSIZE = 128*128 |
| 90 | BITMAP_BW = BOUND_WIDTH |
| 91 | BOX = 1 |
| 92 | BOX_BOXTYPE = UP_BOX |
| 93 | BOX_COL1 = COL1 |
| 94 | BOX_LCOL = LCOL |
| 95 | BOX_ALIGN = ALIGN_CENTER |
| 96 | BOX_BW = BOUND_WIDTH |
| 97 | BROWSER = 71 |
| 98 | NORMAL_BROWSER = 0 |
| 99 | SELECT_BROWSER = 1 |
| 100 | HOLD_BROWSER = 2 |
| 101 | MULTI_BROWSER = 3 |
| 102 | BROWSER_BOXTYPE = DOWN_BOX |
| 103 | BROWSER_COL1 = COL1 |
| 104 | BROWSER_COL2 = 3 |
| 105 | BROWSER_LCOL = LCOL |
| 106 | BROWSER_ALIGN = ALIGN_BOTTOM |
| 107 | BROWSER_SLCOL = COL1 |
| 108 | BROWSER_BW = BOUND_WIDTH |
| 109 | BROWSER_LINELENGTH = 128 |
| 110 | BROWSER_MAXLINE = 512 |
| 111 | BUTTON = 11 |
| 112 | NORMAL_BUTTON = 0 |
| 113 | PUSH_BUTTON = 1 |
| 114 | RADIO_BUTTON = 2 |
| 115 | HIDDEN_BUTTON = 3 |
| 116 | TOUCH_BUTTON = 4 |
| 117 | INOUT_BUTTON = 5 |
| 118 | RETURN_BUTTON = 6 |
Guido van Rossum | d39e412 | 1991-12-12 17:39:09 +0000 | [diff] [blame] | 119 | if _v20: |
| 120 | HIDDEN_RET_BUTTON = 7 |
Guido van Rossum | d085cc6 | 1991-08-16 13:15:56 +0000 | [diff] [blame] | 121 | BUTTON_BOXTYPE = UP_BOX |
| 122 | BUTTON_COL1 = COL1 |
| 123 | BUTTON_COL2 = COL1 |
| 124 | BUTTON_LCOL = LCOL |
| 125 | BUTTON_ALIGN = ALIGN_CENTER |
| 126 | BUTTON_MCOL1 = MCOL |
| 127 | BUTTON_MCOL2 = MCOL |
| 128 | BUTTON_BW = BOUND_WIDTH |
Guido van Rossum | d39e412 | 1991-12-12 17:39:09 +0000 | [diff] [blame] | 129 | if _v20: |
| 130 | CHART = 4 |
| 131 | BAR_CHART = 0 |
| 132 | HORBAR_CHART = 1 |
| 133 | LINE_CHART = 2 |
| 134 | FILLED_CHART = 3 |
| 135 | SPIKE_CHART = 4 |
| 136 | PIE_CHART = 5 |
| 137 | SPECIALPIE_CHART = 6 |
| 138 | CHART_BOXTYPE = BORDER_BOX |
| 139 | CHART_COL1 = COL1 |
| 140 | CHART_LCOL = LCOL |
| 141 | CHART_ALIGN = ALIGN_BOTTOM |
| 142 | CHART_BW = BOUND_WIDTH |
| 143 | CHART_MAX = 128 |
Guido van Rossum | d085cc6 | 1991-08-16 13:15:56 +0000 | [diff] [blame] | 144 | CHOICE = 42 |
| 145 | NORMAL_CHOICE = 0 |
| 146 | CHOICE_BOXTYPE = DOWN_BOX |
| 147 | CHOICE_COL1 = COL1 |
| 148 | CHOICE_COL2 = LCOL |
| 149 | CHOICE_LCOL = LCOL |
| 150 | CHOICE_ALIGN = ALIGN_LEFT |
| 151 | CHOICE_BW = BOUND_WIDTH |
| 152 | CHOICE_MCOL = MCOL |
| 153 | CHOICE_MAXITEMS = 128 |
| 154 | CHOICE_MAXSTR = 64 |
| 155 | CLOCK = 61 |
| 156 | SQUARE_CLOCK = 0 |
| 157 | ROUND_CLOCK = 1 |
| 158 | CLOCK_BOXTYPE = UP_BOX |
| 159 | CLOCK_COL1 = 37 |
| 160 | CLOCK_COL2 = 42 |
| 161 | CLOCK_LCOL = LCOL |
| 162 | CLOCK_ALIGN = ALIGN_BOTTOM |
| 163 | CLOCK_TOPCOL = COL1 |
| 164 | CLOCK_BW = BOUND_WIDTH |
| 165 | COUNTER = 25 |
| 166 | NORMAL_COUNTER = 0 |
| 167 | SIMPLE_COUNTER = 1 |
| 168 | COUNTER_BOXTYPE = UP_BOX |
| 169 | COUNTER_COL1 = COL1 |
| 170 | COUNTER_COL2 = 4 |
| 171 | COUNTER_LCOL = LCOL |
| 172 | COUNTER_ALIGN = ALIGN_BOTTOM |
Guido van Rossum | d39e412 | 1991-12-12 17:39:09 +0000 | [diff] [blame] | 173 | if _v20: |
| 174 | COUNTER_BW = BOUND_WIDTH |
| 175 | else: |
| 176 | DEFAULT = 51 |
| 177 | RETURN_DEFAULT = 0 |
| 178 | ALWAYS_DEFAULT = 1 |
Guido van Rossum | d085cc6 | 1991-08-16 13:15:56 +0000 | [diff] [blame] | 179 | DIAL = 22 |
| 180 | NORMAL_DIAL = 0 |
| 181 | LINE_DIAL = 1 |
| 182 | DIAL_BOXTYPE = NO_BOX |
| 183 | DIAL_COL1 = COL1 |
| 184 | DIAL_COL2 = 37 |
| 185 | DIAL_LCOL = LCOL |
| 186 | DIAL_ALIGN = ALIGN_BOTTOM |
| 187 | DIAL_TOPCOL = COL1 |
| 188 | DIAL_BW = BOUND_WIDTH |
| 189 | FREE = 101 |
| 190 | NORMAL_FREE = 1 |
| 191 | SLEEPING_FREE = 2 |
| 192 | INPUT_FREE = 3 |
| 193 | CONTINUOUS_FREE = 4 |
| 194 | ALL_FREE = 5 |
| 195 | INPUT = 31 |
| 196 | NORMAL_INPUT = 0 |
Guido van Rossum | d39e412 | 1991-12-12 17:39:09 +0000 | [diff] [blame] | 197 | if _v20: |
| 198 | FLOAT_INPUT = 1 |
| 199 | INT_INPUT = 2 |
| 200 | HIDDEN_INPUT = 3 |
Guido van Rossum | ccf0ca2 | 1991-12-10 13:49:34 +0000 | [diff] [blame] | 201 | else: |
Guido van Rossum | d39e412 | 1991-12-12 17:39:09 +0000 | [diff] [blame] | 202 | ALWAYS_INPUT = 1 |
Guido van Rossum | d085cc6 | 1991-08-16 13:15:56 +0000 | [diff] [blame] | 203 | INPUT_BOXTYPE = DOWN_BOX |
| 204 | INPUT_COL1 = 13 |
| 205 | INPUT_COL2 = 5 |
| 206 | INPUT_LCOL = LCOL |
| 207 | INPUT_ALIGN = ALIGN_LEFT |
| 208 | INPUT_TCOL = LCOL |
| 209 | INPUT_CCOL = 4 |
| 210 | INPUT_BW = BOUND_WIDTH |
| 211 | INPUT_MAX = 128 |
| 212 | LIGHTBUTTON = 12 |
| 213 | LIGHTBUTTON_BOXTYPE = UP_BOX |
| 214 | LIGHTBUTTON_COL1 = 39 |
| 215 | LIGHTBUTTON_COL2 = 3 |
| 216 | LIGHTBUTTON_LCOL = LCOL |
| 217 | LIGHTBUTTON_ALIGN = ALIGN_CENTER |
| 218 | LIGHTBUTTON_TOPCOL = COL1 |
| 219 | LIGHTBUTTON_MCOL = MCOL |
| 220 | LIGHTBUTTON_BW1 = BOUND_WIDTH |
| 221 | LIGHTBUTTON_BW2 = BOUND_WIDTH/2.0 |
| 222 | LIGHTBUTTON_MINSIZE = 12.0 |
| 223 | MENU = 41 |
| 224 | TOUCH_MENU = 0 |
| 225 | PUSH_MENU = 1 |
| 226 | MENU_BOXTYPE = BORDER_BOX |
| 227 | MENU_COL1 = 55 |
| 228 | MENU_COL2 = 37 |
| 229 | MENU_LCOL = LCOL |
| 230 | MENU_ALIGN = ALIGN_CENTER |
| 231 | MENU_BW = BOUND_WIDTH |
| 232 | MENU_MAX = 300 |
| 233 | POSITIONER = 23 |
| 234 | NORMAL_POSITIONER = 0 |
| 235 | POSITIONER_BOXTYPE = DOWN_BOX |
| 236 | POSITIONER_COL1 = COL1 |
| 237 | POSITIONER_COL2 = 1 |
| 238 | POSITIONER_LCOL = LCOL |
| 239 | POSITIONER_ALIGN = ALIGN_BOTTOM |
| 240 | POSITIONER_BW = BOUND_WIDTH |
| 241 | ROUNDBUTTON = 13 |
| 242 | ROUNDBUTTON_BOXTYPE = NO_BOX |
| 243 | ROUNDBUTTON_COL1 = 7 |
| 244 | ROUNDBUTTON_COL2 = 3 |
| 245 | ROUNDBUTTON_LCOL = LCOL |
| 246 | ROUNDBUTTON_ALIGN = ALIGN_CENTER |
| 247 | ROUNDBUTTON_TOPCOL = COL1 |
| 248 | ROUNDBUTTON_MCOL = MCOL |
| 249 | ROUNDBUTTON_BW = BOUND_WIDTH |
| 250 | SLIDER = 21 |
| 251 | VALSLIDER = 24 |
| 252 | VERT_SLIDER = 0 |
| 253 | HOR_SLIDER = 1 |
| 254 | VERT_FILL_SLIDER = 2 |
| 255 | HOR_FILL_SLIDER = 3 |
Guido van Rossum | ccf0ca2 | 1991-12-10 13:49:34 +0000 | [diff] [blame] | 256 | VERT_NICE_SLIDER = 4 |
| 257 | HOR_NICE_SLIDER = 5 |
Guido van Rossum | d085cc6 | 1991-08-16 13:15:56 +0000 | [diff] [blame] | 258 | SLIDER_BOXTYPE = DOWN_BOX |
| 259 | SLIDER_COL1 = COL1 |
| 260 | SLIDER_COL2 = COL1 |
| 261 | SLIDER_LCOL = LCOL |
| 262 | SLIDER_ALIGN = ALIGN_BOTTOM |
| 263 | SLIDER_BW1 = BOUND_WIDTH |
| 264 | SLIDER_BW2 = BOUND_WIDTH*0.75 |
| 265 | SLIDER_FINE = 0.05 |
| 266 | SLIDER_WIDTH = 0.08 |
| 267 | TEXT = 2 |
| 268 | NORMAL_TEXT = 0 |
| 269 | TEXT_BOXTYPE = NO_BOX |
| 270 | TEXT_COL1 = COL1 |
| 271 | TEXT_LCOL = LCOL |
| 272 | TEXT_ALIGN = ALIGN_LEFT |
| 273 | TEXT_BW = BOUND_WIDTH |
| 274 | TIMER = 62 |
| 275 | NORMAL_TIMER = 0 |
| 276 | VALUE_TIMER = 1 |
| 277 | HIDDEN_TIMER = 2 |
| 278 | TIMER_BOXTYPE = DOWN_BOX |
| 279 | TIMER_COL1 = COL1 |
| 280 | TIMER_COL2 = 1 |
| 281 | TIMER_LCOL = LCOL |
| 282 | TIMER_ALIGN = ALIGN_CENTER |
| 283 | TIMER_BW = BOUND_WIDTH |
| 284 | TIMER_BLINKRATE = 0.2 |