blob: ef9d84114c45093d088a9516debb396c9ac9839b [file] [log] [blame]
Fred Drake295da241998-08-10 19:42:37 +00001\section{\module{fl} ---
Fred Drakef6863c11999-03-02 16:37:17 +00002 FORMS library interface for GUI applications}
Fred Drakeb91e9341998-07-23 17:59:49 +00003
Fred Drakef6863c11999-03-02 16:37:17 +00004\declaremodule{builtin}{fl}
5 \platform{IRIX}
Fred Drakeb91e9341998-07-23 17:59:49 +00006\modulesynopsis{FORMS library interface for GUI applications.}
7
Guido van Rossum5fdeeea1994-01-02 01:22:07 +00008
Fred Drake5f874d61998-03-15 01:59:57 +00009This module provides an interface to the FORMS Library\index{FORMS
10Library} by Mark Overmars\index{Overmars, Mark}. The source for the
11library can be retrieved by anonymous ftp from host
12\samp{ftp.cs.ruu.nl}, directory \file{SGI/FORMS}. It was last tested
13with version 2.0b.
Guido van Rossum5fdeeea1994-01-02 01:22:07 +000014
Fred Drakef6863c11999-03-02 16:37:17 +000015Most functions are literal translations of their C equivalents,
Guido van Rossum470be141995-03-17 16:07:09 +000016dropping the initial \samp{fl_} from their name. Constants used by
Fred Drakef6863c11999-03-02 16:37:17 +000017the library are defined in module \refmodule{FL} described below.
Guido van Rossum5fdeeea1994-01-02 01:22:07 +000018
19The creation of objects is a little different in Python than in C:
20instead of the `current form' maintained by the library to which new
21FORMS objects are added, all functions that add a FORMS object to a
Guido van Rossum470be141995-03-17 16:07:09 +000022form are methods of the Python object representing the form.
Guido van Rossum5fdeeea1994-01-02 01:22:07 +000023Consequently, there are no Python equivalents for the C functions
Fred Drake0cf0cfb1998-02-19 20:59:19 +000024\cfunction{fl_addto_form()} and \cfunction{fl_end_form()}, and the
25equivalent of \cfunction{fl_bgn_form()} is called
26\function{fl.make_form()}.
Guido van Rossum5fdeeea1994-01-02 01:22:07 +000027
28Watch out for the somewhat confusing terminology: FORMS uses the word
29\dfn{object} for the buttons, sliders etc. that you can place in a form.
30In Python, `object' means any value. The Python interface to FORMS
31introduces two new Python object types: form objects (representing an
32entire form) and FORMS objects (representing one button, slider etc.).
Fred Drake0cf0cfb1998-02-19 20:59:19 +000033Hopefully this isn't too confusing.
Guido van Rossum5fdeeea1994-01-02 01:22:07 +000034
35There are no `free objects' in the Python interface to FORMS, nor is
36there an easy way to add object classes written in Python. The FORMS
Guido van Rossum470be141995-03-17 16:07:09 +000037interface to GL event handling is available, though, so you can mix
Guido van Rossum5fdeeea1994-01-02 01:22:07 +000038FORMS with pure GL windows.
39
Fred Drake0cf0cfb1998-02-19 20:59:19 +000040\strong{Please note:} importing \module{fl} implies a call to the GL
41function \cfunction{foreground()} and to the FORMS routine
42\cfunction{fl_init()}.
Guido van Rossum5fdeeea1994-01-02 01:22:07 +000043
Fred Drakefc576191998-04-04 07:15:02 +000044\subsection{Functions Defined in Module \module{fl}}
Guido van Rossum86cb0921995-03-20 12:59:56 +000045\nodename{FL Functions}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +000046
Fred Drake0cf0cfb1998-02-19 20:59:19 +000047Module \module{fl} defines the following functions. For more
48information about what they do, see the description of the equivalent
Fred Drakef6863c11999-03-02 16:37:17 +000049C function in the FORMS documentation:
Guido van Rossum5fdeeea1994-01-02 01:22:07 +000050
Fred Drake5f874d61998-03-15 01:59:57 +000051\begin{funcdesc}{make_form}{type, width, height}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +000052Create a form with given type, width and height. This returns a
53\dfn{form} object, whose methods are described below.
54\end{funcdesc}
55
56\begin{funcdesc}{do_forms}{}
57The standard FORMS main loop. Returns a Python object representing
58the FORMS object needing interaction, or the special value
Fred Drake0cf0cfb1998-02-19 20:59:19 +000059\constant{FL.EVENT}.
Guido van Rossum5fdeeea1994-01-02 01:22:07 +000060\end{funcdesc}
61
62\begin{funcdesc}{check_forms}{}
Fred Drake0cf0cfb1998-02-19 20:59:19 +000063Check for FORMS events. Returns what \function{do_forms()} above
64returns, or \code{None} if there is no event that immediately needs
Guido van Rossum5fdeeea1994-01-02 01:22:07 +000065interaction.
66\end{funcdesc}
67
68\begin{funcdesc}{set_event_call_back}{function}
69Set the event callback function.
70\end{funcdesc}
71
Fred Drake5f874d61998-03-15 01:59:57 +000072\begin{funcdesc}{set_graphics_mode}{rgbmode, doublebuffering}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +000073Set the graphics modes.
74\end{funcdesc}
75
76\begin{funcdesc}{get_rgbmode}{}
Fred Drakef6863c11999-03-02 16:37:17 +000077Return the current rgb mode. This is the value of the C global
Fred Drake0cf0cfb1998-02-19 20:59:19 +000078variable \cdata{fl_rgbmode}.
Guido van Rossum5fdeeea1994-01-02 01:22:07 +000079\end{funcdesc}
80
Fred Drake5f874d61998-03-15 01:59:57 +000081\begin{funcdesc}{show_message}{str1, str2, str3}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +000082Show a dialog box with a three-line message and an OK button.
83\end{funcdesc}
84
Fred Drake5f874d61998-03-15 01:59:57 +000085\begin{funcdesc}{show_question}{str1, str2, str3}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +000086Show a dialog box with a three-line message and YES and NO buttons.
87It returns \code{1} if the user pressed YES, \code{0} if NO.
88\end{funcdesc}
89
Fred Drakefc576191998-04-04 07:15:02 +000090\begin{funcdesc}{show_choice}{str1, str2, str3, but1\optional{,
91 but2\optional{, but3}}}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +000092Show a dialog box with a three-line message and up to three buttons.
93It returns the number of the button clicked by the user
94(\code{1}, \code{2} or \code{3}).
Guido van Rossum5fdeeea1994-01-02 01:22:07 +000095\end{funcdesc}
96
Fred Drake5f874d61998-03-15 01:59:57 +000097\begin{funcdesc}{show_input}{prompt, default}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +000098Show a dialog box with a one-line prompt message and text field in
99which the user can enter a string. The second argument is the default
100input string. It returns the string value as edited by the user.
101\end{funcdesc}
102
Fred Drake5f874d61998-03-15 01:59:57 +0000103\begin{funcdesc}{show_file_selector}{message, directory, pattern, default}
Guido van Rossum470be141995-03-17 16:07:09 +0000104Show a dialog box in which the user can select a file. It returns
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000105the absolute filename selected by the user, or \code{None} if the user
106presses Cancel.
107\end{funcdesc}
108
109\begin{funcdesc}{get_directory}{}
110\funcline{get_pattern}{}
111\funcline{get_filename}{}
112These functions return the directory, pattern and filename (the tail
Fred Drake0cf0cfb1998-02-19 20:59:19 +0000113part only) selected by the user in the last
114\function{show_file_selector()} call.
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000115\end{funcdesc}
116
117\begin{funcdesc}{qdevice}{dev}
118\funcline{unqdevice}{dev}
119\funcline{isqueued}{dev}
120\funcline{qtest}{}
121\funcline{qread}{}
122%\funcline{blkqread}{?}
123\funcline{qreset}{}
Fred Drake5f874d61998-03-15 01:59:57 +0000124\funcline{qenter}{dev, val}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000125\funcline{get_mouse}{}
Fred Drake5f874d61998-03-15 01:59:57 +0000126\funcline{tie}{button, valuator1, valuator2}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000127These functions are the FORMS interfaces to the corresponding GL
128functions. Use these if you want to handle some GL events yourself
Fred Drake0cf0cfb1998-02-19 20:59:19 +0000129when using \function{fl.do_events()}. When a GL event is detected that
130FORMS cannot handle, \function{fl.do_forms()} returns the special value
131\constant{FL.EVENT} and you should call \function{fl.qread()} to read
132the event from the queue. Don't use the equivalent GL functions!
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000133\end{funcdesc}
134
135\begin{funcdesc}{color}{}
136\funcline{mapcolor}{}
137\funcline{getmcolor}{}
Fred Drake0cf0cfb1998-02-19 20:59:19 +0000138See the description in the FORMS documentation of
139\cfunction{fl_color()}, \cfunction{fl_mapcolor()} and
140\cfunction{fl_getmcolor()}.
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000141\end{funcdesc}
142
Guido van Rossum470be141995-03-17 16:07:09 +0000143\subsection{Form Objects}
Fred Drakefc576191998-04-04 07:15:02 +0000144\label{form-objects}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000145
Fred Drakefc576191998-04-04 07:15:02 +0000146Form objects (returned by \function{make_form()} above) have the
Fred Drakef6863c11999-03-02 16:37:17 +0000147following methods. Each method corresponds to a C function whose
Fred Drake0cf0cfb1998-02-19 20:59:19 +0000148name is prefixed with \samp{fl_}; and whose first argument is a form
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000149pointer; please refer to the official FORMS documentation for
150descriptions.
151
Fred Drakefc576191998-04-04 07:15:02 +0000152All the \method{add_*()} methods return a Python object representing
153the FORMS object. Methods of FORMS objects are described below. Most
154kinds of FORMS object also have some methods specific to that kind;
155these methods are listed here.
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000156
157\begin{flushleft}
Fred Drakefc576191998-04-04 07:15:02 +0000158
159\begin{methoddesc}[form]{show_form}{placement, bordertype, name}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000160 Show the form.
Fred Drakefc576191998-04-04 07:15:02 +0000161\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000162
Fred Drakefc576191998-04-04 07:15:02 +0000163\begin{methoddesc}[form]{hide_form}{}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000164 Hide the form.
Fred Drakefc576191998-04-04 07:15:02 +0000165\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000166
Fred Drakefc576191998-04-04 07:15:02 +0000167\begin{methoddesc}[form]{redraw_form}{}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000168 Redraw the form.
Fred Drakefc576191998-04-04 07:15:02 +0000169\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000170
Fred Drakefc576191998-04-04 07:15:02 +0000171\begin{methoddesc}[form]{set_form_position}{x, y}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000172Set the form's position.
Fred Drakefc576191998-04-04 07:15:02 +0000173\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000174
Fred Drakefc576191998-04-04 07:15:02 +0000175\begin{methoddesc}[form]{freeze_form}{}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000176Freeze the form.
Fred Drakefc576191998-04-04 07:15:02 +0000177\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000178
Fred Drakefc576191998-04-04 07:15:02 +0000179\begin{methoddesc}[form]{unfreeze_form}{}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000180 Unfreeze the form.
Fred Drakefc576191998-04-04 07:15:02 +0000181\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000182
Fred Drakefc576191998-04-04 07:15:02 +0000183\begin{methoddesc}[form]{activate_form}{}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000184 Activate the form.
Fred Drakefc576191998-04-04 07:15:02 +0000185\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000186
Fred Drakefc576191998-04-04 07:15:02 +0000187\begin{methoddesc}[form]{deactivate_form}{}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000188 Deactivate the form.
Fred Drakefc576191998-04-04 07:15:02 +0000189\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000190
Fred Drakefc576191998-04-04 07:15:02 +0000191\begin{methoddesc}[form]{bgn_group}{}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000192 Begin a new group of objects; return a group object.
Fred Drakefc576191998-04-04 07:15:02 +0000193\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000194
Fred Drakefc576191998-04-04 07:15:02 +0000195\begin{methoddesc}[form]{end_group}{}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000196 End the current group of objects.
Fred Drakefc576191998-04-04 07:15:02 +0000197\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000198
Fred Drakefc576191998-04-04 07:15:02 +0000199\begin{methoddesc}[form]{find_first}{}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000200 Find the first object in the form.
Fred Drakefc576191998-04-04 07:15:02 +0000201\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000202
Fred Drakefc576191998-04-04 07:15:02 +0000203\begin{methoddesc}[form]{find_last}{}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000204 Find the last object in the form.
Fred Drakefc576191998-04-04 07:15:02 +0000205\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000206
207%---
208
Fred Drakefc576191998-04-04 07:15:02 +0000209\begin{methoddesc}[form]{add_box}{type, x, y, w, h, name}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000210Add a box object to the form.
211No extra methods.
Fred Drakefc576191998-04-04 07:15:02 +0000212\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000213
Fred Drakefc576191998-04-04 07:15:02 +0000214\begin{methoddesc}[form]{add_text}{type, x, y, w, h, name}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000215Add a text object to the form.
216No extra methods.
Fred Drakefc576191998-04-04 07:15:02 +0000217\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000218
Fred Drakefc576191998-04-04 07:15:02 +0000219%\begin{methoddesc}[form]{add_bitmap}{type, x, y, w, h, name}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000220%Add a bitmap object to the form.
Fred Drakefc576191998-04-04 07:15:02 +0000221%\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000222
Fred Drakefc576191998-04-04 07:15:02 +0000223\begin{methoddesc}[form]{add_clock}{type, x, y, w, h, name}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000224Add a clock object to the form. \\
225Method:
Fred Drake0cf0cfb1998-02-19 20:59:19 +0000226\method{get_clock()}.
Fred Drakefc576191998-04-04 07:15:02 +0000227\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000228
229%---
230
Fred Drakefc576191998-04-04 07:15:02 +0000231\begin{methoddesc}[form]{add_button}{type, x, y, w, h, name}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000232Add a button object to the form. \\
233Methods:
Fred Drake0cf0cfb1998-02-19 20:59:19 +0000234\method{get_button()},
235\method{set_button()}.
Fred Drakefc576191998-04-04 07:15:02 +0000236\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000237
Fred Drakefc576191998-04-04 07:15:02 +0000238\begin{methoddesc}[form]{add_lightbutton}{type, x, y, w, h, name}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000239Add a lightbutton object to the form. \\
240Methods:
Fred Drake0cf0cfb1998-02-19 20:59:19 +0000241\method{get_button()},
242\method{set_button()}.
Fred Drakefc576191998-04-04 07:15:02 +0000243\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000244
Fred Drakefc576191998-04-04 07:15:02 +0000245\begin{methoddesc}[form]{add_roundbutton}{type, x, y, w, h, name}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000246Add a roundbutton object to the form. \\
247Methods:
Fred Drake0cf0cfb1998-02-19 20:59:19 +0000248\method{get_button()},
249\method{set_button()}.
Fred Drakefc576191998-04-04 07:15:02 +0000250\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000251
252%---
253
Fred Drakefc576191998-04-04 07:15:02 +0000254\begin{methoddesc}[form]{add_slider}{type, x, y, w, h, name}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000255Add a slider object to the form. \\
256Methods:
Fred Drake0cf0cfb1998-02-19 20:59:19 +0000257\method{set_slider_value()},
258\method{get_slider_value()},
259\method{set_slider_bounds()},
260\method{get_slider_bounds()},
261\method{set_slider_return()},
262\method{set_slider_size()},
263\method{set_slider_precision()},
264\method{set_slider_step()}.
Fred Drakefc576191998-04-04 07:15:02 +0000265\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000266
Fred Drakefc576191998-04-04 07:15:02 +0000267\begin{methoddesc}[form]{add_valslider}{type, x, y, w, h, name}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000268Add a valslider object to the form. \\
269Methods:
Fred Drake0cf0cfb1998-02-19 20:59:19 +0000270\method{set_slider_value()},
271\method{get_slider_value()},
272\method{set_slider_bounds()},
273\method{get_slider_bounds()},
274\method{set_slider_return()},
275\method{set_slider_size()},
276\method{set_slider_precision()},
277\method{set_slider_step()}.
Fred Drakefc576191998-04-04 07:15:02 +0000278\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000279
Fred Drakefc576191998-04-04 07:15:02 +0000280\begin{methoddesc}[form]{add_dial}{type, x, y, w, h, name}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000281Add a dial object to the form. \\
282Methods:
Fred Drake0cf0cfb1998-02-19 20:59:19 +0000283\method{set_dial_value()},
284\method{get_dial_value()},
285\method{set_dial_bounds()},
286\method{get_dial_bounds()}.
Fred Drakefc576191998-04-04 07:15:02 +0000287\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000288
Fred Drakefc576191998-04-04 07:15:02 +0000289\begin{methoddesc}[form]{add_positioner}{type, x, y, w, h, name}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000290Add a positioner object to the form. \\
291Methods:
Fred Drake0cf0cfb1998-02-19 20:59:19 +0000292\method{set_positioner_xvalue()},
293\method{set_positioner_yvalue()},
294\method{set_positioner_xbounds()},
295\method{set_positioner_ybounds()},
296\method{get_positioner_xvalue()},
297\method{get_positioner_yvalue()},
298\method{get_positioner_xbounds()},
299\method{get_positioner_ybounds()}.
Fred Drakefc576191998-04-04 07:15:02 +0000300\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000301
Fred Drakefc576191998-04-04 07:15:02 +0000302\begin{methoddesc}[form]{add_counter}{type, x, y, w, h, name}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000303Add a counter object to the form. \\
304Methods:
Fred Drake0cf0cfb1998-02-19 20:59:19 +0000305\method{set_counter_value()},
306\method{get_counter_value()},
307\method{set_counter_bounds()},
308\method{set_counter_step()},
309\method{set_counter_precision()},
310\method{set_counter_return()}.
Fred Drakefc576191998-04-04 07:15:02 +0000311\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000312
313%---
314
Fred Drakefc576191998-04-04 07:15:02 +0000315\begin{methoddesc}[form]{add_input}{type, x, y, w, h, name}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000316Add a input object to the form. \\
317Methods:
Fred Drake0cf0cfb1998-02-19 20:59:19 +0000318\method{set_input()},
319\method{get_input()},
320\method{set_input_color()},
321\method{set_input_return()}.
Fred Drakefc576191998-04-04 07:15:02 +0000322\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000323
324%---
325
Fred Drakefc576191998-04-04 07:15:02 +0000326\begin{methoddesc}[form]{add_menu}{type, x, y, w, h, name}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000327Add a menu object to the form. \\
328Methods:
Fred Drake0cf0cfb1998-02-19 20:59:19 +0000329\method{set_menu()},
330\method{get_menu()},
331\method{addto_menu()}.
Fred Drakefc576191998-04-04 07:15:02 +0000332\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000333
Fred Drakefc576191998-04-04 07:15:02 +0000334\begin{methoddesc}[form]{add_choice}{type, x, y, w, h, name}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000335Add a choice object to the form. \\
336Methods:
Fred Drake0cf0cfb1998-02-19 20:59:19 +0000337\method{set_choice()},
338\method{get_choice()},
339\method{clear_choice()},
340\method{addto_choice()},
341\method{replace_choice()},
342\method{delete_choice()},
343\method{get_choice_text()},
344\method{set_choice_fontsize()},
345\method{set_choice_fontstyle()}.
Fred Drakefc576191998-04-04 07:15:02 +0000346\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000347
Fred Drakefc576191998-04-04 07:15:02 +0000348\begin{methoddesc}[form]{add_browser}{type, x, y, w, h, name}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000349Add a browser object to the form. \\
350Methods:
Fred Drake0cf0cfb1998-02-19 20:59:19 +0000351\method{set_browser_topline()},
352\method{clear_browser()},
353\method{add_browser_line()},
354\method{addto_browser()},
355\method{insert_browser_line()},
356\method{delete_browser_line()},
357\method{replace_browser_line()},
358\method{get_browser_line()},
359\method{load_browser()},
360\method{get_browser_maxline()},
361\method{select_browser_line()},
362\method{deselect_browser_line()},
363\method{deselect_browser()},
364\method{isselected_browser_line()},
365\method{get_browser()},
366\method{set_browser_fontsize()},
367\method{set_browser_fontstyle()},
368\method{set_browser_specialkey()}.
Fred Drakefc576191998-04-04 07:15:02 +0000369\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000370
371%---
372
Fred Drakefc576191998-04-04 07:15:02 +0000373\begin{methoddesc}[form]{add_timer}{type, x, y, w, h, name}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000374Add a timer object to the form. \\
375Methods:
Fred Drake0cf0cfb1998-02-19 20:59:19 +0000376\method{set_timer()},
377\method{get_timer()}.
Fred Drakefc576191998-04-04 07:15:02 +0000378\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000379\end{flushleft}
380
381Form objects have the following data attributes; see the FORMS
382documentation:
383
Fred Drakeee601911998-04-11 20:53:03 +0000384\begin{tableiii}{l|l|l}{member}{Name}{C Type}{Meaning}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000385 \lineiii{window}{int (read-only)}{GL window id}
386 \lineiii{w}{float}{form width}
387 \lineiii{h}{float}{form height}
388 \lineiii{x}{float}{form x origin}
389 \lineiii{y}{float}{form y origin}
390 \lineiii{deactivated}{int}{nonzero if form is deactivated}
391 \lineiii{visible}{int}{nonzero if form is visible}
392 \lineiii{frozen}{int}{nonzero if form is frozen}
393 \lineiii{doublebuf}{int}{nonzero if double buffering on}
394\end{tableiii}
395
Guido van Rossum470be141995-03-17 16:07:09 +0000396\subsection{FORMS Objects}
Fred Drakefc576191998-04-04 07:15:02 +0000397\label{forms-objects}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000398
399Besides methods specific to particular kinds of FORMS objects, all
400FORMS objects also have the following methods:
401
Fred Drakefc576191998-04-04 07:15:02 +0000402\begin{methoddesc}[FORMS object]{set_call_back}{function, argument}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000403Set the object's callback function and argument. When the object
404needs interaction, the callback function will be called with two
405arguments: the object, and the callback argument. (FORMS objects
Fred Drake0cf0cfb1998-02-19 20:59:19 +0000406without a callback function are returned by \function{fl.do_forms()}
407or \function{fl.check_forms()} when they need interaction.) Call this
408method without arguments to remove the callback function.
Fred Drakefc576191998-04-04 07:15:02 +0000409\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000410
Fred Drakefc576191998-04-04 07:15:02 +0000411\begin{methoddesc}[FORMS object]{delete_object}{}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000412 Delete the object.
Fred Drakefc576191998-04-04 07:15:02 +0000413\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000414
Fred Drakefc576191998-04-04 07:15:02 +0000415\begin{methoddesc}[FORMS object]{show_object}{}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000416 Show the object.
Fred Drakefc576191998-04-04 07:15:02 +0000417\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000418
Fred Drakefc576191998-04-04 07:15:02 +0000419\begin{methoddesc}[FORMS object]{hide_object}{}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000420 Hide the object.
Fred Drakefc576191998-04-04 07:15:02 +0000421\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000422
Fred Drakefc576191998-04-04 07:15:02 +0000423\begin{methoddesc}[FORMS object]{redraw_object}{}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000424 Redraw the object.
Fred Drakefc576191998-04-04 07:15:02 +0000425\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000426
Fred Drakefc576191998-04-04 07:15:02 +0000427\begin{methoddesc}[FORMS object]{freeze_object}{}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000428 Freeze the object.
Fred Drakefc576191998-04-04 07:15:02 +0000429\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000430
Fred Drakefc576191998-04-04 07:15:02 +0000431\begin{methoddesc}[FORMS object]{unfreeze_object}{}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000432 Unfreeze the object.
Fred Drakefc576191998-04-04 07:15:02 +0000433\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000434
Fred Drakefc576191998-04-04 07:15:02 +0000435%\begin{methoddesc}[FORMS object]{handle_object}{} XXX
436%\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000437
Fred Drakefc576191998-04-04 07:15:02 +0000438%\begin{methoddesc}[FORMS object]{handle_object_direct}{} XXX
439%\end{methoddesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000440
441FORMS objects have these data attributes; see the FORMS documentation:
442
Fred Drakeee601911998-04-11 20:53:03 +0000443\begin{tableiii}{l|l|l}{member}{Name}{C Type}{Meaning}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000444 \lineiii{objclass}{int (read-only)}{object class}
445 \lineiii{type}{int (read-only)}{object type}
446 \lineiii{boxtype}{int}{box type}
447 \lineiii{x}{float}{x origin}
448 \lineiii{y}{float}{y origin}
449 \lineiii{w}{float}{width}
450 \lineiii{h}{float}{height}
451 \lineiii{col1}{int}{primary color}
452 \lineiii{col2}{int}{secondary color}
453 \lineiii{align}{int}{alignment}
454 \lineiii{lcol}{int}{label color}
455 \lineiii{lsize}{float}{label font size}
456 \lineiii{label}{string}{label string}
457 \lineiii{lstyle}{int}{label style}
458 \lineiii{pushed}{int (read-only)}{(see FORMS docs)}
459 \lineiii{focus}{int (read-only)}{(see FORMS docs)}
460 \lineiii{belowmouse}{int (read-only)}{(see FORMS docs)}
461 \lineiii{frozen}{int (read-only)}{(see FORMS docs)}
462 \lineiii{active}{int (read-only)}{(see FORMS docs)}
463 \lineiii{input}{int (read-only)}{(see FORMS docs)}
464 \lineiii{visible}{int (read-only)}{(see FORMS docs)}
465 \lineiii{radio}{int (read-only)}{(see FORMS docs)}
466 \lineiii{automatic}{int (read-only)}{(see FORMS docs)}
467\end{tableiii}
468
Fred Drakeb91e9341998-07-23 17:59:49 +0000469
Fred Drakef6863c11999-03-02 16:37:17 +0000470\section{\module{FL} ---
471 Constants used with the \module{fl} module}
472
473\declaremodule{standard}{FL}
474 \platform{IRIX}
Fred Drakeb91e9341998-07-23 17:59:49 +0000475\modulesynopsis{Constants used with the \module{fl} module.}
476
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000477
478This module defines symbolic constants needed to use the built-in
Fred Drakef6863c11999-03-02 16:37:17 +0000479module \refmodule{fl} (see above); they are equivalent to those defined in
480the C header file \code{<forms.h>} except that the name prefix
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000481\samp{FL_} is omitted. Read the module source for a complete list of
482the defined names. Suggested use:
483
Fred Drake19479911998-02-13 06:58:54 +0000484\begin{verbatim}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000485import fl
486from FL import *
Fred Drake19479911998-02-13 06:58:54 +0000487\end{verbatim}
Fred Drake0cf0cfb1998-02-19 20:59:19 +0000488
Fred Drakeb91e9341998-07-23 17:59:49 +0000489
Fred Drakef6863c11999-03-02 16:37:17 +0000490\section{\module{flp} ---
491 Functions for loading stored FORMS designs}
492
493\declaremodule{standard}{flp}
494 \platform{IRIX}
495\modulesynopsis{Functions for loading stored FORMS designs.}
Fred Drakeb91e9341998-07-23 17:59:49 +0000496
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000497
498This module defines functions that can read form definitions created
Fred Drake0cf0cfb1998-02-19 20:59:19 +0000499by the `form designer' (\program{fdesign}) program that comes with the
Fred Drakef6863c11999-03-02 16:37:17 +0000500FORMS library (see module \refmodule{fl} above).
Guido van Rossum5fdeeea1994-01-02 01:22:07 +0000501
502For now, see the file \file{flp.doc} in the Python library source
503directory for a description.
504
505XXX A complete description should be inserted here!