<!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN">
<link rel=
"STYLESHEET" href=
"lib.css" type='text/css'
/>
<link rel=
"SHORTCUT ICON" href=
"../icons/pyfav.png" type=
"image/png" />
<link rel='start' href='../index.html' title='Python Documentation Index'
/>
<link rel=
"first" href=
"lib.html" title='Python Library Reference'
/>
<link rel='contents' href='contents.html'
title=
"Contents" />
<link rel='index' href='genindex.html' title='Index'
/>
<link rel='last' href='about.html' title='About this document...'
/>
<link rel='help' href='about.html' title='About this document...'
/>
<link rel=
"next" href=
"form-objects.html" />
<link rel=
"prev" href=
"module-fl.html" />
<link rel=
"parent" href=
"module-fl.html" />
<link rel=
"next" href=
"form-objects.html" />
<meta name='aesop' content='information'
/>
<title>20.4.1 Functions Defined in Module fl
</title>
<div id='top-navigation-panel' xml:id='top-navigation-panel'
>
<table align=
"center" width=
"100%" cellpadding=
"0" cellspacing=
"2">
<td class='online-navigation'
><a rel=
"prev" title=
"20.4 fl "
href=
"module-fl.html"><img src='../icons/previous.png'
border='
0' height='
32' alt='Previous Page' width='
32'
/></A></td>
<td class='online-navigation'
><a rel=
"parent" title=
"20.4 fl "
href=
"module-fl.html"><img src='../icons/up.png'
border='
0' height='
32' alt='Up One Level' width='
32'
/></A></td>
<td class='online-navigation'
><a rel=
"next" title=
"20.4.2 Form Objects"
href=
"form-objects.html"><img src='../icons/next.png'
border='
0' height='
32' alt='Next Page' width='
32'
/></A></td>
<td align=
"center" width=
"100%">Python Library Reference
</td>
<td class='online-navigation'
><a rel=
"contents" title=
"Table of Contents"
href=
"contents.html"><img src='../icons/contents.png'
border='
0' height='
32' alt='Contents' width='
32'
/></A></td>
<td class='online-navigation'
><a href=
"modindex.html" title=
"Module Index"><img src='../icons/modules.png'
border='
0' height='
32' alt='Module Index' width='
32'
/></a></td>
<td class='online-navigation'
><a rel=
"index" title=
"Index"
href=
"genindex.html"><img src='../icons/index.png'
border='
0' height='
32' alt='Index' width='
32'
/></A></td>
<div class='online-navigation'
>
<b class=
"navlabel">Previous:
</b>
<a class=
"sectref" rel=
"prev" href=
"module-fl.html">20.4 fl
</A>
<b class=
"navlabel">Up:
</b>
<a class=
"sectref" rel=
"parent" href=
"module-fl.html">20.4 fl
</A>
<b class=
"navlabel">Next:
</b>
<a class=
"sectref" rel=
"next" href=
"form-objects.html">20.4.2 Form Objects
</A>
<!--End of Navigation Panel-->
<H2><A NAME=
"SECTION0022410000000000000000">
20.4.1 Functions Defined in Module
<tt class=
"module">fl
</tt></A>
<A NAME=
"FL_Functions"></A>
Module
<tt class=
"module">fl
</tt> defines the following functions. For more
information about what they do, see the description of the equivalent
C function in the FORMS documentation:
<dl><dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt id='l2h-
5114' xml:id='l2h-
5114'
class=
"function">make_form
</tt></b>(
</nobr></td>
<td><var>type, width, height
</var>)
</td></tr></table></dt>
Create a form with given type, width and height. This returns a
<i class=
"dfn">form
</i> object, whose methods are described below.
<dl><dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt id='l2h-
5115' xml:id='l2h-
5115'
class=
"function">do_forms
</tt></b>(
</nobr></td>
<td><var></var>)
</td></tr></table></dt>
The standard FORMS main loop. Returns a Python object representing
the FORMS object needing interaction, or the special value
<tt class=
"constant">FL.EVENT
</tt>.
<dl><dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt id='l2h-
5116' xml:id='l2h-
5116'
class=
"function">check_forms
</tt></b>(
</nobr></td>
<td><var></var>)
</td></tr></table></dt>
Check for FORMS events. Returns what
<tt class=
"function">do_forms()
</tt> above
returns, or
<code>None
</code> if there is no event that immediately needs
<dl><dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt id='l2h-
5117' xml:id='l2h-
5117'
class=
"function">set_event_call_back
</tt></b>(
</nobr></td>
<td><var>function
</var>)
</td></tr></table></dt>
Set the event callback function.
<dl><dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt id='l2h-
5118' xml:id='l2h-
5118'
class=
"function">set_graphics_mode
</tt></b>(
</nobr></td>
<td><var>rgbmode, doublebuffering
</var>)
</td></tr></table></dt>
<dl><dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt id='l2h-
5119' xml:id='l2h-
5119'
class=
"function">get_rgbmode
</tt></b>(
</nobr></td>
<td><var></var>)
</td></tr></table></dt>
Return the current rgb mode. This is the value of the C global
variable
<tt class=
"cdata">fl_rgbmode
</tt>.
<dl><dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt id='l2h-
5120' xml:id='l2h-
5120'
class=
"function">show_message
</tt></b>(
</nobr></td>
<td><var>str1, str2, str3
</var>)
</td></tr></table></dt>
Show a dialog box with a three-line message and an OK button.
<dl><dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt id='l2h-
5121' xml:id='l2h-
5121'
class=
"function">show_question
</tt></b>(
</nobr></td>
<td><var>str1, str2, str3
</var>)
</td></tr></table></dt>
Show a dialog box with a three-line message and YES and NO buttons.
It returns
<code>1</code> if the user pressed YES,
<code>0</code> if NO.
<dl><dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt id='l2h-
5122' xml:id='l2h-
5122'
class=
"function">show_choice
</tt></b>(
</nobr></td>
<td><var>str1, str2, str3, but1
</var><big>[
</big><var>,
but2
</var><big>[
</big><var>, but3
</var><big>]
</big><var></var><big>]
</big><var></var>)
</td></tr></table></dt>
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
(
<code>1</code>,
<code>2</code> or
<code>3</code>).
<dl><dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt id='l2h-
5123' xml:id='l2h-
5123'
class=
"function">show_input
</tt></b>(
</nobr></td>
<td><var>prompt, default
</var>)
</td></tr></table></dt>
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.
<dl><dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt id='l2h-
5124' xml:id='l2h-
5124'
class=
"function">show_file_selector
</tt></b>(
</nobr></td>
<td><var>message, directory, pattern, default
</var>)
</td></tr></table></dt>
Show a dialog box in which the user can select a file. It returns
the absolute filename selected by the user, or
<code>None
</code> if the user
<dl><dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt id='l2h-
5125' xml:id='l2h-
5125'
class=
"function">get_directory
</tt></b>(
</nobr></td>
<td><var></var>)
</td></tr></table></dt>
<dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt class=
"function">get_pattern
</tt></b>(
</nobr></td>
<td><var></var>)
</td></tr></table></dt>
<dd><dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt class=
"function">get_filename
</tt></b>(
</nobr></td>
<td><var></var>)
</td></tr></table></dt>
<dd>These functions return the directory, pattern and filename (the tail
part only) selected by the user in the last
<tt class=
"function">show_file_selector()
</tt> call.
<dl><dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt id='l2h-
5128' xml:id='l2h-
5128'
class=
"function">qdevice
</tt></b>(
</nobr></td>
<td><var>dev
</var>)
</td></tr></table></dt>
<dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt class=
"function">unqdevice
</tt></b>(
</nobr></td>
<td><var>dev
</var>)
</td></tr></table></dt>
<dd><dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt class=
"function">isqueued
</tt></b>(
</nobr></td>
<td><var>dev
</var>)
</td></tr></table></dt>
<dd><dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt class=
"function">qtest
</tt></b>(
</nobr></td>
<td><var></var>)
</td></tr></table></dt>
<dd><dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt class=
"function">qread
</tt></b>(
</nobr></td>
<td><var></var>)
</td></tr></table></dt>
<dd><dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt class=
"function">qreset
</tt></b>(
</nobr></td>
<td><var></var>)
</td></tr></table></dt>
<dd><dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt class=
"function">qenter
</tt></b>(
</nobr></td>
<td><var>dev, val
</var>)
</td></tr></table></dt>
<dd><dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt class=
"function">get_mouse
</tt></b>(
</nobr></td>
<td><var></var>)
</td></tr></table></dt>
<dd><dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt class=
"function">tie
</tt></b>(
</nobr></td>
<td><var>button, valuator1, valuator2
</var>)
</td></tr></table></dt>
<dd>These functions are the FORMS interfaces to the corresponding GL
functions. Use these if you want to handle some GL events yourself
when using
<tt class=
"function">fl.do_events()
</tt>. When a GL event is detected that
FORMS cannot handle,
<tt class=
"function">fl.do_forms()
</tt> returns the special value
<tt class=
"constant">FL.EVENT
</tt> and you should call
<tt class=
"function">fl.qread()
</tt> to read
the event from the queue. Don't use the equivalent GL functions!
<dl><dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt id='l2h-
5137' xml:id='l2h-
5137'
class=
"function">color
</tt></b>(
</nobr></td>
<td><var></var>)
</td></tr></table></dt>
<dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt class=
"function">mapcolor
</tt></b>(
</nobr></td>
<td><var></var>)
</td></tr></table></dt>
<dd><dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><tt class=
"function">getmcolor
</tt></b>(
</nobr></td>
<td><var></var>)
</td></tr></table></dt>
<dd>See the description in the FORMS documentation of
<tt class=
"cfunction">fl_color()
</tt>,
<tt class=
"cfunction">fl_mapcolor()
</tt> and
<tt class=
"cfunction">fl_getmcolor()
</tt>.
<div class='online-navigation'
>
<table align=
"center" width=
"100%" cellpadding=
"0" cellspacing=
"2">
<td class='online-navigation'
><a rel=
"prev" title=
"20.4 fl "
href=
"module-fl.html"><img src='../icons/previous.png'
border='
0' height='
32' alt='Previous Page' width='
32'
/></A></td>
<td class='online-navigation'
><a rel=
"parent" title=
"20.4 fl "
href=
"module-fl.html"><img src='../icons/up.png'
border='
0' height='
32' alt='Up One Level' width='
32'
/></A></td>
<td class='online-navigation'
><a rel=
"next" title=
"20.4.2 Form Objects"
href=
"form-objects.html"><img src='../icons/next.png'
border='
0' height='
32' alt='Next Page' width='
32'
/></A></td>
<td align=
"center" width=
"100%">Python Library Reference
</td>
<td class='online-navigation'
><a rel=
"contents" title=
"Table of Contents"
href=
"contents.html"><img src='../icons/contents.png'
border='
0' height='
32' alt='Contents' width='
32'
/></A></td>
<td class='online-navigation'
><a href=
"modindex.html" title=
"Module Index"><img src='../icons/modules.png'
border='
0' height='
32' alt='Module Index' width='
32'
/></a></td>
<td class='online-navigation'
><a rel=
"index" title=
"Index"
href=
"genindex.html"><img src='../icons/index.png'
border='
0' height='
32' alt='Index' width='
32'
/></A></td>
<div class='online-navigation'
>
<b class=
"navlabel">Previous:
</b>
<a class=
"sectref" rel=
"prev" href=
"module-fl.html">20.4 fl
</A>
<b class=
"navlabel">Up:
</b>
<a class=
"sectref" rel=
"parent" href=
"module-fl.html">20.4 fl
</A>
<b class=
"navlabel">Next:
</b>
<a class=
"sectref" rel=
"next" href=
"form-objects.html">20.4.2 Form Objects
</A>
<span class=
"release-info">Release
2.4.2, documentation updated on
28 September
2005.
</span>
<!--End of Navigation Panel-->
See
<i><a href=
"about.html">About this document...
</a></i> for information on suggesting changes.