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