Sophie

Sophie

distrib > Mandriva > 10.1 > i586 > by-pkgid > ccf83290023404568bb21aa0163b385f > files > 348

python-docs-2.3.4-6.2.101mdk.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link rel="STYLESHEET" href="lib.css" type='text/css' />
<link rel="SHORTCUT ICON" href="../icons/pyfav.gif" />
<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="forms-objects.html">
<LINK rel="prev" href="node721.html">
<LINK rel="parent" href="module-fl.html">
<LINK rel="next" href="forms-objects.html">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name='aesop' content='information' />
<META name="description" content="Form Objects">
<META name="keywords" content="lib">
<META name="resource-type" content="document">
<META name="distribution" content="global">
<title>20.4.2 Form Objects</title>
</head>
<body>
<DIV CLASS="navigation">
<div id='top-navigation-panel'>
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="20.4.1 Functions Defined in" 
  href="node721.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.3 FORMS Objects" 
  href="forms-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>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">Previous:</b>
<a class="sectref" rel="prev" href="node721.html">20.4.1 Functions Defined in</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="forms-objects.html">20.4.3 FORMS Objects</A>
</div>
<hr /></div>
</DIV>
<!--End of Navigation Panel-->

<H2><A NAME="SECTION0022420000000000000000"><!--x--></A>
<A NAME="form-objects"><!--z--></A>
<BR>
20.4.2 Form Objects
</H2>

<P>
Form objects (returned by <tt class="function">make_form()</tt> above) have the
following methods.  Each method corresponds to a C function whose
name is prefixed with "<tt class="samp">fl_</tt>"; and whose first argument is a form
pointer; please refer to the official FORMS documentation for
descriptions.

<P>
All the <tt class="method">add_*()</tt> 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.

<P>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4849' class="method">show_form</tt></b>(</nobr></td>
  <td><var>placement, bordertype, name</var>)</td></tr></table></dt>
<dd>
  Show the form.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4850' class="method">hide_form</tt></b>(</nobr></td>
  <td>)</td></tr></table></dt>
<dd>
  Hide the form.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4851' class="method">redraw_form</tt></b>(</nobr></td>
  <td>)</td></tr></table></dt>
<dd>
  Redraw the form.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4852' class="method">set_form_position</tt></b>(</nobr></td>
  <td><var>x, y</var>)</td></tr></table></dt>
<dd>
Set the form's position.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4853' class="method">freeze_form</tt></b>(</nobr></td>
  <td>)</td></tr></table></dt>
<dd>
Freeze the form.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4854' class="method">unfreeze_form</tt></b>(</nobr></td>
  <td>)</td></tr></table></dt>
<dd>
  Unfreeze the form.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4855' class="method">activate_form</tt></b>(</nobr></td>
  <td>)</td></tr></table></dt>
<dd>
  Activate the form.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4856' class="method">deactivate_form</tt></b>(</nobr></td>
  <td>)</td></tr></table></dt>
<dd>
  Deactivate the form.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4857' class="method">bgn_group</tt></b>(</nobr></td>
  <td>)</td></tr></table></dt>
<dd>
  Begin a new group of objects; return a group object.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4858' class="method">end_group</tt></b>(</nobr></td>
  <td>)</td></tr></table></dt>
<dd>
  End the current group of objects.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4859' class="method">find_first</tt></b>(</nobr></td>
  <td>)</td></tr></table></dt>
<dd>
  Find the first object in the form.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4860' class="method">find_last</tt></b>(</nobr></td>
  <td>)</td></tr></table></dt>
<dd>
  Find the last object in the form.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4861' class="method">add_box</tt></b>(</nobr></td>
  <td><var>type, x, y, w, h, name</var>)</td></tr></table></dt>
<dd>
Add a box object to the form.
No extra methods.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4862' class="method">add_text</tt></b>(</nobr></td>
  <td><var>type, x, y, w, h, name</var>)</td></tr></table></dt>
<dd>
Add a text object to the form.
No extra methods.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4863' class="method">add_clock</tt></b>(</nobr></td>
  <td><var>type, x, y, w, h, name</var>)</td></tr></table></dt>
<dd>
Add a clock object to the form. 
<BR>
Method:
<tt class="method">get_clock()</tt>.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4864' class="method">add_button</tt></b>(</nobr></td>
  <td><var>type, x, y, w, h,  name</var>)</td></tr></table></dt>
<dd>
Add a button object to the form. 
<BR>
Methods:
<tt class="method">get_button()</tt>,
<tt class="method">set_button()</tt>.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4865' class="method">add_lightbutton</tt></b>(</nobr></td>
  <td><var>type, x, y, w, h, name</var>)</td></tr></table></dt>
