20.4.2 Form Objects
Form objects (returned by make_form() above) have the following methods. Each method corresponds to a C function whose name is prefixed with "fl_"; and whose first argument is a form pointer; please refer to the official FORMS documentation for descriptions.
All the add_*() methods return a Python object representing the FORMS object. Methods of FORMS objects are described below. Most kinds of FORMS object also have some methods specific to that kind; these methods are listed here.
- Show the form.
- Hide the form.
- Redraw the form.
- Set the form's position.
- Freeze the form.
- Unfreeze the form.
- Activate the form.
- Deactivate the form.
- Begin a new group of objects; return a group object.
- End the current group of objects.
- Find the first object in the form.
- Find the last object in the form.
- Add a box object to the form. No extra methods.
- Add a text object to the form. No extra methods.
-
Add a clock object to the form.
Method: get_clock().
-
Add a button object to the form.
Methods: get_button(), set_button().
-
Add a lightbutton object to the form.
Methods: get_button(), set_button().
-
Add a roundbutton object to the form.
Methods: get_button(), set_button().
-
Add a slider object to the form.
Methods: set_slider_value(), get_slider_value(), set_slider_bounds(), get_slider_bounds(), set_slider_return(), set_slider_size(), set_slider_precision(), set_slider_step().
-
Add a valslider object to the form.
Methods: set_slider_value(), get_slider_value(), set_slider_bounds(), get_slider_bounds(), set_slider_return(), set_slider_size(), set_slider_precision(), set_slider_step().
-
Add a dial object to the form.
Methods: set_dial_value(), get_dial_value(), set_dial_bounds(), get_dial_bounds().
-
Add a positioner object to the form.
Methods: set_positioner_xvalue(), set_positioner_yvalue(), set_positioner_xbounds(), set_positioner_ybounds(), get_positioner_xvalue(), get_positioner_yvalue(), get_positioner_xbounds(), get_positioner_ybounds().
-
Add a counter object to the form.
Methods: set_counter_value(), get_counter_value(), set_counter_bounds(), set_counter_step(), set_counter_precision(), set_counter_return().
-
Add a input object to the form.
Methods: set_input(), get_input(), set_input_color(), set_input_return().
-
Add a menu object to the form.
Methods: set_menu(), get_menu(), addto_menu().
-
Add a choice object to the form.
Methods: set_choice(), get_choice(), clear_choice(), addto_choice(), replace_choice(), delete_choice(), get_choice_text(), set_choice_fontsize(), set_choice_fontstyle().
-
Add a browser object to the form.
Methods: set_browser_topline(), clear_browser(), add_browser_line(), addto_browser(), insert_browser_line(), delete_browser_line(), replace_browser_line(), get_browser_line(), load_browser(), get_browser_maxline(), select_browser_line(), deselect_browser_line(), deselect_browser(), isselected_browser_line(), get_browser(), set_browser_fontsize(), set_browser_fontstyle(), set_browser_specialkey().
-
Add a timer object to the form.
Methods: set_timer(), get_timer().
Form objects have the following data attributes; see the FORMS documentation:
Name | C Type | Meaning |
---|---|---|
window | int (read-only) | GL window id |
w | float | form width |
h | float | form height |
x | float | form x origin |
y | float | form y origin |
deactivated | int | nonzero if form is deactivated |
visible | int | nonzero if form is visible |
frozen | int | nonzero if form is frozen |
doublebuf | int | nonzero if double buffering on |
See About this document... for information on suggesting changes.