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