<dd>
Add a lightbutton object to the form. 
<BR>
Methods:
<tt class="method">get_button()</tt>,
<tt class="method">set_button()</tt>.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4866' class="method">add_roundbutton</tt></b>(</nobr></td>
  <td><var>type, x, y, w, h, name</var>)</td></tr></table></dt>
<dd>
Add a roundbutton object to the form. 
<BR>
Methods:
<tt class="method">get_button()</tt>,
<tt class="method">set_button()</tt>.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4867' class="method">add_slider</tt></b>(</nobr></td>
  <td><var>type, x, y, w, h, name</var>)</td></tr></table></dt>
<dd>
Add a slider object to the form. 
<BR>
Methods:
<tt class="method">set_slider_value()</tt>,
<tt class="method">get_slider_value()</tt>,
<tt class="method">set_slider_bounds()</tt>,
<tt class="method">get_slider_bounds()</tt>,
<tt class="method">set_slider_return()</tt>,
<tt class="method">set_slider_size()</tt>,
<tt class="method">set_slider_precision()</tt>,
<tt class="method">set_slider_step()</tt>.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4868' class="method">add_valslider</tt></b>(</nobr></td>
  <td><var>type, x, y, w, h, name</var>)</td></tr></table></dt>
<dd>
Add a valslider object to the form. 
<BR>
Methods:
<tt class="method">set_slider_value()</tt>,
<tt class="method">get_slider_value()</tt>,
<tt class="method">set_slider_bounds()</tt>,
<tt class="method">get_slider_bounds()</tt>,
<tt class="method">set_slider_return()</tt>,
<tt class="method">set_slider_size()</tt>,
<tt class="method">set_slider_precision()</tt>,
<tt class="method">set_slider_step()</tt>.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4869' class="method">add_dial</tt></b>(</nobr></td>
  <td><var>type, x, y, w, h, name</var>)</td></tr></table></dt>
<dd>
Add a dial object to the form. 
<BR>
Methods:
<tt class="method">set_dial_value()</tt>,
<tt class="method">get_dial_value()</tt>,
<tt class="method">set_dial_bounds()</tt>,
<tt class="method">get_dial_bounds()</tt>.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4870' class="method">add_positioner</tt></b>(</nobr></td>
  <td><var>type, x, y, w, h, name</var>)</td></tr></table></dt>
<dd>
Add a positioner object to the form. 
<BR>
Methods:
<tt class="method">set_positioner_xvalue()</tt>,
<tt class="method">set_positioner_yvalue()</tt>,
<tt class="method">set_positioner_xbounds()</tt>,
<tt class="method">set_positioner_ybounds()</tt>,
<tt class="method">get_positioner_xvalue()</tt>,
<tt class="method">get_positioner_yvalue()</tt>,
<tt class="method">get_positioner_xbounds()</tt>,
<tt class="method">get_positioner_ybounds()</tt>.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4871' class="method">add_counter</tt></b>(</nobr></td>
  <td><var>type, x, y, w, h, name</var>)</td></tr></table></dt>
<dd>
Add a counter object to the form. 
<BR>
Methods:
<tt class="method">set_counter_value()</tt>,
<tt class="method">get_counter_value()</tt>,
<tt class="method">set_counter_bounds()</tt>,
<tt class="method">set_counter_step()</tt>,
<tt class="method">set_counter_precision()</tt>,
<tt class="method">set_counter_return()</tt>.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4872' class="method">add_input</tt></b>(</nobr></td>
  <td><var>type, x, y, w, h, name</var>)</td></tr></table></dt>
<dd>
Add a input object to the form. 
<BR>
Methods:
<tt class="method">set_input()</tt>,
<tt class="method">get_input()</tt>,
<tt class="method">set_input_color()</tt>,
<tt class="method">set_input_return()</tt>.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4873' class="method">add_menu</tt></b>(</nobr></td>
  <td><var>type, x, y, w, h, name</var>)</td></tr></table></dt>
<dd>
Add a menu object to the form. 
<BR>
Methods:
<tt class="method">set_menu()</tt>,
<tt class="method">get_menu()</tt>,
<tt class="method">addto_menu()</tt>.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4874' class="method">add_choice</tt></b>(</nobr></td>
  <td><var>type, x, y, w, h, name</var>)</td></tr></table></dt>
