| There are no 'free objects' in the Python interface to FORMS, nor is there an |
| easy way to add object classes written in Python. The FORMS interface to GL |
| event handling is available, though, so you can mix FORMS with pure GL windows. |
| |
| **Please note:** importing :mod:`fl` implies a call to the GL function |
| :cfunc:`foreground` and to the FORMS routine :cfunc:`fl_init`. |
| |
| |
n | .. _fl-functions: |
| |
| Functions Defined in Module :mod:`fl` |
| ------------------------------------- |
n | |
| .. _fl functions: |
| |
| Module :mod:`fl` defines the following functions. For more information about |
| what they do, see the description of the equivalent C function in the FORMS |
| documentation: |
| |
| |
| .. function:: make_form(type, width, height) |
| |
| |
| These functions are the FORMS interfaces to the corresponding GL functions. Use |
| these if you want to handle some GL events yourself when using |
| :func:`fl.do_events`. When a GL event is detected that FORMS cannot handle, |
| :func:`fl.do_forms` returns the special value :const:`FL.EVENT` and you should |
| call :func:`fl.qread` to read the event from the queue. Don't use the |
| equivalent GL functions! |
| |
n | .. % \funcline{blkqread}{?} |
n | .. \funcline{blkqread}{?} |
| |
| |
| .. function:: color() |
| mapcolor() |
| getmcolor() |
| |
| See the description in the FORMS documentation of :cfunc:`fl_color`, |
| :cfunc:`fl_mapcolor` and :cfunc:`fl_getmcolor`. |
| |
| Find the first object in the form. |
| |
| |
| .. method:: form.find_last() |
| |
| Find the last object in the form. |
| |
n | .. % --- |
| |
| |
| .. method:: form.add_box(type, x, y, w, h, name) |
| |
| Add a box object to the form. No extra methods. |
| |
| |
| .. method:: form.add_text(type, x, y, w, h, name) |
| |
| Add a text object to the form. No extra methods. |
| |
n | .. % \begin{methoddesc}[form]{add_bitmap}{type, x, y, w, h, name} |
n | .. \begin{methoddesc}[form]{add_bitmap}{type, x, y, w, h, name} |
| .. % Add a bitmap object to the form. |
| .. Add a bitmap object to the form. |
| .. % \end{methoddesc} |
| .. \end{methoddesc} |
| |
| |
| .. method:: form.add_clock(type, x, y, w, h, name) |
| |
| Add a clock object to the form. --- Method: :meth:`get_clock`. |
n | |
| .. % --- |
| |
| |
| .. method:: form.add_button(type, x, y, w, h, name) |
| |
| Add a button object to the form. --- Methods: :meth:`get_button`, |
| :meth:`set_button`. |
| |
| |
| Add a lightbutton object to the form. --- Methods: :meth:`get_button`, |
| :meth:`set_button`. |
| |
| |
| .. method:: form.add_roundbutton(type, x, y, w, h, name) |
| |
| Add a roundbutton object to the form. --- Methods: :meth:`get_button`, |
| :meth:`set_button`. |
n | |
| .. % --- |
| |
| |
| .. method:: form.add_slider(type, x, y, w, h, name) |
| |
| Add a slider object to the form. --- Methods: :meth:`set_slider_value`, |
| :meth:`get_slider_value`, :meth:`set_slider_bounds`, :meth:`get_slider_bounds`, |
| :meth:`set_slider_return`, :meth:`set_slider_size`, |
| :meth:`set_slider_precision`, :meth:`set_slider_step`. |
| |
| |
| .. method:: form.add_counter(type, x, y, w, h, name) |
| |
| Add a counter object to the form. --- Methods: :meth:`set_counter_value`, |
| :meth:`get_counter_value`, :meth:`set_counter_bounds`, :meth:`set_counter_step`, |
| :meth:`set_counter_precision`, :meth:`set_counter_return`. |
| |
n | .. % --- |
| |
| |
| .. method:: form.add_input(type, x, y, w, h, name) |
| |
| Add a input object to the form. --- Methods: :meth:`set_input`, |
| :meth:`get_input`, :meth:`set_input_color`, :meth:`set_input_return`. |
n | |
| .. % --- |
| |
| |
| .. method:: form.add_menu(type, x, y, w, h, name) |
| |
| Add a menu object to the form. --- Methods: :meth:`set_menu`, |
| :meth:`get_menu`, :meth:`addto_menu`. |
| |
| |
| :meth:`insert_browser_line`, :meth:`delete_browser_line`, |
| :meth:`replace_browser_line`, :meth:`get_browser_line`, :meth:`load_browser`, |
| :meth:`get_browser_maxline`, :meth:`select_browser_line`, |
| :meth:`deselect_browser_line`, :meth:`deselect_browser`, |
| :meth:`isselected_browser_line`, :meth:`get_browser`, |
| :meth:`set_browser_fontsize`, :meth:`set_browser_fontstyle`, |
| :meth:`set_browser_specialkey`. |
| |
n | .. % --- |
| |
| |
| .. method:: form.add_timer(type, x, y, w, h, name) |
| |
| Add a timer object to the form. --- Methods: :meth:`set_timer`, |
| :meth:`get_timer`. |
| |
| Form objects have the following data attributes; see the FORMS documentation: |
| |
| |
| |
| .. method:: FORMS object.unfreeze_object() |
| |
| Unfreeze the object. |
| |
| FORMS objects have these data attributes; see the FORMS documentation: |
| |
n | .. % \begin{methoddesc}[FORMS object]{handle_object}{} XXX |
n | .. \begin{methoddesc}[FORMS object]{handle_object}{} XXX |
| .. % \end{methoddesc} |
| .. \end{methoddesc} |
| .. % \begin{methoddesc}[FORMS object]{handle_object_direct}{} XXX |
| .. \begin{methoddesc}[FORMS object]{handle_object_direct}{} XXX |
| .. % \end{methoddesc} |
| .. \end{methoddesc} |
| |
| +--------------------+-----------------+------------------+ |
| | Name | C Type | Meaning | |
| +====================+=================+==================+ |
| | :attr:`objclass` | int (read-only) | object class | |
| +--------------------+-----------------+------------------+ |
| | :attr:`type` | int (read-only) | object type | |
| +--------------------+-----------------+------------------+ |
| |
| |
| :mod:`FL` --- Constants used with the :mod:`fl` module |
| ====================================================== |
| |
| .. module:: FL |
| :platform: IRIX |
| :synopsis: Constants used with the fl module. |
n | :deprecated: |
| |
| |
| .. deprecated:: 2.6 |
| The :mod:`FL` module has been deprecated for removal in Python 3.0. |
| |
| |
| This module defines symbolic constants needed to use the built-in module |
| :mod:`fl` (see above); they are equivalent to those defined in the C header file |
| ``<forms.h>`` except that the name prefix ``FL_`` is omitted. Read the module |
| source for a complete list of the defined names. Suggested use:: |
| |
| import fl |
| |
| |
| :mod:`flp` --- Functions for loading stored FORMS designs |
| ========================================================= |
| |
| .. module:: flp |
| :platform: IRIX |
| :synopsis: Functions for loading stored FORMS designs. |
t | :deprecated: |
| |
| |
| .. deprecated:: 2.6 |
| The :mod:`flp` module has been deprecated for removal in Python 3.0. |
| |
| |
| This module defines functions that can read form definitions created by the |
| 'form designer' (:program:`fdesign`) program that comes with the FORMS library |
| (see module :mod:`fl` above). |
| |
| For now, see the file :file:`flp.doc` in the Python library source directory for |
| a description. |