rest25/library/fl.rst => rest262/library/fl.rst
f1
2:mod:`fl` --- FORMS library for graphical user interfaces
3=========================================================
4
5.. module:: fl
6   :platform: IRIX
7   :synopsis: FORMS library for applications with graphical user interfaces.
n8+   :deprecated:
9+ 
10+ 
11+.. deprecated:: 2.6
12+    The :mod:`fl` module has been deprecated for removal in Python 3.0.
8
9
10.. index::
11   single: FORMS Library
12   single: Overmars, Mark
13
14This module provides an interface to the FORMS Library by Mark Overmars.  The
15source for the library can be retrieved by anonymous ftp from host
37There are no 'free objects' in the Python interface to FORMS, nor is there an
38easy way to add object classes written in Python.  The FORMS interface to GL
39event handling is available, though, so you can mix FORMS with pure GL windows.
40
41**Please note:** importing :mod:`fl` implies a call to the GL function
42:cfunc:`foreground` and to the FORMS routine :cfunc:`fl_init`.
43
44
n50+.. _fl-functions:
51+ 
45Functions Defined in Module :mod:`fl`
46-------------------------------------
n47- 
48-.. _fl functions:
49
50Module :mod:`fl` defines the following functions.  For more information about
51what they do, see the description of the equivalent C function in the FORMS
52documentation:
53
54
55.. function:: make_form(type, width, height)
56
136
137   These functions are the FORMS interfaces to the corresponding GL functions.  Use
138   these if you want to handle some GL events yourself when using
139   :func:`fl.do_events`.  When a GL event is detected that FORMS cannot handle,
140   :func:`fl.do_forms` returns the special value :const:`FL.EVENT` and you should
141   call :func:`fl.qread` to read the event from the queue.  Don't use the
142   equivalent GL functions!
143
n144-   .. % \funcline{blkqread}{?}
n149+   .. \funcline{blkqread}{?}
145
146
147.. function:: color()
148              mapcolor()
149              getmcolor()
150
151   See the description in the FORMS documentation of :cfunc:`fl_color`,
152   :cfunc:`fl_mapcolor` and :cfunc:`fl_getmcolor`.
222
223   Find the first object in the form.
224
225
226.. method:: form.find_last()
227
228   Find the last object in the form.
229
n230-.. % ---
231- 
232
233.. method:: form.add_box(type, x, y, w, h, name)
234
235   Add a box object to the form. No extra methods.
236
237
238.. method:: form.add_text(type, x, y, w, h, name)
239
240   Add a text object to the form. No extra methods.
241
n242-.. % \begin{methoddesc}[form]{add_bitmap}{type, x, y, w, h, name}
n245+.. \begin{methoddesc}[form]{add_bitmap}{type, x, y, w, h, name}
243-.. % Add a bitmap object to the form.
246+.. Add a bitmap object to the form.
244-.. % \end{methoddesc}
247+.. \end{methoddesc}
245
246
247.. method:: form.add_clock(type, x, y, w, h, name)
248
249   Add a clock object to the form.  ---  Method: :meth:`get_clock`.
n250- 
251-.. % ---
252
253
254.. method:: form.add_button(type, x, y, w, h,  name)
255
256   Add a button object to the form.  ---  Methods: :meth:`get_button`,
257   :meth:`set_button`.
258
259
262   Add a lightbutton object to the form.  ---  Methods: :meth:`get_button`,
263   :meth:`set_button`.
264
265
266.. method:: form.add_roundbutton(type, x, y, w, h, name)
267
268   Add a roundbutton object to the form.  ---  Methods: :meth:`get_button`,
269   :meth:`set_button`.
n270- 
271-.. % ---
272
273
274.. method:: form.add_slider(type, x, y, w, h, name)
275
276   Add a slider object to the form.  ---  Methods: :meth:`set_slider_value`,
277   :meth:`get_slider_value`, :meth:`set_slider_bounds`, :meth:`get_slider_bounds`,
278   :meth:`set_slider_return`, :meth:`set_slider_size`,
279   :meth:`set_slider_precision`, :meth:`set_slider_step`.
303
304
305.. method:: form.add_counter(type, x, y, w, h, name)
306
307   Add a counter object to the form.  ---  Methods: :meth:`set_counter_value`,
308   :meth:`get_counter_value`, :meth:`set_counter_bounds`, :meth:`set_counter_step`,
309   :meth:`set_counter_precision`, :meth:`set_counter_return`.
310
n311-.. % ---
312- 
313
314.. method:: form.add_input(type, x, y, w, h, name)
315
316   Add a input object to the form.  ---  Methods: :meth:`set_input`,
317   :meth:`get_input`, :meth:`set_input_color`, :meth:`set_input_return`.
n318- 
319-.. % ---
320
321
322.. method:: form.add_menu(type, x, y, w, h, name)
323
324   Add a menu object to the form.  ---  Methods: :meth:`set_menu`,
325   :meth:`get_menu`, :meth:`addto_menu`.
326
327
340   :meth:`insert_browser_line`, :meth:`delete_browser_line`,
341   :meth:`replace_browser_line`, :meth:`get_browser_line`, :meth:`load_browser`,
342   :meth:`get_browser_maxline`, :meth:`select_browser_line`,
343   :meth:`deselect_browser_line`, :meth:`deselect_browser`,
344   :meth:`isselected_browser_line`, :meth:`get_browser`,
345   :meth:`set_browser_fontsize`, :meth:`set_browser_fontstyle`,
346   :meth:`set_browser_specialkey`.
347
n348-.. % ---
349- 
350
351.. method:: form.add_timer(type, x, y, w, h, name)
352
353   Add a timer object to the form.  ---  Methods: :meth:`set_timer`,
354   :meth:`get_timer`.
355
356Form objects have the following data attributes; see the FORMS documentation:
357
423
424
425.. method:: FORMS object.unfreeze_object()
426
427   Unfreeze the object.
428
429FORMS objects have these data attributes; see the FORMS documentation:
430
n431-.. % \begin{methoddesc}[FORMS object]{handle_object}{} XXX
n424+.. \begin{methoddesc}[FORMS object]{handle_object}{} XXX
432-.. % \end{methoddesc}
425+.. \end{methoddesc}
433-.. % \begin{methoddesc}[FORMS object]{handle_object_direct}{} XXX
426+.. \begin{methoddesc}[FORMS object]{handle_object_direct}{} XXX
434-.. % \end{methoddesc}
427+.. \end{methoddesc}
435
436+--------------------+-----------------+------------------+
437| Name               | C Type          | Meaning          |
438+====================+=================+==================+
439| :attr:`objclass`   | int (read-only) | object class     |
440+--------------------+-----------------+------------------+
441| :attr:`type`       | int (read-only) | object type      |
442+--------------------+-----------------+------------------+
485
486
487:mod:`FL` --- Constants used with the :mod:`fl` module
488======================================================
489
490.. module:: FL
491   :platform: IRIX
492   :synopsis: Constants used with the fl module.
n486+   :deprecated:
487+ 
488+ 
489+.. deprecated:: 2.6
490+    The :mod:`FL` module has been deprecated for removal in Python 3.0.
493
494
495This module defines symbolic constants needed to use the built-in module
496:mod:`fl` (see above); they are equivalent to those defined in the C header file
497``<forms.h>`` except that the name prefix ``FL_`` is omitted.  Read the module
498source for a complete list of the defined names.  Suggested use::
499
500   import fl
502
503
504:mod:`flp` --- Functions for loading stored FORMS designs
505=========================================================
506
507.. module:: flp
508   :platform: IRIX
509   :synopsis: Functions for loading stored FORMS designs.
t508+   :deprecated:
509+ 
510+ 
511+.. deprecated:: 2.6
512+    The :mod:`flp` module has been deprecated for removal in Python 3.0.
510
511
512This module defines functions that can read form definitions created by the
513'form designer' (:program:`fdesign`) program that comes with the FORMS library
514(see module :mod:`fl` above).
515
516For now, see the file :file:`flp.doc` in the Python library source directory for
517a description.
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op