<dd>
Add a choice object to the form. 
<BR>
Methods:
<tt class="method">set_choice()</tt>,
<tt class="method">get_choice()</tt>,
<tt class="method">clear_choice()</tt>,
<tt class="method">addto_choice()</tt>,
<tt class="method">replace_choice()</tt>,
<tt class="method">delete_choice()</tt>,
<tt class="method">get_choice_text()</tt>,
<tt class="method">set_choice_fontsize()</tt>,
<tt class="method">set_choice_fontstyle()</tt>.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4875' class="method">add_browser</tt></b>(</nobr></td>
  <td><var>type, x, y, w, h, name</var>)</td></tr></table></dt>
<dd>
Add a browser object to the form. 
<BR>
Methods:
<tt class="method">set_browser_topline()</tt>,
<tt class="method">clear_browser()</tt>,
<tt class="method">add_browser_line()</tt>,
<tt class="method">addto_browser()</tt>,
<tt class="method">insert_browser_line()</tt>,
<tt class="method">delete_browser_line()</tt>,
<tt class="method">replace_browser_line()</tt>,
<tt class="method">get_browser_line()</tt>,
<tt class="method">load_browser()</tt>,
<tt class="method">get_browser_maxline()</tt>,
<tt class="method">select_browser_line()</tt>,
<tt class="method">deselect_browser_line()</tt>,
<tt class="method">deselect_browser()</tt>,
<tt class="method">isselected_browser_line()</tt>,
<tt class="method">get_browser()</tt>,
<tt class="method">set_browser_fontsize()</tt>,
<tt class="method">set_browser_fontstyle()</tt>,
<tt class="method">set_browser_specialkey()</tt>.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-4876' class="method">add_timer</tt></b>(</nobr></td>
  <td><var>type, x, y, w, h, name</var>)</td></tr></table></dt>
<dd>
Add a timer object to the form. 
<BR>
Methods:
<tt class="method">set_timer()</tt>,
<tt class="method">get_timer()</tt>.
</dl>
<DIV ALIGN="LEFT">
</DIV>

<P>
Form objects have the following data attributes; see the FORMS
documentation:

<P>
<table border align="center" style="border-collapse: collapse">
  <thead>
    <tr class="tableheader">
      <th align="left"><b>Name</b>&nbsp;</th>
      <th align="left"><b>C Type</b>&nbsp;</th>
      <th align="left"><b>Meaning</b>&nbsp;</th>
      </tr>
    </thead>
  <tbody valign="baseline">
    <tr><td align="left" valign="baseline"><tt class="member">window</tt></td>
        <td align="left">int (read-only)</td>
        <td align="left">GL window id</td>
    <tr><td align="left" valign="baseline"><tt class="member">w</tt></td>
        <td align="left">float</td>
        <td align="left">form width</td>
    <tr><td align="left" valign="baseline"><tt class="member">h</tt></td>
        <td align="left">float</td>
        <td align="left">form height</td>
    <tr><td align="left" valign="baseline"><tt class="member">x</tt></td>
        <td align="left">float</td>
        <td align="left">form x origin</td>
    <tr><td align="left" valign="baseline"><tt class="member">y</tt></td>
        <td align="left">float</td>
        <td align="left">form y origin</td>
    <tr><td align="left" valign="baseline"><tt class="member">deactivated</tt></td>
        <td align="left">int</td>
        <td align="left">nonzero if form is deactivated</td>
    <tr><td align="left" valign="baseline"><tt class="member">visible</tt></td>
        <td align="left">int</td>
        <td align="left">nonzero if form is visible</td>
    <tr><td align="left" valign="baseline"><tt class="member">frozen</tt></td>
        <td align="left">int</td>
        <td align="left">nonzero if form is frozen</td>
    <tr><td align="left" valign="baseline"><tt class="member">doublebuf</tt></td>
        <td align="left">int</td>
        <td align="left">nonzero if double buffering on</td></tbody>
</table>

<P>

<DIV CLASS="navigation">
<div class='online-navigation'><hr />
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="20.4.1 Functions Defined in" 
  rel="prev" title="20.4.1 Functions Defined in" 
  href="node721.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  " 
  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.3 FORMS Objects" 
  rel="next" title="20.4.3 FORMS Objects" 
  href="forms-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" 
  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" 
  rel="index" title="Index" 
  href="genindex.html"><img src='../icons/index.png'
  border='0' height='32'  alt='Index' width='32' /></A></td>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">Previous:</b>
<a class="sectref" rel="prev" href="node721.html">20.4.1 Functions Defined in</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="forms-objects.html">20.4.3 FORMS Objects</A>
</div>
</div>
<hr />
<span class="release-info">Release 2.3.4, documentation updated on May 20, 2004.</span>
</DIV>
<!--End of Navigation Panel-->
<ADDRESS>
See <i><a href="about.html">About this document...</a></i> for information on suggesting changes.
</ADDRESS>
</BODY>
</HTML>