34.4.1 Functions Defined in Module fl
Module fl defines the following functions. For more information about what they do, see the description of the equivalent C function in the FORMS documentation:
- Create a form with given type, width and height. This returns a form object, whose methods are described below.
- The standard FORMS main loop. Returns a Python object representing the FORMS object needing interaction, or the special value FL.EVENT.
-
Check for FORMS events. Returns what do_forms() above
returns, or
None
if there is no event that immediately needs interaction.
- Set the event callback function.
- Set the graphics modes.
- Return the current rgb mode. This is the value of the C global variable fl_rgbmode.
- Show a dialog box with a three-line message and an OK button.
-
Show a dialog box with a three-line message and YES and NO buttons.
It returns
1
if the user pressed YES,0
if NO.
-
Show a dialog box with a three-line message and up to three buttons.
It returns the number of the button clicked by the user
(
1
,2
or3
).
- Show a dialog box with a one-line prompt message and text field in which the user can enter a string. The second argument is the default input string. It returns the string value as edited by the user.
-
Show a dialog box in which the user can select a file. It returns
the absolute filename selected by the user, or
None
if the user presses Cancel.
- These functions return the directory, pattern and filename (the tail part only) selected by the user in the last show_file_selector() call.
- These functions are the FORMS interfaces to the corresponding GL functions. Use these if you want to handle some GL events yourself when using fl.do_events(). When a GL event is detected that FORMS cannot handle, fl.do_forms() returns the special value FL.EVENT and you should call fl.qread() to read the event from the queue. Don't use the equivalent GL functions!
- See the description in the FORMS documentation of fl_color(), fl_mapcolor() and fl_getmcolor().
See About this document... for information on suggesting changes.