Next: FORMS object Prev: Functions defined in module fl Up: fl Top: Top

9.3.2. Form object methods and data attributes

Form objects (returned by fl.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_...' functions 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_form (placement, bordertype, name) -- Method on form object
Show the form.
hide_form () -- Method on form object
Hide the form.
redraw_form () -- Method on form object
Redraw the form.
set_form_position (x, y) -- Method on form object
Set the form's position.
freeze_form () -- Method on form object
Freeze the form.
unfreeze_form () -- Method on form object
Unfreeze the form.
activate_form () -- Method on form object
Activate the form.
deactivate_form () -- Method on form object
Deactivate the form.
bgn_group () -- Method on form object
Begin a new group of objects; return a group object.
end_group () -- Method on form object
End the current group of objects.
find_first () -- Method on form object
Find the first object in the form.
find_last () -- Method on form object
Find the last object in the form.
add_box (type, x, y, w, h, name) -- Method on form object
Add a box object to the form. No extra methods.
add_text (type, x, y, w, h, name) -- Method on form object
Add a text object to the form. No extra methods.
add_clock (type, x, y, w, h, name) -- Method on form object
Add a clock object to the form. * Method: get_clock.
add_button (type, x, y, w, h, name) -- Method on form object
Add a button object to the form. * Methods: get_button, set_button.
add_lightbutton (type, x, y, w, h, name) -- Method on form object
Add a lightbutton object to the form. * Methods: get_button, set_button.
add_roundbutton (type, x, y, w, h, name) -- Method on form object
Add a roundbutton object to the form. * Methods: get_button, set_button.
add_slider (type, x, y, w, h, name) -- Method on form object
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_valslider (type, x, y, w, h, name) -- Method on form object
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_dial (type, x, y, w, h, name) -- Method on form object
Add a dial object to the form. * Methods: set_dial_value, get_dial_value, set_dial_bounds, get_dial_bounds.
add_positioner (type, x, y, w, h, name) -- Method on form object
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_counter (type, x, y, w, h, name) -- Method on form object
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_input (type, x, y, w, h, name) -- Method on form object
Add a input object to the form. * Methods: set_input, get_input, set_input_color, set_input_return.
add_menu (type, x, y, w, h, name) -- Method on form object
Add a menu object to the form. * Methods: set_menu, get_menu, addto_menu.
add_choice (type, x, y, w, h, name) -- Method on form object
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_browser (type, x, y, w, h, name) -- Method on form object
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_timer (type, x, y, w, h, name) -- Method on form object
Add a timer object to the form. * Methods: set_timer, get_timer.
Form objects have the following data attributes; see the FORMS documentation:

Name
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