mirror of
https://github.com/fltk/fltk.git
synced 2026-05-20 04:31:25 +08:00
Updated all links so they work between files.
Revision 1. git-svn-id: file:///fltk/svn/fltk/trunk@219 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -1,61 +1,47 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Adjuster">class Fl_Adjuster</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Valuator">Fl_Valuator</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Adjuster>class Fl_Adjuster</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Valuator.html#Fl_Valuator>Fl_Valuator</A>
|
||||
|
|
||||
+----<b>Fl_Adjuster</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Adjuster.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Adjuster</tt> widget was stolen from Prisms, and has
|
||||
proven to be very useful for values that need a large dynamic range.
|
||||
When you press a button and drag to the right the value increases. When
|
||||
you drag to the left it decreases. The largest button adjusts by
|
||||
<tt>100 * step()</tt>, the next by <tt>10 * step()</tt> and that
|
||||
smallest button by <tt>step()</tt>. Clicking on the buttons increments
|
||||
by 10 times the amount dragging by a pixel does. Shift + click
|
||||
decrements by 10 times the amount.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Adjuster.Fl_Adjuster">Fl_Adjuster</a>
|
||||
<li><a href="#Fl_Adjuster.~Fl_Adjuster">~Fl_Adjuster</a>
|
||||
<li><a href="#Fl_Adjuster.soft">soft</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Adjuster.Fl_Adjuster">Fl_Adjuster::Fl_Adjuster(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Adjuster</tt> widget using the given position, size, and
|
||||
label string. It looks best if one of the dimensions is 3 times the other.
|
||||
|
||||
<h4><a name="Fl_Adjuster.~Fl_Adjuster">virtual Fl_Adjuster::~Fl_Adjuster()</a></h4>
|
||||
|
||||
Destroys the valuator.
|
||||
|
||||
<h4><a name="Fl_Adjuster.soft">uchar Fl_Adjuster::soft() const<br>
|
||||
void Fl_Adjuster::soft(uchar)</a></h4>
|
||||
|
||||
If "soft" is turned on, the user is allowed to drag the value outside
|
||||
the range. If they drag the value to one of the ends, let go, then
|
||||
grab again and continue to drag, they can get to any value. Default
|
||||
is one.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Adjuster</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Adjuster.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Adjuster</TT> widget was stolen from Prisms, and has proven
|
||||
to be very useful for values that need a large dynamic range. When you
|
||||
press a button and drag to the right the value increases. When you drag
|
||||
to the left it decreases. The largest button adjusts by <TT>100 *
|
||||
step()</TT>, the next by <TT>10 * step()</TT> and that smallest button
|
||||
by <TT>step()</TT>. Clicking on the buttons increments by 10 times the
|
||||
amount dragging by a pixel does. Shift + click decrements by 10 times
|
||||
the amount.
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Adjuster.Fl_Adjuster>Fl_Adjuster</A></LI>
|
||||
<LI><A href=#Fl_Adjuster.~Fl_Adjuster>~Fl_Adjuster</A></LI>
|
||||
<LI><A href=#Fl_Adjuster.soft>soft</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Adjuster.Fl_Adjuster>Fl_Adjuster::Fl_Adjuster(int x, int
|
||||
y, int w, int h, const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Adjuster</TT> widget using the given position,
|
||||
size, and label string. It looks best if one of the dimensions is 3
|
||||
times the other.
|
||||
<H4><A name=Fl_Adjuster.~Fl_Adjuster>virtual Fl_Adjuster::~Fl_Adjuster()</A>
|
||||
</H4>
|
||||
Destroys the valuator.
|
||||
<H4><A name=Fl_Adjuster.soft>uchar Fl_Adjuster::soft() const
|
||||
<BR> void Fl_Adjuster::soft(uchar)</A></H4>
|
||||
If "soft" is turned on, the user is allowed to drag the value outside
|
||||
the range. If they drag the value to one of the ends, let go, then
|
||||
grab again and continue to drag, they can get to any value. Default is
|
||||
one. </BODY></HTML>
|
||||
+38
-51
@@ -1,52 +1,39 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Box">class Fl_Box</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Widget">Fl_Widget</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Box>class Fl_Box</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Widget.html#Fl_Widget>Fl_Widget</A>
|
||||
|
|
||||
+----<b>Fl_Box</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Box.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
This widget simply draws its box, and possibly it's label. Putting it
|
||||
before some other widgets and making it big enough to surround them
|
||||
will let you draw a frame around them.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Box.Fl_Box">Fl_Box</a>
|
||||
<li><a href="#Fl_Box.~Fl_Box">~Fl_Box</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Box.Fl_Box">Fl_Box::Fl_Box(int x, int y, int w, int h, const char * = 0)<br>
|
||||
Fl_Box::Fl_Box(Fl_Boxtype b, int x, int y, int w, int h, const char *)</a></h4>
|
||||
|
||||
The first constructor sets <tt>box()</tt> to <tt>FL_NO_BOX</tt>, which
|
||||
means it is invisible. However such widgets are useful as placeholders
|
||||
or <a href=#Fl_Group.resizable"><tt>Fl_Group::resizable()</tt></a>
|
||||
values. To change the box to something visible, use <tt>box(n)</tt>.
|
||||
|
||||
<p>The second form of the constructor sets the box to the specified box type.
|
||||
|
||||
<h4><a name="Fl_Box.~Fl_Box">Fl_Box::~Fl_Box(void)</a></h4>
|
||||
|
||||
The destructor removes the box.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Box</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Box.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
This widget simply draws its box, and possibly it's label. Putting it
|
||||
before some other widgets and making it big enough to surround them
|
||||
will let you draw a frame around them.
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Box.Fl_Box>Fl_Box</A></LI>
|
||||
<LI><A href=#Fl_Box.~Fl_Box>~Fl_Box</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Box.Fl_Box>Fl_Box::Fl_Box(int x, int y, int w, int h,
|
||||
const char * = 0)
|
||||
<BR> Fl_Box::Fl_Box(Fl_Boxtype b, int x, int y, int w, int h, const
|
||||
char *)</A></H4>
|
||||
The first constructor sets <TT>box()</TT> to <TT>FL_NO_BOX</TT>, which
|
||||
means it is invisible. However such widgets are useful as placeholders
|
||||
or <A href=#Fl_Group.resizable"><TT>Fl_Group::resizable()</TT></A>
|
||||
values. To change the box to something visible, use <TT>box(n)</TT>.
|
||||
<P>The second form of the constructor sets the box to the specified box
|
||||
type. </P>
|
||||
<H4><A name=Fl_Box.~Fl_Box>Fl_Box::~Fl_Box(void)</A></H4>
|
||||
The destructor removes the box. </BODY></HTML>
|
||||
+198
-274
@@ -1,276 +1,200 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Browser">class Fl_Browser</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Browser_">Fl_Browser_</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Browser>class Fl_Browser</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Browser_.html#Fl_Browser_>Fl_Browser_</A>
|
||||
|
|
||||
+----<b>Fl_Browser</b>
|
||||
+----<B>Fl_Browser</B>
|
||||
|
|
||||
+----<a href="#Fl_Hold_Browser">Fl_Hold_Browser</a>, <a href="#Fl_Multi_Browser">Fl_Multi_Browser</a>, <a href="#Fl_Select_Browser">Fl_Select_Browser</a>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Browser.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Browser</tt> widget displays a scrolling list of text lines,
|
||||
and manages all the storage for the text. This is not a text editor or
|
||||
spreadsheet! But it is useful for showing a vertical list of named
|
||||
objects to the user.
|
||||
|
||||
<p>Each line in the browser is identified by number. <i>The numbers
|
||||
start at one</i> (this is so that zero can be reserved for "no line"
|
||||
in the selective browsers). <i>Unless otherwise noted, the methods do
|
||||
not check to see if the passed line number is in range and legal. It
|
||||
must always be greater than zero and <= <tt>size()</tt>.</i>
|
||||
|
||||
<p>Each line contains a null-terminated string of text and a <tt>void
|
||||
*</tt> data pointer. The text string is displayed, the <tt>void *</tt>
|
||||
pointer can be used by the callbacks to reference the object the text
|
||||
describes.
|
||||
|
||||
<p>The base class does nothing when the user clicks on it. The subclasses
|
||||
<a href="#Fl_Select_Browser"><tt>Fl_Select_Browser</tt></a>,
|
||||
<a href="#Fl_Hold_Browser"><tt>Fl_Hold_Browser</tt></a>, and
|
||||
<a href="#Fl_Multi_Browser"><tt>Fl_Multi_Browser</tt></a>
|
||||
react to user clicks to select lines in the browser and do callbacks.
|
||||
|
||||
<p>The base class called <a href="#Fl_Browser_">
|
||||
<tt>Fl_Browser_</tt></a> provides the scrolling and selection
|
||||
mechanisms of this and all the subclasses, but the dimensions and
|
||||
appearance of each item are determined by the subclass. You can use
|
||||
<tt>Fl_Browser_</tt> to display information other than text, or text
|
||||
that is dynamically produced from your own data structures. If you find
|
||||
that loading the browser is a lot of work or is inefficient, you may
|
||||
want to make a subclass of <tt>Fl_Browser_</tt>.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<center>
|
||||
<table width=90%>
|
||||
<tr>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Browser.Fl_Browser">Fl_Browser</a>
|
||||
<li><a href="#Fl_Browser.~Fl_Browser">~Fl_Browser</a>
|
||||
<li><a href="#Fl_Browser.add">add</a>
|
||||
<li><a href="#Fl_Browser.clear">clear</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Browser.column_char">column_char</a>
|
||||
<li><a href="#Fl_Browser.column_widths">column_widths</a>
|
||||
<li><a href="#Fl_Browser.data">data</a>
|
||||
<li><a href="#Fl_Browser.format_char">format_char</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Browser.hide">hide</a>
|
||||
<li><a href="#Fl_Browser.insert">insert</a>
|
||||
<li><a href="#Fl_Browser.load">load</a>
|
||||
<li><a href="#Fl_Browser.move">move</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Browser.position">position</a>
|
||||
<li><a href="#Fl_Browser.remove">remove</a>
|
||||
<li><a href="#Fl_Browser.show">show</a>
|
||||
<li><a href="#Fl_Browser.size">size</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Browser.text">text</a>
|
||||
<li><a href="#Fl_Browser.topline">topline</a>
|
||||
<li><a href="#Fl_Browser.visible">visible</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<h4><a name="Fl_Browser.Fl_Browser">Fl_Browser::Fl_Browser(int, int, int, int, const char * = 0)</a></h4>
|
||||
|
||||
The constructor makes an empty browser.
|
||||
|
||||
<h4><a name="Fl_Browser.~Fl_Browser">Fl_Browser::~Fl_Browser(void)</a></h4>
|
||||
|
||||
The destructor deletes all list items and destroys the browser.
|
||||
|
||||
<h4><a name="Fl_Browser.add">void Fl_Browser::add(const char *, void * = 0)</a></h4>
|
||||
|
||||
Add a new line to the end of the browser. The text is copied using the
|
||||
<tt>strdup()</tt> function. It may also be <tt>NULL</tt> to make a
|
||||
blank line. The <tt>void *</tt> argument is returned as the
|
||||
<tt>data()</tt> of the new item.
|
||||
|
||||
<h4><a name="Fl_Browser.clear">void Fl_Browser::clear()</a></h4>
|
||||
|
||||
Remove all the lines in the browser.
|
||||
|
||||
<h4><a name="Fl_Browser.column_char">uchar Fl_Browser::column_char() const<br>
|
||||
void Fl_Browser::column_char(char c)</a></h4>
|
||||
|
||||
The first form gets the current column separator character. By default this is
|
||||
<tt>'\t'</tt> (tab).
|
||||
|
||||
<p>The second form sets the column separator to <tt>c</tt>. This will only
|
||||
have an effect if you also set <tt>column_widths()</tt>.
|
||||
|
||||
<h4><a name="Fl_Browser.column_widths">const int *Fl_Browser::column_widths() const<br>
|
||||
void Fl_Browser::column_widths(const int *w)</a></h4>
|
||||
|
||||
The first form gets the current column width array. This array is
|
||||
zero-terminated and specifies the widths in pixels of each column. The
|
||||
text is split at each <tt>column_char()</tt> and each part is formatted
|
||||
into it's own column. After the last column any remaining text is
|
||||
formatted into the space between the last column and the right edge of
|
||||
the browser, even if the text contains instances of
|
||||
<tt>column_char()</tt>. The default value is a one-element array of
|
||||
just a zero, which makes there are no columns.
|
||||
|
||||
<p>The second form sets the current array to <tt>w</tt>. Make sure the last
|
||||
entry is zero.
|
||||
|
||||
<h4><a name="Fl_Browser.data">void *Fl_Browser::data(int n) const<br>
|
||||
void Fl_Browser::data(int n, void *)</a></h4>
|
||||
|
||||
The first form returns the data for line <tt>n</tt>. If <tt>n</tt> is
|
||||
out of range this returns <tt>NULL</tt>.
|
||||
|
||||
<p>The second form sets the data for line <tt>n</tt>.
|
||||
|
||||
<h4><a name="Fl_Browser.format_char">uchar Fl_Browser::format_char() const<br>
|
||||
void Fl_Browser::format_char(char c)</a></h4>
|
||||
|
||||
The first form gets the current format code prefix character, which by
|
||||
default is <tt>@</tt>. A string of formatting codes at the start of
|
||||
each column are stripped off and used to modify how the rest of the
|
||||
line is printed:
|
||||
|
||||
<ul>
|
||||
<li><code>@.</code> Print rest of line, don't look for more '@' signs
|
||||
|
||||
<li><code>@@</code> Print rest of line starting with '@'
|
||||
|
||||
<li><code>@l</code> Use a <big>large</big> (24 point) font
|
||||
|
||||
<li><code>@m</code> Use a <big>medium large</big> (18 point) font
|
||||
|
||||
<li><code>@s</code> Use a <small>small</small> (11 point) font
|
||||
|
||||
<li><code>@b</code> Use a <b>bold</b> font (adds FL_BOLD to font)
|
||||
|
||||
<li><code>@i</code> Use an <i>italic</i> font (adds FL_ITALIC to font)
|
||||
|
||||
<li><code>@f</code> or <code>@t</code> Use a <code>fixed-pitch</code>
|
||||
font (sets font to FL_COURIER)
|
||||
|
||||
<li><code>@c</code> Center the line horizontally
|
||||
|
||||
<li><code>@r</code> Right-justify the text
|
||||
|
||||
<li><code>@B0, @B1, ... @B255</code> Fill the backgound with fl_color(n)
|
||||
|
||||
<li><code>@C0, @C1, ... @C255</code> Use fl_color(n) to draw the text
|
||||
|
||||
<li><code>@F0, @F1, ... </code> Use fl_font(n) to draw the text
|
||||
|
||||
<li><code>@S1, @S2, ... </code> Use point size n to draw the text
|
||||
|
||||
<li><code>@u</code> or <code>@_</code> Underline the text.
|
||||
|
||||
<li><code>@-</code> draw an engraved line through the middle.
|
||||
</ul>
|
||||
|
||||
Notice that the <code>@.</code> command can be used to reliably
|
||||
terminate the parsing. To print a random string in a random color,
|
||||
use <tt>sprintf("@C%d@.%s", color, string)</tt> and it will work even
|
||||
if the string starts with a digit or has the format character in it.
|
||||
|
||||
<p>The second form sets the current prefix to <tt>c</tt>. Set the prefix
|
||||
to 0 to disable formatting.
|
||||
|
||||
<h4><a name="Fl_Browser.hide">void Fl_Browser::hide(int n)</a></h4>
|
||||
|
||||
Makes line <tt>n</tt> invisible, preventing selection by the user. The line
|
||||
can still be selected under program control.
|
||||
|
||||
<h4><a name="Fl_Browser.insert">void Fl_Browser::insert(int n, const char *, void * = 0)</a></h4>
|
||||
|
||||
Insert a new line <i>before</i> line <tt>n</tt>. If <tt>n</tt> >
|
||||
<tt>size()</tt> then the line is added to the end.
|
||||
|
||||
<h4><a name="Fl_Browser.load">int Fl_Browser::load(const char *filename)</a></h4>
|
||||
|
||||
Clears the browser and reads the file, adding each line from the file
|
||||
to the browser. If the filename is <tt>NULL</tt> or a zero-length
|
||||
string then this just clears the browser. This returns zero if there
|
||||
was any error in opening or reading the file, in which case
|
||||
<tt>errno</tt> is set to the system error. The <tt>data()</tt> of each
|
||||
line is set to <tt>NULL</tt>.
|
||||
|
||||
<h4><a name="Fl_Browser.move">void Fl_Browser::move(int to, int from)</a></h4>
|
||||
|
||||
Line <tt>from</tt> is removed and reinserted at <tt>to</tt>; <tt>to</tt>
|
||||
is calculated after the line is removed.
|
||||
|
||||
<h4><a name="Fl_Browser.position">int Fl_Browser::position() const<br>
|
||||
void Fl_Browser::position(int p)</a></h4>
|
||||
|
||||
The first form returns the current vertical scrollbar position, where 0
|
||||
corresponds to the top. If there is not vertical scrollbar then this
|
||||
will always return 0.
|
||||
|
||||
<h4><a name="Fl_Browser.remove">void Fl_Browser::remove(int n)</a></h4>
|
||||
|
||||
Remove line <tt>n</tt> and make the browser one line shorter.
|
||||
|
||||
<h4><a name="Fl_Browser.show">void Fl_Browser::show(int n)</a></h4>
|
||||
|
||||
Makes line <tt>n</tt> visible for selection.
|
||||
|
||||
<h4><a name="Fl_Browser.size">int Fl_Browser::size() const</a></h4>
|
||||
|
||||
Returns how many lines are in the browser. The last line number is
|
||||
equal to this.
|
||||
|
||||
<h4><a name="Fl_Browser.text">const char *Fl_Browser::text(int n) const<br>
|
||||
void Fl_Browser::text(int n, const char *)</a></h4>
|
||||
|
||||
The first form returns the text for line <tt>n</tt>. If <tt>n</tt> is
|
||||
out of range it returns <tt>NULL</tt>.
|
||||
|
||||
<p>The second form sets the text for line <tt>n</tt>.
|
||||
|
||||
<h4><a name="Fl_Browser.topline">int Fl_Browser::topline() const<br>
|
||||
void Fl_Browser::topline(int n)</a></h4>
|
||||
|
||||
The first form returns the current top line in the browser. If there is no
|
||||
vertical scrollbar then this will always return 1.
|
||||
|
||||
<p>The second form sets the top line in the browser to <tt>n</tt>.
|
||||
|
||||
<p>The second form sets the vertical scrollbar position to <tt>p</tt>.
|
||||
|
||||
<h4><a name="Fl_Browser.visible">int Fl_Browser::visible(int n) const</a></h4>
|
||||
|
||||
Returns a non-zero value if line <tt>n</tt> is visible.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<A href=Fl_Hold_Browser.html#Fl_Hold_Browser>Fl_Hold_Browser</A>, <A href=Fl_Multi_Browser.html#Fl_Multi_Browser>Fl_Multi_Browser</A>, <A href=Fl_Select_Browser.html#Fl_Select_Browser>Fl_Select_Browser</A>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Browser.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Browser</TT> widget displays a scrolling list of text
|
||||
lines, and manages all the storage for the text. This is not a text
|
||||
editor or spreadsheet! But it is useful for showing a vertical list of
|
||||
named objects to the user.
|
||||
<P>Each line in the browser is identified by number. <I>The numbers
|
||||
start at one</I> (this is so that zero can be reserved for "no line" in
|
||||
the selective browsers). <I>Unless otherwise noted, the methods do not
|
||||
check to see if the passed line number is in range and legal. It must
|
||||
always be greater than zero and <= <TT>size()</TT>.</I></P>
|
||||
<P>Each line contains a null-terminated string of text and a <TT>void *</TT>
|
||||
data pointer. The text string is displayed, the <TT>void *</TT>
|
||||
pointer can be used by the callbacks to reference the object the text
|
||||
describes. </P>
|
||||
<P>The base class does nothing when the user clicks on it. The
|
||||
subclasses <A href=Fl_Select_Browser.html#Fl_Select_Browser><TT>
|
||||
Fl_Select_Browser</TT></A>, <A href=Fl_Hold_Browser.html#Fl_Hold_Browser>
|
||||
<TT>Fl_Hold_Browser</TT></A>, and <A href=Fl_Multi_Browser.html#Fl_Multi_Browser>
|
||||
<TT>Fl_Multi_Browser</TT></A> react to user clicks to select lines in
|
||||
the browser and do callbacks. </P>
|
||||
<P>The base class called <A href=Fl_Browser_.html#Fl_Browser_><TT>
|
||||
Fl_Browser_</TT></A> provides the scrolling and selection mechanisms of
|
||||
this and all the subclasses, but the dimensions and appearance of each
|
||||
item are determined by the subclass. You can use <TT>Fl_Browser_</TT>
|
||||
to display information other than text, or text that is dynamically
|
||||
produced from your own data structures. If you find that loading the
|
||||
browser is a lot of work or is inefficient, you may want to make a
|
||||
subclass of <TT>Fl_Browser_</TT>. </P>
|
||||
<H3>Methods</H3>
|
||||
<CENTER>
|
||||
<TABLE width=90%>
|
||||
<TR><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Browser.Fl_Browser>Fl_Browser</A></LI>
|
||||
<LI><A href=#Fl_Browser.~Fl_Browser>~Fl_Browser</A></LI>
|
||||
<LI><A href=#Fl_Browser.add>add</A></LI>
|
||||
<LI><A href=#Fl_Browser.clear>clear</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Browser.column_char>column_char</A></LI>
|
||||
<LI><A href=#Fl_Browser.column_widths>column_widths</A></LI>
|
||||
<LI><A href=#Fl_Browser.data>data</A></LI>
|
||||
<LI><A href=#Fl_Browser.format_char>format_char</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Browser.hide>hide</A></LI>
|
||||
<LI><A href=#Fl_Browser.insert>insert</A></LI>
|
||||
<LI><A href=#Fl_Browser.load>load</A></LI>
|
||||
<LI><A href=#Fl_Browser.move>move</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Browser.position>position</A></LI>
|
||||
<LI><A href=#Fl_Browser.remove>remove</A></LI>
|
||||
<LI><A href=#Fl_Browser.show>show</A></LI>
|
||||
<LI><A href=#Fl_Browser.size>size</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Browser.text>text</A></LI>
|
||||
<LI><A href=#Fl_Browser.topline>topline</A></LI>
|
||||
<LI><A href=#Fl_Browser.visible>visible</A></LI>
|
||||
</UL>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
<H4><A name=Fl_Browser.Fl_Browser>Fl_Browser::Fl_Browser(int, int, int,
|
||||
int, const char * = 0)</A></H4>
|
||||
The constructor makes an empty browser.
|
||||
<H4><A name=Fl_Browser.~Fl_Browser>Fl_Browser::~Fl_Browser(void)</A></H4>
|
||||
The destructor deletes all list items and destroys the browser.
|
||||
<H4><A name=Fl_Browser.add>void Fl_Browser::add(const char *, void * =
|
||||
0)</A></H4>
|
||||
Add a new line to the end of the browser. The text is copied using
|
||||
the <TT>strdup()</TT> function. It may also be <TT>NULL</TT> to make a
|
||||
blank line. The <TT>void *</TT> argument is returned as the <TT>data()</TT>
|
||||
of the new item.
|
||||
<H4><A name=Fl_Browser.clear>void Fl_Browser::clear()</A></H4>
|
||||
Remove all the lines in the browser.
|
||||
<H4><A name=Fl_Browser.column_char>uchar Fl_Browser::column_char() const
|
||||
<BR> void Fl_Browser::column_char(char c)</A></H4>
|
||||
The first form gets the current column separator character. By default
|
||||
this is <TT>'\t'</TT> (tab).
|
||||
<P>The second form sets the column separator to <TT>c</TT>. This will
|
||||
only have an effect if you also set <TT>column_widths()</TT>. </P>
|
||||
<H4><A name=Fl_Browser.column_widths>const int
|
||||
*Fl_Browser::column_widths() const
|
||||
<BR> void Fl_Browser::column_widths(const int *w)</A></H4>
|
||||
The first form gets the current column width array. This array is
|
||||
zero-terminated and specifies the widths in pixels of each column. The
|
||||
text is split at each <TT>column_char()</TT> and each part is formatted
|
||||
into it's own column. After the last column any remaining text is
|
||||
formatted into the space between the last column and the right edge of
|
||||
the browser, even if the text contains instances of <TT>column_char()</TT>
|
||||
. The default value is a one-element array of just a zero, which makes
|
||||
there are no columns.
|
||||
<P>The second form sets the current array to <TT>w</TT>. Make sure the
|
||||
last entry is zero. </P>
|
||||
<H4><A name=Fl_Browser.data>void *Fl_Browser::data(int n) const
|
||||
<BR> void Fl_Browser::data(int n, void *)</A></H4>
|
||||
The first form returns the data for line <TT>n</TT>. If <TT>n</TT> is
|
||||
out of range this returns <TT>NULL</TT>.
|
||||
<P>The second form sets the data for line <TT>n</TT>. </P>
|
||||
<H4><A name=Fl_Browser.format_char>uchar Fl_Browser::format_char() const
|
||||
<BR> void Fl_Browser::format_char(char c)</A></H4>
|
||||
The first form gets the current format code prefix character, which by
|
||||
default is <TT>@</TT>. A string of formatting codes at the start of
|
||||
each column are stripped off and used to modify how the rest of the
|
||||
line is printed:
|
||||
<UL>
|
||||
<LI><CODE>@.</CODE> Print rest of line, don't look for more '@' signs </LI>
|
||||
<LI><CODE>@@</CODE> Print rest of line starting with '@' </LI>
|
||||
<LI><CODE>@l</CODE> Use a <BIG>large</BIG> (24 point) font </LI>
|
||||
<LI><CODE>@m</CODE> Use a <BIG>medium large</BIG> (18 point) font </LI>
|
||||
<LI><CODE>@s</CODE> Use a <SMALL>small</SMALL> (11 point) font </LI>
|
||||
<LI><CODE>@b</CODE> Use a <B>bold</B> font (adds FL_BOLD to font) </LI>
|
||||
<LI><CODE>@i</CODE> Use an <I>italic</I> font (adds FL_ITALIC to font) </LI>
|
||||
<LI><CODE>@f</CODE> or <CODE>@t</CODE> Use a <CODE>fixed-pitch</CODE>
|
||||
font (sets font to FL_COURIER) </LI>
|
||||
<LI><CODE>@c</CODE> Center the line horizontally </LI>
|
||||
<LI><CODE>@r</CODE> Right-justify the text </LI>
|
||||
<LI><CODE>@B0, @B1, ... @B255</CODE> Fill the backgound with
|
||||
fl_color(n) </LI>
|
||||
<LI><CODE>@C0, @C1, ... @C255</CODE> Use fl_color(n) to draw the text </LI>
|
||||
<LI><CODE>@F0, @F1, ... </CODE> Use fl_font(n) to draw the text </LI>
|
||||
<LI><CODE>@S1, @S2, ... </CODE> Use point size n to draw the text </LI>
|
||||
<LI><CODE>@u</CODE> or <CODE>@_</CODE> Underline the text. </LI>
|
||||
<LI><CODE>@-</CODE> draw an engraved line through the middle. </LI>
|
||||
</UL>
|
||||
Notice that the <CODE>@.</CODE> command can be used to reliably
|
||||
terminate the parsing. To print a random string in a random color, use <TT>
|
||||
sprintf("@C%d@.%s", color, string)</TT> and it will work even if the
|
||||
string starts with a digit or has the format character in it.
|
||||
<P>The second form sets the current prefix to <TT>c</TT>. Set the
|
||||
prefix to 0 to disable formatting. </P>
|
||||
<H4><A name=Fl_Browser.hide>void Fl_Browser::hide(int n)</A></H4>
|
||||
Makes line <TT>n</TT> invisible, preventing selection by the user.
|
||||
The line can still be selected under program control.
|
||||
<H4><A name=Fl_Browser.insert>void Fl_Browser::insert(int n, const char
|
||||
*, void * = 0)</A></H4>
|
||||
Insert a new line <I>before</I> line <TT>n</TT>. If <TT>n</TT> > <TT>
|
||||
size()</TT> then the line is added to the end.
|
||||
<H4><A name=Fl_Browser.load>int Fl_Browser::load(const char *filename)</A>
|
||||
</H4>
|
||||
Clears the browser and reads the file, adding each line from the file
|
||||
to the browser. If the filename is <TT>NULL</TT> or a zero-length
|
||||
string then this just clears the browser. This returns zero if there
|
||||
was any error in opening or reading the file, in which case <TT>errno</TT>
|
||||
is set to the system error. The <TT>data()</TT> of each line is set
|
||||
to <TT>NULL</TT>.
|
||||
<H4><A name=Fl_Browser.move>void Fl_Browser::move(int to, int from)</A></H4>
|
||||
Line <TT>from</TT> is removed and reinserted at <TT>to</TT>; <TT>to</TT>
|
||||
is calculated after the line is removed.
|
||||
<H4><A name=Fl_Browser.position>int Fl_Browser::position() const
|
||||
<BR> void Fl_Browser::position(int p)</A></H4>
|
||||
The first form returns the current vertical scrollbar position, where
|
||||
0 corresponds to the top. If there is not vertical scrollbar then this
|
||||
will always return 0.
|
||||
<H4><A name=Fl_Browser.remove>void Fl_Browser::remove(int n)</A></H4>
|
||||
Remove line <TT>n</TT> and make the browser one line shorter.
|
||||
<H4><A name=Fl_Browser.show>void Fl_Browser::show(int n)</A></H4>
|
||||
Makes line <TT>n</TT> visible for selection.
|
||||
<H4><A name=Fl_Browser.size>int Fl_Browser::size() const</A></H4>
|
||||
Returns how many lines are in the browser. The last line number is
|
||||
equal to this.
|
||||
<H4><A name=Fl_Browser.text>const char *Fl_Browser::text(int n) const
|
||||
<BR> void Fl_Browser::text(int n, const char *)</A></H4>
|
||||
The first form returns the text for line <TT>n</TT>. If <TT>n</TT> is
|
||||
out of range it returns <TT>NULL</TT>.
|
||||
<P>The second form sets the text for line <TT>n</TT>. </P>
|
||||
<H4><A name=Fl_Browser.topline>int Fl_Browser::topline() const
|
||||
<BR> void Fl_Browser::topline(int n)</A></H4>
|
||||
The first form returns the current top line in the browser. If there
|
||||
is no vertical scrollbar then this will always return 1.
|
||||
<P>The second form sets the top line in the browser to <TT>n</TT>. </P>
|
||||
<P>The second form sets the vertical scrollbar position to <TT>p</TT>. </P>
|
||||
<H4><A name=Fl_Browser.visible>int Fl_Browser::visible(int n) const</A></H4>
|
||||
Returns a non-zero value if line <TT>n</TT> is visible. </BODY></HTML>
|
||||
+132
-169
@@ -1,171 +1,134 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Browser_">class Fl_Browser_</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Widget">Fl_Widget</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Browser_>class Fl_Browser_</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Widget.html#Fl_Widget>Fl_Widget</A>
|
||||
|
|
||||
+----<b>Fl_Browser_</b>
|
||||
+----<B>Fl_Browser_</B>
|
||||
|
|
||||
+----<a href="#Fl_Browser">Fl_Browser</a>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Browser_.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
This is the base class for browsers. To be useful it must be
|
||||
subclassed and several virtual functions defined. The Forms-compatable
|
||||
browser and the file chooser's browser are subclassed off of this.
|
||||
|
||||
<p>This has been designed so that the subclass has complete control
|
||||
over the storage of the data, although because <tt>next()</tt> and
|
||||
<tt>prev()</tt> functions are used to index, it works best as a linked
|
||||
list or as a large block of characters in which the line breaks must be
|
||||
searched for.
|
||||
|
||||
<p>A great deal of work has been done so that the "height" of a data
|
||||
object does not need to be determined until it is drawn. This is
|
||||
useful if actually figuring out the size of an object requires
|
||||
accessing image data or doing <tt>stat()</tt> on a file or doing some
|
||||
other slow operation.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<center>
|
||||
<table width=90%>
|
||||
<tr>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Browser_.Fl_Browser_">Fl_Browser_</a>
|
||||
<li><a href="#Fl_Browser_.~Fl_Browser_">~Fl_Browser_</a>
|
||||
<li><a href="#Fl_Browser_.bbox">bbox</a>
|
||||
<li><a href="#Fl_Browser_.deleting">deleting</a>
|
||||
<li><a href="#Fl_Browser_.deselect">deselect</a>
|
||||
<li><a href="#Fl_Browser_.display">display</a>
|
||||
<li><a href="#Fl_Browser_.displayed">displayed</a>
|
||||
<li><a href="#Fl_Browser_.draw">draw</a>
|
||||
<li><a href="#Fl_Browser_.find_item">find_item</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Browser_.full_height">full_height</a>
|
||||
<li><a href="#Fl_Browser_.full_width">full_width</a>
|
||||
<li><a href="#Fl_Browser_.handle">handle</a>
|
||||
<li><a href="#Fl_Browser_.has_scrollbar">has_scrollbar</a>
|
||||
<li><a href="#Fl_Browser_.hposition">hposition</a>
|
||||
<li><a href="#Fl_Browser_.incr_height">incr_height</a>
|
||||
<li><a href="#Fl_Browser_.inserting">inserting</a>
|
||||
<li><a href="#Fl_Browser_.item_draw">item_draw</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Browser_.item_first">item_first</a>
|
||||
<li><a href="#Fl_Browser_.item_height">item_height</a>
|
||||
<li><a href="#Fl_Browser_.item_next">item_next</a>
|
||||
<li><a href="#Fl_Browser_.item_prev">item_prev</a>
|
||||
<li><a href="#Fl_Browser_.item_quick_height">item_quick_height</a>
|
||||
<li><a href="#Fl_Browser_.item_select">item_select</a>
|
||||
<li><a href="#Fl_Browser_.item_selected">item_selected</a>
|
||||
<li><a href="#Fl_Browser_.item_width">item_width</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Browser_.leftedge">leftedge</a>
|
||||
<li><a href="#Fl_Browser_.new_list">new_list</a>
|
||||
<li><a href="#Fl_Browser_.position">position</a>
|
||||
<li><a href="#Fl_Browser_.redraw_line">redraw_line</a>
|
||||
<li><a href="#Fl_Browser_.redraw_lines">redraw_lines</a>
|
||||
<li><a href="#Fl_Browser_.replacing">replacing</a>
|
||||
<li><a href="#Fl_Browser_.resize">resize</a>
|
||||
<li><a href="#Fl_Browser_.scrollbar_left">scrollbar_left</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Browser_.scrollbar_right">scrollbar_right</a>
|
||||
<li><a href="#Fl_Browser_.select">select</a>
|
||||
<li><a href="#Fl_Browser_.select_only">select_only</a>
|
||||
<li><a href="#Fl_Browser_.selection">selection</a>
|
||||
<li><a href="#Fl_Browser_.textcolor">textcolor</a>
|
||||
<li><a href="#Fl_Browser_.textfont">textfont</a>
|
||||
<li><a href="#Fl_Browser_.textsize">textsize</a>
|
||||
<li><a href="#Fl_Browser_.top">top</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<h4><a name="Fl_Browser_.Fl_Browser_">Fl_Browser::Fl_Browser(int, int, int, int, const char * = 0)</a></h4>
|
||||
|
||||
The constructor makes an empty browser.
|
||||
|
||||
<h4><a name="Fl_Browser_.~Fl_Browser_">Fl_Browser::~Fl_Browser(void)</a></h4>
|
||||
|
||||
The destructor deletes all list items and destroys the browser.
|
||||
|
||||
<h4><a name="Fl_Browser_.has_scrollbar">void Fl_Browser_::has_scrollbar(int h)</a></h4>
|
||||
|
||||
By default you can scroll in both directions, and the scrollbars
|
||||
disappear if the data will fit in the widget. has_scrollbar()
|
||||
changes this based on the value of <tt>h</tt>:
|
||||
|
||||
<ul>
|
||||
<li><code>0</code> - No scrollbars
|
||||
|
||||
<li><code>Fl_Browser_::HORIZONTAL</code> - Only a horizontal scrollbar.
|
||||
|
||||
<li><code>Fl_Browser_::VERTICAL</code> - Only a vertical scrollbar.
|
||||
|
||||
<li><code>Fl_Browser_::BOTH</code> - The default is both scrollbars.
|
||||
|
||||
<li><code>Fl_Browser_::HORIZONTAL_ALWAYS</code> - Horizontal
|
||||
scrollbar always on, vertical always off.
|
||||
|
||||
<li><code>Fl_Browser_::VERTICAL_ALWAYS</code> - Vertical
|
||||
scrollbar always on, horizontal always off.
|
||||
|
||||
<li><code>Fl_Browser_::BOTH_ALWAYS</code> - Both always on.
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Browser_.textcolor">Fl_Color Fl_Browser_::textcolor() const<br>
|
||||
void Fl_Browser_::textcolor(Fl_Color color)</a></h4>
|
||||
|
||||
The first form gets the default text color for the lines in the
|
||||
browser.
|
||||
|
||||
<p>The second form sets the default text color to <tt>color</tt>
|
||||
|
||||
<h4><a name="Fl_Browser_.textfont">Fl_Font Fl_Browser_::textfont() const<br>
|
||||
void Fl_Browser_::textfont(Fl_Font font)</a></h4>
|
||||
|
||||
The first form gets the default text font for the lines in the
|
||||
browser.
|
||||
|
||||
<p>The second form sets the default text font to <tt>font</tt>
|
||||
|
||||
<h4><a name="Fl_Browser_.textsize">uchar Fl_Browser_::textsize() const<br>
|
||||
void Fl_Browser_::textsize(uchar size)</a></h4>
|
||||
|
||||
The first form gets the default text size for the lines in the
|
||||
browser.
|
||||
|
||||
<p>The second form sets the default text size to <tt>size</tt>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<A href=Fl_Browser.html#Fl_Browser>Fl_Browser</A>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Browser_.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
This is the base class for browsers. To be useful it must be
|
||||
subclassed and several virtual functions defined. The Forms-compatable
|
||||
browser and the file chooser's browser are subclassed off of this.
|
||||
<P>This has been designed so that the subclass has complete control
|
||||
over the storage of the data, although because <TT>next()</TT> and <TT>
|
||||
prev()</TT> functions are used to index, it works best as a linked list
|
||||
or as a large block of characters in which the line breaks must be
|
||||
searched for. </P>
|
||||
<P>A great deal of work has been done so that the "height" of a data
|
||||
object does not need to be determined until it is drawn. This is
|
||||
useful if actually figuring out the size of an object requires
|
||||
accessing image data or doing <TT>stat()</TT> on a file or doing some
|
||||
other slow operation. </P>
|
||||
<H3>Methods</H3>
|
||||
<CENTER>
|
||||
<TABLE width=90%>
|
||||
<TR><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Browser_.Fl_Browser_>Fl_Browser_</A></LI>
|
||||
<LI><A href=#Fl_Browser_.~Fl_Browser_>~Fl_Browser_</A></LI>
|
||||
<LI><A href=#Fl_Browser_.bbox>bbox</A></LI>
|
||||
<LI><A href=#Fl_Browser_.deleting>deleting</A></LI>
|
||||
<LI><A href=#Fl_Browser_.deselect>deselect</A></LI>
|
||||
<LI><A href=#Fl_Browser_.display>display</A></LI>
|
||||
<LI><A href=#Fl_Browser_.displayed>displayed</A></LI>
|
||||
<LI><A href=#Fl_Browser_.draw>draw</A></LI>
|
||||
<LI><A href=#Fl_Browser_.find_item>find_item</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Browser_.full_height>full_height</A></LI>
|
||||
<LI><A href=#Fl_Browser_.full_width>full_width</A></LI>
|
||||
<LI><A href=#Fl_Browser_.handle>handle</A></LI>
|
||||
<LI><A href=#Fl_Browser_.has_scrollbar>has_scrollbar</A></LI>
|
||||
<LI><A href=#Fl_Browser_.hposition>hposition</A></LI>
|
||||
<LI><A href=#Fl_Browser_.incr_height>incr_height</A></LI>
|
||||
<LI><A href=#Fl_Browser_.inserting>inserting</A></LI>
|
||||
<LI><A href=#Fl_Browser_.item_draw>item_draw</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Browser_.item_first>item_first</A></LI>
|
||||
<LI><A href=#Fl_Browser_.item_height>item_height</A></LI>
|
||||
<LI><A href=#Fl_Browser_.item_next>item_next</A></LI>
|
||||
<LI><A href=#Fl_Browser_.item_prev>item_prev</A></LI>
|
||||
<LI><A href=#Fl_Browser_.item_quick_height>item_quick_height</A></LI>
|
||||
<LI><A href=#Fl_Browser_.item_select>item_select</A></LI>
|
||||
<LI><A href=#Fl_Browser_.item_selected>item_selected</A></LI>
|
||||
<LI><A href=#Fl_Browser_.item_width>item_width</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Browser_.leftedge>leftedge</A></LI>
|
||||
<LI><A href=#Fl_Browser_.new_list>new_list</A></LI>
|
||||
<LI><A href=#Fl_Browser_.position>position</A></LI>
|
||||
<LI><A href=#Fl_Browser_.redraw_line>redraw_line</A></LI>
|
||||
<LI><A href=#Fl_Browser_.redraw_lines>redraw_lines</A></LI>
|
||||
<LI><A href=#Fl_Browser_.replacing>replacing</A></LI>
|
||||
<LI><A href=#Fl_Browser_.resize>resize</A></LI>
|
||||
<LI><A href=#Fl_Browser_.scrollbar_left>scrollbar_left</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Browser_.scrollbar_right>scrollbar_right</A></LI>
|
||||
<LI><A href=#Fl_Browser_.select>select</A></LI>
|
||||
<LI><A href=#Fl_Browser_.select_only>select_only</A></LI>
|
||||
<LI><A href=#Fl_Browser_.selection>selection</A></LI>
|
||||
<LI><A href=#Fl_Browser_.textcolor>textcolor</A></LI>
|
||||
<LI><A href=#Fl_Browser_.textfont>textfont</A></LI>
|
||||
<LI><A href=#Fl_Browser_.textsize>textsize</A></LI>
|
||||
<LI><A href=#Fl_Browser_.top>top</A></LI>
|
||||
</UL>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
<H4><A name=Fl_Browser_.Fl_Browser_>Fl_Browser::Fl_Browser(int, int,
|
||||
int, int, const char * = 0)</A></H4>
|
||||
The constructor makes an empty browser.
|
||||
<H4><A name=Fl_Browser_.~Fl_Browser_>Fl_Browser::~Fl_Browser(void)</A></H4>
|
||||
The destructor deletes all list items and destroys the browser.
|
||||
<H4><A name=Fl_Browser_.has_scrollbar>void
|
||||
Fl_Browser_::has_scrollbar(int h)</A></H4>
|
||||
By default you can scroll in both directions, and the scrollbars
|
||||
disappear if the data will fit in the widget. has_scrollbar() changes
|
||||
this based on the value of <TT>h</TT>:
|
||||
<UL>
|
||||
<LI><CODE>0</CODE> - No scrollbars </LI>
|
||||
<LI><CODE>Fl_Browser_::HORIZONTAL</CODE> - Only a horizontal scrollbar. </LI>
|
||||
<LI><CODE>Fl_Browser_::VERTICAL</CODE> - Only a vertical scrollbar. </LI>
|
||||
<LI><CODE>Fl_Browser_::BOTH</CODE> - The default is both scrollbars. </LI>
|
||||
<LI><CODE>Fl_Browser_::HORIZONTAL_ALWAYS</CODE> - Horizontal scrollbar
|
||||
always on, vertical always off. </LI>
|
||||
<LI><CODE>Fl_Browser_::VERTICAL_ALWAYS</CODE> - Vertical scrollbar
|
||||
always on, horizontal always off. </LI>
|
||||
<LI><CODE>Fl_Browser_::BOTH_ALWAYS</CODE> - Both always on. </LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Browser_.textcolor>Fl_Color Fl_Browser_::textcolor()
|
||||
const
|
||||
<BR> void Fl_Browser_::textcolor(Fl_Color color)</A></H4>
|
||||
The first form gets the default text color for the lines in the
|
||||
browser.
|
||||
<P>The second form sets the default text color to <TT>color</TT></P>
|
||||
<H4><A name=Fl_Browser_.textfont>Fl_Font Fl_Browser_::textfont() const
|
||||
<BR> void Fl_Browser_::textfont(Fl_Font font)</A></H4>
|
||||
The first form gets the default text font for the lines in the
|
||||
browser.
|
||||
<P>The second form sets the default text font to <TT>font</TT></P>
|
||||
<H4><A name=Fl_Browser_.textsize>uchar Fl_Browser_::textsize() const
|
||||
<BR> void Fl_Browser_::textsize(uchar size)</A></H4>
|
||||
The first form gets the default text size for the lines in the
|
||||
browser.
|
||||
<P>The second form sets the default text size to <TT>size</TT></P>
|
||||
</BODY></HTML>
|
||||
+128
-174
@@ -1,176 +1,130 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Button">class Fl_Button</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Widget">Fl_Widget</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Button>class Fl_Button</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Widget.html#Fl_Widget>Fl_Widget</A>
|
||||
|
|
||||
+----<b>Fl_Button</b>
|
||||
+----<B>Fl_Button</B>
|
||||
|
|
||||
+----<a href="#Fl_Check_Button">Fl_Check_Button</a>, <a href="#Fl_Light_Button">Fl_Light_Button</a>, <a href="#Fl_Repeat_Button">Fl_Repeat_Button</a>,
|
||||
<a href="#Fl_Return_Button">Fl_Return_Button</a>, <a href="#Fl_Round_Button">Fl_Round_Button</a>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Button.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
<p>Buttons generate callbacks when they are clicked by the user. You
|
||||
control exactly when and how by changing the values for <tt>type()</tt> and
|
||||
<tt>when()</tt>.
|
||||
|
||||
<p>Buttons can also generate callbacks in response to
|
||||
<tt>FL_SHORTCUT</tt> events. The button can either have an explicit
|
||||
<a href="#Fl_Button.shortcut"><tt>shortcut()</tt></a> value or a letter
|
||||
shortcut can be indicated in the <tt>label()</tt> with an '&' character
|
||||
before it. For the label shortcut it does not matter if <i>Alt</i> is
|
||||
held down, but if you have an input field in the same window, the user
|
||||
will have to hold down the <i>Alt</i> key so that the input field does
|
||||
not eat the event first as an <tt>FL_KEYBOARD</tt> event.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<center>
|
||||
<table width=90%>
|
||||
<tr>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Button.Fl_Button">Fl_Button</a>
|
||||
<li><a href="#Fl_Button.~Fl_Button">~Fl_Button</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Button.clear">clear</a>
|
||||
<li><a href="#Fl_Button.down_box">down_box</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Button.set">set</a>
|
||||
<li><a href="#Fl_Button.setonly">setonly</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Button.shortcut">shortcut</a>
|
||||
<li><a href="#Fl_Button.type">type</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Button.value">value</a>
|
||||
<li><a href="#Fl_Button.when">when</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<h4><a name="Fl_Button.Fl_Button">Fl_Button::Fl_Button(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
The constructor creates the button using the position, size, and label.
|
||||
|
||||
<h4><a name="Fl_Button.~Fl_Button">Fl_Button::~Fl_Button(void)</a></h4>
|
||||
|
||||
The destructor removed the button.
|
||||
|
||||
<h4><a name="Fl_Button.clear">int Fl_Button::clear()</a></h4>
|
||||
|
||||
Same as <tt>value(0)</tt>.
|
||||
|
||||
<h4><a name="Fl_Button.down_box">Fl_Boxtype Fl_Button::down_box() const<br>
|
||||
void Fl_Button::down_box(Fl_Boxtype bt)</a></h4>
|
||||
|
||||
The first form returns the current down box type, which is drawn when
|
||||
<tt>value()</tt> is non-zero.
|
||||
|
||||
<p>The second form sets the down box type. The default value of 0
|
||||
causes FLTK to figure out the correct matching down version of
|
||||
<tt>box()</tt>.
|
||||
|
||||
<h4><a name="Fl_Button.set">int Fl_Button::set()</a></h4>
|
||||
|
||||
Same as <tt>value(1)</tt>.
|
||||
|
||||
<h4><a name="Fl_Button.setonly">void Fl_Button::setonly()</a></h4>
|
||||
|
||||
Turns on this button and turns off all other radio buttons in the
|
||||
group (calling <tt>value(1)</tt> or <tt>set()</tt> does not do this).
|
||||
|
||||
<h4><a name="Fl_Button.shortcut">ulong Fl_Button::shortcut() const<br>
|
||||
void Fl_Button::shortcut(ulong key)</a></h4>
|
||||
|
||||
The first form returns the current shortcut key for the button.
|
||||
|
||||
<P>The second form sets the shortcut key to <tt>key</tt>. Setting this
|
||||
overrides the use of '&' in the <tt>label()</tt>. The value is a
|
||||
bitwise OR of a key and a set of shift flags, for example <code>FL_ALT
|
||||
| 'a'</code>, <code>FL_ALT | (FL_F + 10)</code>, or just
|
||||
<code>'a'</code>. A value of 0 disables the shortcut.
|
||||
|
||||
<p>The key can be any value returned by <a href=#event_key><tt>
|
||||
Fl::event_key()</tt></a>, but will usually be an ASCII letter. Use a
|
||||
lower-case letter unless you require the shift key to be held down.
|
||||
|
||||
<p>The shift flags can be any set of values accepted by
|
||||
<a href=#event_state><tt>Fl::event_state()</tt></a>. If the bit is on
|
||||
that shift key must be pushed. Meta, Alt, Ctrl, and Shift must be off
|
||||
if they are not in the shift flags (zero for the other bits indicates
|
||||
a "don't care" setting).
|
||||
|
||||
<h4><a name="Fl_Button.type">uchar Fl_Button::type() const<br>
|
||||
void Fl_Button::type(uchar t)</a></h4>
|
||||
|
||||
The first form of <tt>type()</tt> returns the current button type,
|
||||
which can be one of:
|
||||
|
||||
<ul>
|
||||
<li><code>0</code>: The value is unchanged.
|
||||
|
||||
<li><code>FL_TOGGLE_BUTTON</code>: The value is inverted.
|
||||
|
||||
<li><code>FL_RADIO_BUTTON</code>: The value is set to 1, and all
|
||||
other buttons in the current group with
|
||||
<code>type() == FL_RADIO_BUTTON</code> are set to zero.
|
||||
</ul>
|
||||
|
||||
The second form sets the button type to <tt>t</tt>.
|
||||
|
||||
<h4><a name="Fl_Button.value">char Fl_Button::value() const<br>
|
||||
int Fl_Button::value(int)</a></h4>
|
||||
|
||||
The first form returns the current value (0 or 1). The second form sets
|
||||
the current value.
|
||||
|
||||
<h4><a name="Fl_Button.when">Fl_When Fl_Widget::when() const<br>
|
||||
void Fl_Widget::when(Fl_When w)</a></h4>
|
||||
|
||||
Controls when callbacks are done. The following values are useful,
|
||||
the default value is <code>FL_WHEN_RELEASE</code>:
|
||||
|
||||
<ul>
|
||||
<li><code>0</code>: The callback is not done, instead changed() is
|
||||
turned on.
|
||||
|
||||
<li><code>FL_WHEN_RELEASE</code>: The callback is done after the user
|
||||
successfully clicks the button, or when a shortcut is typed.
|
||||
|
||||
<li><code>FL_WHEN_CHANGED </code>: The callback is done each time the
|
||||
value() changes (when the user pushes and releases the button, and as
|
||||
the mouse is dragged around in and out of the button).
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<A href=Fl_Check_Button.html#Fl_Check_Button>Fl_Check_Button</A>, <A href=Fl_Light_Button.html#Fl_Light_Button>Fl_Light_Button</A>, <A href=Fl_Repeat_Button.html#Fl_Repeat_Button>Fl_Repeat_Button</A>,
|
||||
<A href=Fl_Return_Button.html#Fl_Return_Button>Fl_Return_Button</A>, <A href=Fl_Round_Button.html#Fl_Round_Button>Fl_Round_Button</A>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Button.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
<P>Buttons generate callbacks when they are clicked by the user. You
|
||||
control exactly when and how by changing the values for <TT>type()</TT>
|
||||
and <TT>when()</TT>. </P>
|
||||
<P>Buttons can also generate callbacks in response to <TT>FL_SHORTCUT</TT>
|
||||
events. The button can either have an explicit <A href=#Fl_Button.shortcut>
|
||||
<TT>shortcut()</TT></A> value or a letter shortcut can be indicated in
|
||||
the <TT>label()</TT> with an ''character before it. For the label
|
||||
shortcut it does not matter if <I>Alt</I> is held down, but if you have
|
||||
an input field in the same window, the user will have to hold down the <I>
|
||||
Alt</I> key so that the input field does not eat the event first as an <TT>
|
||||
FL_KEYBOARD</TT> event. </P>
|
||||
<H3>Methods</H3>
|
||||
<CENTER>
|
||||
<TABLE width=90%>
|
||||
<TR><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Button.Fl_Button>Fl_Button</A></LI>
|
||||
<LI><A href=#Fl_Button.~Fl_Button>~Fl_Button</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Button.clear>clear</A></LI>
|
||||
<LI><A href=#Fl_Button.down_box>down_box</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Button.set>set</A></LI>
|
||||
<LI><A href=#Fl_Button.setonly>setonly</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Button.shortcut>shortcut</A></LI>
|
||||
<LI><A href=#Fl_Button.type>type</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Button.value>value</A></LI>
|
||||
<LI><A href=#Fl_Button.when>when</A></LI>
|
||||
</UL>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
<H4><A name=Fl_Button.Fl_Button>Fl_Button::Fl_Button(int x, int y, int
|
||||
w, int h, const char *label = 0)</A></H4>
|
||||
The constructor creates the button using the position, size, and
|
||||
label.
|
||||
<H4><A name=Fl_Button.~Fl_Button>Fl_Button::~Fl_Button(void)</A></H4>
|
||||
The destructor removed the button.
|
||||
<H4><A name=Fl_Button.clear>int Fl_Button::clear()</A></H4>
|
||||
Same as <TT>value(0)</TT>.
|
||||
<H4><A name=Fl_Button.down_box>Fl_Boxtype Fl_Button::down_box() const
|
||||
<BR> void Fl_Button::down_box(Fl_Boxtype bt)</A></H4>
|
||||
The first form returns the current down box type, which is drawn when <TT>
|
||||
value()</TT> is non-zero.
|
||||
<P>The second form sets the down box type. The default value of 0
|
||||
causes FLTK to figure out the correct matching down version of <TT>box()</TT>
|
||||
. </P>
|
||||
<H4><A name=Fl_Button.set>int Fl_Button::set()</A></H4>
|
||||
Same as <TT>value(1)</TT>.
|
||||
<H4><A name=Fl_Button.setonly>void Fl_Button::setonly()</A></H4>
|
||||
Turns on this button and turns off all other radio buttons in the
|
||||
group (calling <TT>value(1)</TT> or <TT>set()</TT> does not do this).
|
||||
<H4><A name=Fl_Button.shortcut>ulong Fl_Button::shortcut() const
|
||||
<BR> void Fl_Button::shortcut(ulong key)</A></H4>
|
||||
The first form returns the current shortcut key for the button.
|
||||
<P>The second form sets the shortcut key to <TT>key</TT>. Setting this
|
||||
overrides the use of ''in the <TT>label()</TT>. The value is a bitwise
|
||||
OR of a key and a set of shift flags, for example <CODE>FL_ALT | 'a'</CODE>
|
||||
, <CODE>FL_ALT | (FL_F + 10)</CODE>, or just <CODE>'a'</CODE>. A value
|
||||
of 0 disables the shortcut. </P>
|
||||
<P>The key can be any value returned by <A href=functions.html#event_key>
|
||||
<TT>Fl::event_key()</TT></A>, but will usually be an ASCII letter. Use
|
||||
a lower-case letter unless you require the shift key to be held down. </P>
|
||||
<P>The shift flags can be any set of values accepted by <A href=events.html#event_state>
|
||||
<TT>Fl::event_state()</TT></A>. If the bit is on that shift key must
|
||||
be pushed. Meta, Alt, Ctrl, and Shift must be off if they are not in
|
||||
the shift flags (zero for the other bits indicates a "don't care"
|
||||
setting). </P>
|
||||
<H4><A name=Fl_Button.type>uchar Fl_Button::type() const
|
||||
<BR> void Fl_Button::type(uchar t)</A></H4>
|
||||
The first form of <TT>type()</TT> returns the current button type,
|
||||
which can be one of:
|
||||
<UL>
|
||||
<LI><CODE>0</CODE>: The value is unchanged. </LI>
|
||||
<LI><CODE>FL_TOGGLE_BUTTON</CODE>: The value is inverted. </LI>
|
||||
<LI><CODE>FL_RADIO_BUTTON</CODE>: The value is set to 1, and all other
|
||||
buttons in the current group with <CODE>type() == FL_RADIO_BUTTON</CODE>
|
||||
are set to zero. </LI>
|
||||
</UL>
|
||||
The second form sets the button type to <TT>t</TT>.
|
||||
<H4><A name=Fl_Button.value>char Fl_Button::value() const
|
||||
<BR> int Fl_Button::value(int)</A></H4>
|
||||
The first form returns the current value (0 or 1). The second form
|
||||
sets the current value.
|
||||
<H4><A name=Fl_Button.when>Fl_When Fl_Widget::when() const
|
||||
<BR> void Fl_Widget::when(Fl_When w)</A></H4>
|
||||
Controls when callbacks are done. The following values are useful,
|
||||
the default value is <CODE>FL_WHEN_RELEASE</CODE>:
|
||||
<UL>
|
||||
<LI><CODE>0</CODE>: The callback is not done, instead changed() is
|
||||
turned on. </LI>
|
||||
<LI><CODE>FL_WHEN_RELEASE</CODE>: The callback is done after the user
|
||||
successfully clicks the button, or when a shortcut is typed. </LI>
|
||||
<LI><CODE>FL_WHEN_CHANGED </CODE>: The callback is done each time the
|
||||
value() changes (when the user pushes and releases the button, and as
|
||||
the mouse is dragged around in and out of the button). </LI>
|
||||
</UL>
|
||||
</BODY></HTML>
|
||||
+116
-159
@@ -1,162 +1,119 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Chart">class Fl_Chart</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Widget">Fl_Widget</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Chart>class Fl_Chart</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Widget.html#Fl_Widget>Fl_Widget</A>
|
||||
|
|
||||
+----<b>Fl_Chart</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Chart.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
This widget displays simple charts and is provided for forms compatibility.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<center>
|
||||
<table width=90%>
|
||||
<tr>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Chart.Fl_Chart">Fl_Chart</a>
|
||||
<li><a href="#Fl_Chart.~Fl_Chart">~Fl_Chart</a>
|
||||
<li><a href="#Fl_Chart.add">add</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Chart.autosize">autosize</a>
|
||||
<li><a href="#Fl_Chart.bounds">bounds</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Chart.clear">clear</a>
|
||||
<li><a href="#Fl_Chart.insert">insert</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Chart.maxsize">maxsize</a>
|
||||
<li><a href="#Fl_Chart.replace">replace</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Chart.size">size</a>
|
||||
<li><a href="#Fl_Chart.type">type</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<h4><a name="Fl_Chart.Fl_Chart">Fl_Chart::Fl_Chart(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Chart</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_NO_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Chart.~Fl_Chart">virtual Fl_Chart::~Fl_Chart()</a></h4>
|
||||
|
||||
Destroys the <tt>Fl_Chart</tt> widget and all of its data.
|
||||
|
||||
<h4><a name="Fl_Chart.add">void add(double value, const char *label = NULL, uchar color = 0)</a></h4>
|
||||
|
||||
The <tt>add</tt> method adds the <tt>value</tt> and optionally <tt>label</tt>
|
||||
and <tt>color</tt> to the chart.
|
||||
|
||||
<h4><a name="Fl_Chart.autosize">uchar autosize(void) const<br>
|
||||
void autosize(uchar onoff)</a></h4>
|
||||
|
||||
The <tt>autosize</tt> method controls whether or not the chart will
|
||||
automatically adjust the bounds of the chart. The first form returns a
|
||||
boolean value that is non-zero if auto-sizing is enabled and zero is auto-sizing
|
||||
is disabled.
|
||||
|
||||
<p>The second form of <tt>autosize</tt> sets the auto-sizing property to
|
||||
<tt>onoff</tt>.
|
||||
|
||||
<h4><a name="Fl_Chart.bounds">void bounds(double *a, double *b)<br>
|
||||
void bounds(double a, double b)</a></h4>
|
||||
|
||||
The <tt>bounds</tt> method gets or sets the lower and upper bounds of the chart
|
||||
values to <tt>a</tt> and <tt>b</tt> respectively.
|
||||
|
||||
<h4><a name="Fl_Chart.clear">void clear(void)</a></h4>
|
||||
|
||||
The <tt>clear</tt> method removes all values from the chart.
|
||||
|
||||
<h4><a name="Fl_Chart.insert">void insert(int pos, double value, const char *label = NULL, uchar color = 0)</a></h4>
|
||||
|
||||
The <tt>insert</tt> method inserts a data value at the given position
|
||||
<tt>pos</tt>. Position 0 is the first data value.
|
||||
|
||||
<h4><a name="Fl_Chart.maxsize">int maxsize(void) const<br>
|
||||
void maxsize(int n)</a></h4>
|
||||
|
||||
The <tt>maxsize</tt> method gets or sets the maximum number of data values for
|
||||
a chart.
|
||||
|
||||
<h4><a name="Fl_Chart.replace">void replace(int pos, double value, const char *label = NULL, uchar color = 0)</a></h4>
|
||||
|
||||
The <tt>replace</tt> method replaces data value <tt>pos</tt> with
|
||||
<tt>value</tt>, <tt>label</tt>, and <tt>color</tt>. Position 0 is
|
||||
the first data value.
|
||||
|
||||
<h4><a name="Fl_Chart.size">int size(void) const</a></h4>
|
||||
|
||||
The <tt>size</tt> method returns the number of data values in the chart.
|
||||
|
||||
<h4><a name="Fl_Chart.type">uchar type() const<br>
|
||||
void type(uchar t)</a></h4>
|
||||
|
||||
The first form of <tt>type()</tt> returns the current chart type.
|
||||
The chart type can be one of the following:
|
||||
|
||||
+----<B>Fl_Chart</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Chart.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
This widget displays simple charts and is provided for forms
|
||||
compatibility.
|
||||
<H3>Methods</H3>
|
||||
<CENTER>
|
||||
<TABLE width=90%>
|
||||
<TR><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Chart.Fl_Chart>Fl_Chart</A></LI>
|
||||
<LI><A href=#Fl_Chart.~Fl_Chart>~Fl_Chart</A></LI>
|
||||
<LI><A href=#Fl_Chart.add>add</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Chart.autosize>autosize</A></LI>
|
||||
<LI><A href=#Fl_Chart.bounds>bounds</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Chart.clear>clear</A></LI>
|
||||
<LI><A href=#Fl_Chart.insert>insert</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Chart.maxsize>maxsize</A></LI>
|
||||
<LI><A href=#Fl_Chart.replace>replace</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Chart.size>size</A></LI>
|
||||
<LI><A href=#Fl_Chart.type>type</A></LI>
|
||||
</UL>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
<H4><A name=Fl_Chart.Fl_Chart>Fl_Chart::Fl_Chart(int x, int y, int w,
|
||||
int h, const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Chart</TT> widget using the given position, size,
|
||||
and label string. The default boxtype is <TT>FL_NO_BOX</TT>.
|
||||
<H4><A name=Fl_Chart.~Fl_Chart>virtual Fl_Chart::~Fl_Chart()</A></H4>
|
||||
Destroys the <TT>Fl_Chart</TT> widget and all of its data.
|
||||
<H4><A name=Fl_Chart.add>void add(double value, const char *label =
|
||||
NULL, uchar color = 0)</A></H4>
|
||||
The <TT>add</TT> method adds the <TT>value</TT> and optionally <TT>
|
||||
label</TT> and <TT>color</TT> to the chart.
|
||||
<H4><A name=Fl_Chart.autosize>uchar autosize(void) const
|
||||
<BR> void autosize(uchar onoff)</A></H4>
|
||||
The <TT>autosize</TT> method controls whether or not the chart will
|
||||
automatically adjust the bounds of the chart. The first form returns a
|
||||
boolean value that is non-zero if auto-sizing is enabled and zero is
|
||||
auto-sizing is disabled.
|
||||
<P>The second form of <TT>autosize</TT> sets the auto-sizing property
|
||||
to <TT>onoff</TT>. </P>
|
||||
<H4><A name=Fl_Chart.bounds>void bounds(double *a, double *b)
|
||||
<BR> void bounds(double a, double b)</A></H4>
|
||||
The <TT>bounds</TT> method gets or sets the lower and upper bounds of
|
||||
the chart values to <TT>a</TT> and <TT>b</TT> respectively.
|
||||
<H4><A name=Fl_Chart.clear>void clear(void)</A></H4>
|
||||
The <TT>clear</TT> method removes all values from the chart.
|
||||
<H4><A name=Fl_Chart.insert>void insert(int pos, double value, const
|
||||
char *label = NULL, uchar color = 0)</A></H4>
|
||||
The <TT>insert</TT> method inserts a data value at the given position <TT>
|
||||
pos</TT>. Position 0 is the first data value.
|
||||
<H4><A name=Fl_Chart.maxsize>int maxsize(void) const
|
||||
<BR> void maxsize(int n)</A></H4>
|
||||
The <TT>maxsize</TT> method gets or sets the maximum number of data
|
||||
values for a chart.
|
||||
<H4><A name=Fl_Chart.replace>void replace(int pos, double value, const
|
||||
char *label = NULL, uchar color = 0)</A></H4>
|
||||
The <TT>replace</TT> method replaces data value <TT>pos</TT> with <TT>
|
||||
value</TT>, <TT>label</TT>, and <TT>color</TT>. Position 0 is the
|
||||
first data value.
|
||||
<H4><A name=Fl_Chart.size>int size(void) const</A></H4>
|
||||
The <TT>size</TT> method returns the number of data values in the
|
||||
chart.
|
||||
<H4><A name=Fl_Chart.type>uchar type() const
|
||||
<BR> void type(uchar t)</A></H4>
|
||||
The first form of <TT>type()</TT> returns the current chart type. The
|
||||
chart type can be one of the following:
|
||||
<DL>
|
||||
<DT>FL_BAR_CHART</DT>
|
||||
<DD>Each sample value is drawn as a vertical bar.</DD>
|
||||
|
||||
<DT>FL_FILLED_CHART</DT>
|
||||
<DD>The chart is filled from the bottom of the graph to the
|
||||
sample values.</DD>
|
||||
|
||||
<DT>FL_HORBAR_CHART</DT>
|
||||
<DD>Each sample value is drawn as a horizontal bar.</DD>
|
||||
|
||||
<DT>FL_LINE_CHART</DT>
|
||||
<DD>The chart is drawn as a polyline with vertices at each
|
||||
sample value.</DD>
|
||||
|
||||
<DT>FL_PIE_CHART</DT>
|
||||
<DD>A pie chart is drawn with each sample value being drawn
|
||||
as a proportionate slice in the circle.</DD>
|
||||
|
||||
<DT>FL_SPECIALPIE_CHART</DT>
|
||||
<DD>Like FL_PIE_CHART, but the first slice is separated from
|
||||
the pie.</DD>
|
||||
|
||||
<DT>FL_SPIKE_CHART</DT>
|
||||
<DD>Each sample value is drawn as a vertical line.</DD>
|
||||
<DT>FL_BAR_CHART</DT>
|
||||
<DD>Each sample value is drawn as a vertical bar.</DD>
|
||||
<DT>FL_FILLED_CHART</DT>
|
||||
<DD>The chart is filled from the bottom of the graph to the sample
|
||||
values.</DD>
|
||||
<DT>FL_HORBAR_CHART</DT>
|
||||
<DD>Each sample value is drawn as a horizontal bar.</DD>
|
||||
<DT>FL_LINE_CHART</DT>
|
||||
<DD>The chart is drawn as a polyline with vertices at each sample
|
||||
value.</DD>
|
||||
<DT>FL_PIE_CHART</DT>
|
||||
<DD>A pie chart is drawn with each sample value being drawn as a
|
||||
proportionate slice in the circle.</DD>
|
||||
<DT>FL_SPECIALPIE_CHART</DT>
|
||||
<DD>Like FL_PIE_CHART, but the first slice is separated from the pie.</DD>
|
||||
<DT>FL_SPIKE_CHART</DT>
|
||||
<DD>Each sample value is drawn as a vertical line.</DD>
|
||||
</DL>
|
||||
|
||||
The second form of <tt>type()</tt> sets the chart type to <tt>t</tt>.
|
||||
|
||||
<center><img src="charts.gif" width=80%></center>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
The second form of <TT>type()</TT> sets the chart type to <TT>t</TT>.
|
||||
<CENTER><IMG src=./charts.gif width=80%></CENTER>
|
||||
</BODY></HTML>
|
||||
@@ -1,53 +1,40 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Check_Button">class Fl_Check_Button</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Button">Fl_Button</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Check_Button>class Fl_Check_Button</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Button.html#Fl_Button>Fl_Button</A>
|
||||
|
|
||||
+----<b>Fl_Check_Button</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Check_Button.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
Buttons generate callbacks when they are clicked by the user. You
|
||||
control exactly when and how by changing the values for <tt>type()</tt> and
|
||||
<tt>when()</tt>.
|
||||
|
||||
<P>The <tt>Fl_Check_Button</tt> subclass display the "on" state by
|
||||
turning on a light, rather than drawing pushed in. The shape of the
|
||||
"light" is initially set to FL_DIAMOND_DOWN_BOX. The color of the
|
||||
light when on is controlled with <tt>selection_color()<tt>, which defaults to
|
||||
FL_RED.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Check_Button.Fl_Check_Button">Fl_Check_Button</a>
|
||||
<li><a href="#Fl_Check_Button.~Fl_Check_Button">~Fl_Check_Button</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Check_Button.Fl_Check_Button">Fl_Check_Button::Fl_Check_Button(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Check_Button</tt> widget using the given position,
|
||||
size, and label string.
|
||||
|
||||
<h4><a name="Fl_Check_Button.~Fl_Check_Button">Fl_Check_Button::~Fl_Check_Button()</a></h4>
|
||||
|
||||
The destructor deletes the check button.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Check_Button</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Check_Button.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
Buttons generate callbacks when they are clicked by the user. You
|
||||
control exactly when and how by changing the values for <TT>type()</TT>
|
||||
and <TT>when()</TT>.
|
||||
<P>The <TT>Fl_Check_Button</TT> subclass display the "on" state by
|
||||
turning on a light, rather than drawing pushed in. The shape of the
|
||||
"light" is initially set to FL_DIAMOND_DOWN_BOX. The color of the
|
||||
light when on is controlled with <TT>selection_color()<TT>, which
|
||||
defaults to FL_RED. </TT></TT></P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Check_Button.Fl_Check_Button>Fl_Check_Button</A></LI>
|
||||
<LI><A href=#Fl_Check_Button.~Fl_Check_Button>~Fl_Check_Button</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Check_Button.Fl_Check_Button>
|
||||
Fl_Check_Button::Fl_Check_Button(int x, int y, int w, int h, const char
|
||||
*label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Check_Button</TT> widget using the given
|
||||
position, size, and label string.
|
||||
<H4><A name=Fl_Check_Button.~Fl_Check_Button>
|
||||
Fl_Check_Button::~Fl_Check_Button()</A></H4>
|
||||
The destructor deletes the check button. </BODY></HTML>
|
||||
+79
-109
@@ -1,110 +1,80 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Choice">class Fl_Choice</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Menu_">Fl_Menu_</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Choice>class Fl_Choice</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Menu_.html#Fl_Menu_>Fl_Menu_</A>
|
||||
|
|
||||
+----<b>Fl_Choice</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Choice.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
This is a button that when pushed pops up a menu (or hierarchy of
|
||||
menus) defined by an array of <a href="#Fl_Menu_Item"><tt>Fl_Menu_Item</tt></a>
|
||||
objects. Motif calls this an OptionButton.
|
||||
|
||||
<p>The only difference between this and a <a href="#Fl_Menu_Button">
|
||||
<tt>Fl_Menu_Button</tt></a> is that the name of the most recent chosen
|
||||
menu item is displayed inside the box, while the label is displayed
|
||||
outside the box. However, since the use of this is most often to
|
||||
control a single variable rather than do individual callbacks, some of
|
||||
the <tt>Fl_Menu_Button</tt> methods are redescribed here in those terms.
|
||||
|
||||
<P>When the user picks an item off the menu the <tt>value()</tt> is set
|
||||
to that item and then the callback is done.
|
||||
|
||||
<p>All three mouse buttons pop up the menu. The Forms behavior of the
|
||||
first two buttons to increment/decrement the choice is not
|
||||
implemented. This could be added with a subclass, however.
|
||||
|
||||
<p>The menu will also pop up in response to shortcuts indicated by
|
||||
putting a '&' character in the <tt>label()</tt>. See
|
||||
<a href="#Fl_Button"><tt>Fl_Button</tt></a> for a description of this.
|
||||
|
||||
<p>Typing the <tt>shortcut()</tt> of any of the items will do exactly
|
||||
the same as when you pick the item with the mouse. The '&' character
|
||||
in item names are only looked at when the menu is popped up, however.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Choice.Fl_Choice">Fl_Choice</a>
|
||||
<li><a href="#Fl_Choice.~Fl_Choice">~Fl_Choice</a>
|
||||
<li><a href="#Fl_Choice.clear_changed">clear_changed</a>
|
||||
<li><a href="#Fl_Choice.changed">changed</a>
|
||||
<li><a href="#Fl_Choice.down_box">down_box</a>
|
||||
<li><a href="#Fl_Choice.set_changed">set_changed</a>
|
||||
<li><a href="#Fl_Choice.value">value</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Choice.Fl_Choice">Fl_Choice::Fl_Choice(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Choice</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_UP_BOX</tt>.
|
||||
|
||||
<p>The constructor sets <tt>menu()</tt> to <tt>NULL</tt>. See <a
|
||||
href="#Fl_Menu_"><tt>Fl_Menu_</tt></a> for the methods to set or change
|
||||
the menu.
|
||||
|
||||
<h4><a name="Fl_Choice.~Fl_Choice">virtual Fl_Choice::~Fl_Choice()</a></h4>
|
||||
|
||||
The destructor removes the <tt>Fl_Choice</tt> widget and all of its menu items.
|
||||
|
||||
<h4><a name="Fl_Choice.value">int Fl_Choice::value() const<br>
|
||||
int Fl_Choice::value(int)<br>
|
||||
int Fl_Choice::value(const Fl_Menu *)</a></h4>
|
||||
|
||||
The value is the index into the <tt>Fl_Menu</tt> array of the last item chosen
|
||||
by the user. It is zero initially. You can set it as an integer, or
|
||||
set it with a pointer to a menu item. The set routines return
|
||||
non-zero if the new value is different than the old one. Changing it
|
||||
causes a <tt>redraw()</tt>.
|
||||
|
||||
<h4><a name="Fl_Choice.changed">int Fl_Widget::changed() const</a></h4>
|
||||
|
||||
This value is true if the user picks a different value. <i>It is
|
||||
turned off by <tt>value()</tt> and just before doing a callback (the
|
||||
callback can turn it back on if desired).</i>
|
||||
|
||||
<h4><a name="Fl_Choice.set_changed">void Fl_Widget::set_changed()</a></h4>
|
||||
|
||||
This method sets the <tt>changed()</tt> flag.
|
||||
|
||||
<h4><a name="Fl_Choice.clear_changed">void Fl_Widget::clear_changed()</a></h4>
|
||||
|
||||
This method clears the <tt>changed()</tt> flag.
|
||||
|
||||
<h4><a name="Fl_Choice.down_box">Fl_Boxtype Fl_Choice::down_box() const<br>
|
||||
void Fl_Choice::down_box(Fl_Boxtype b)</a></h4>
|
||||
|
||||
The first form gets the current down box, which is used when the menu
|
||||
is popped up. The default down box type is <tt>FL_DOWN_BOX</tt>
|
||||
|
||||
The second form sets the current down box type to <tt>b</tt>.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Choice</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Choice.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
This is a button that when pushed pops up a menu (or hierarchy of
|
||||
menus) defined by an array of <A href=Fl_Menu_Item.html#Fl_Menu_Item><TT>
|
||||
Fl_Menu_Item</TT></A> objects. Motif calls this an OptionButton.
|
||||
<P>The only difference between this and a <A href=Fl_Menu_Button.html#Fl_Menu_Button>
|
||||
<TT>Fl_Menu_Button</TT></A> is that the name of the most recent chosen
|
||||
menu item is displayed inside the box, while the label is displayed
|
||||
outside the box. However, since the use of this is most often to
|
||||
control a single variable rather than do individual callbacks, some of
|
||||
the <TT>Fl_Menu_Button</TT> methods are redescribed here in those
|
||||
terms. </P>
|
||||
<P>When the user picks an item off the menu the <TT>value()</TT> is set
|
||||
to that item and then the callback is done. </P>
|
||||
<P>All three mouse buttons pop up the menu. The Forms behavior of the
|
||||
first two buttons to increment/decrement the choice is not implemented.
|
||||
This could be added with a subclass, however. </P>
|
||||
<P>The menu will also pop up in response to shortcuts indicated by
|
||||
putting a ''character in the <TT>label()</TT>. See <A href=Fl_Button.html#Fl_Button>
|
||||
<TT>Fl_Button</TT></A> for a description of this. </P>
|
||||
<P>Typing the <TT>shortcut()</TT> of any of the items will do exactly
|
||||
the same as when you pick the item with the mouse. The ''character in
|
||||
item names are only looked at when the menu is popped up, however. </P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Choice.Fl_Choice>Fl_Choice</A></LI>
|
||||
<LI><A href=#Fl_Choice.~Fl_Choice>~Fl_Choice</A></LI>
|
||||
<LI><A href=#Fl_Choice.clear_changed>clear_changed</A></LI>
|
||||
<LI><A href=#Fl_Choice.changed>changed</A></LI>
|
||||
<LI><A href=#Fl_Choice.down_box>down_box</A></LI>
|
||||
<LI><A href=#Fl_Choice.set_changed>set_changed</A></LI>
|
||||
<LI><A href=#Fl_Choice.value>value</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Choice.Fl_Choice>Fl_Choice::Fl_Choice(int x, int y, int
|
||||
w, int h, const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Choice</TT> widget using the given position,
|
||||
size, and label string. The default boxtype is <TT>FL_UP_BOX</TT>.
|
||||
<P>The constructor sets <TT>menu()</TT> to <TT>NULL</TT>. See <A href=Fl_Menu_.html#Fl_Menu_>
|
||||
<TT>Fl_Menu_</TT></A> for the methods to set or change the menu. </P>
|
||||
<H4><A name=Fl_Choice.~Fl_Choice>virtual Fl_Choice::~Fl_Choice()</A></H4>
|
||||
The destructor removes the <TT>Fl_Choice</TT> widget and all of its
|
||||
menu items.
|
||||
<H4><A name=Fl_Choice.value>int Fl_Choice::value() const
|
||||
<BR> int Fl_Choice::value(int)
|
||||
<BR> int Fl_Choice::value(const Fl_Menu *)</A></H4>
|
||||
The value is the index into the <TT>Fl_Menu</TT> array of the last
|
||||
item chosen by the user. It is zero initially. You can set it as an
|
||||
integer, or set it with a pointer to a menu item. The set routines
|
||||
return non-zero if the new value is different than the old one.
|
||||
Changing it causes a <TT>redraw()</TT>.
|
||||
<H4><A name=Fl_Choice.changed>int Fl_Widget::changed() const</A></H4>
|
||||
This value is true if the user picks a different value. <I>It is
|
||||
turned off by <TT>value()</TT> and just before doing a callback (the
|
||||
callback can turn it back on if desired).</I>
|
||||
<H4><A name=Fl_Choice.set_changed>void Fl_Widget::set_changed()</A></H4>
|
||||
This method sets the <TT>changed()</TT> flag.
|
||||
<H4><A name=Fl_Choice.clear_changed>void Fl_Widget::clear_changed()</A></H4>
|
||||
This method clears the <TT>changed()</TT> flag.
|
||||
<H4><A name=Fl_Choice.down_box>Fl_Boxtype Fl_Choice::down_box() const
|
||||
<BR> void Fl_Choice::down_box(Fl_Boxtype b)</A></H4>
|
||||
The first form gets the current down box, which is used when the menu
|
||||
is popped up. The default down box type is <TT>FL_DOWN_BOX</TT> The
|
||||
second form sets the current down box type to <TT>b</TT>. </BODY></HTML>
|
||||
+55
-77
@@ -1,78 +1,56 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Clock">class Fl_Clock</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Widget">Fl_Widget</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Clock>class Fl_Clock</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Widget.html#Fl_Widget>Fl_Widget</A>
|
||||
|
|
||||
+----<b>Fl_Clock</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Clock.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
This widget provides a round analog clock display and is provided for
|
||||
Forms compatibility. It installs a 1-second timeout callback using
|
||||
<a href="#add_timeout"><tt>Fl::add_timeout()</tt></a>.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Clock.Fl_Clock">Fl_Clock</a>
|
||||
<li><a href="#Fl_Clock.~Fl_Clock">~Fl_Clock</a>
|
||||
<li><a href="#Fl_Clock.hour">hour</a>
|
||||
<li><a href="#Fl_Clock.minute">minute</a>
|
||||
<li><a href="#Fl_Clock.second">second</a>
|
||||
<li><a href="#Fl_Clock.value">value</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Clock.Fl_Clock">Fl_Clock::Fl_Clock(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Clock</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_NO_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Clock.~Fl_Clock">virtual Fl_Clock::~Fl_Clock()</a></h4>
|
||||
|
||||
The destructor <i>also deletes all the children</i>. This allows a
|
||||
whole tree to be deleted at once, without having to keep a pointer to all
|
||||
the children in the user code. A kludge has been done so the
|
||||
<tt>Fl_Clock</tt> and all of it's children can be automatic (local)
|
||||
variables, but you must declare the <tt>Fl_Clock</tt> <i>first</i>, so
|
||||
that it is destroyed last.
|
||||
|
||||
<h4><a name="Fl_Clock.hour">int Fl_Clock::hour() const</a></h4>
|
||||
|
||||
Returns the current hour (0 to 23).
|
||||
|
||||
<h4><a name="Fl_Clock.minute">int Fl_Clock::minute() const</a></h4>
|
||||
|
||||
Returns the current minute (0 to 59).
|
||||
|
||||
<h4><a name="Fl_Clock.second">int Fl_Clock::second() const</a></h4>
|
||||
|
||||
Returns the current second (0 to 60, 60 = leap second).
|
||||
|
||||
<h4><a name="Fl_Clock.value">void Fl_Clock::value(ulong v)<br>
|
||||
void Fl_Clock::value(int h, int m, int s)<br>
|
||||
ulong Fl_Clock::value(void)</a></h4>
|
||||
|
||||
The first two forms of <tt>value</tt> set the displayed time to the given
|
||||
UNIX time value or specific hours, minutes, and seconds.
|
||||
|
||||
<p>The third form of <tt>value</tt> returns the displayed time in seconds
|
||||
since the UNIX epoch (January 1, 1970).
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Clock</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Clock.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
This widget provides a round analog clock display and is provided for
|
||||
Forms compatibility. It installs a 1-second timeout callback using <A href=functions.html#add_timeout>
|
||||
<TT>Fl::add_timeout()</TT></A>.
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Clock.Fl_Clock>Fl_Clock</A></LI>
|
||||
<LI><A href=#Fl_Clock.~Fl_Clock>~Fl_Clock</A></LI>
|
||||
<LI><A href=#Fl_Clock.hour>hour</A></LI>
|
||||
<LI><A href=#Fl_Clock.minute>minute</A></LI>
|
||||
<LI><A href=#Fl_Clock.second>second</A></LI>
|
||||
<LI><A href=#Fl_Clock.value>value</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Clock.Fl_Clock>Fl_Clock::Fl_Clock(int x, int y, int w,
|
||||
int h, const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Clock</TT> widget using the given position, size,
|
||||
and label string. The default boxtype is <TT>FL_NO_BOX</TT>.
|
||||
<H4><A name=Fl_Clock.~Fl_Clock>virtual Fl_Clock::~Fl_Clock()</A></H4>
|
||||
The destructor <I>also deletes all the children</I>. This allows a
|
||||
whole tree to be deleted at once, without having to keep a pointer to
|
||||
all the children in the user code. A kludge has been done so the <TT>
|
||||
Fl_Clock</TT> and all of it's children can be automatic (local)
|
||||
variables, but you must declare the <TT>Fl_Clock</TT><I>first</I>, so
|
||||
that it is destroyed last.
|
||||
<H4><A name=Fl_Clock.hour>int Fl_Clock::hour() const</A></H4>
|
||||
Returns the current hour (0 to 23).
|
||||
<H4><A name=Fl_Clock.minute>int Fl_Clock::minute() const</A></H4>
|
||||
Returns the current minute (0 to 59).
|
||||
<H4><A name=Fl_Clock.second>int Fl_Clock::second() const</A></H4>
|
||||
Returns the current second (0 to 60, 60 = leap second).
|
||||
<H4><A name=Fl_Clock.value>void Fl_Clock::value(ulong v)
|
||||
<BR> void Fl_Clock::value(int h, int m, int s)
|
||||
<BR> ulong Fl_Clock::value(void)</A></H4>
|
||||
The first two forms of <TT>value</TT> set the displayed time to the
|
||||
given UNIX time value or specific hours, minutes, and seconds.
|
||||
<P>The third form of <TT>value</TT> returns the displayed time in
|
||||
seconds since the UNIX epoch (January 1, 1970). </P>
|
||||
</BODY></HTML>
|
||||
@@ -1,103 +1,78 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Color_Chooser">class Fl_Color_Chooser</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Group">Fl_Group</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Color_Chooser>class Fl_Color_Chooser</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Group.html#Fl_Group>Fl_Group</A>
|
||||
|
|
||||
+----<b>Fl_Color_Chooser</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Color_Chooser.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Color_Chooser</tt> widget provides a standard RGB color
|
||||
chooser. You can place any number of these into a panel of your own
|
||||
design. This widget contains the hue box, value slider, and rgb input
|
||||
fields from the above diagram (it does not have the color chips or the
|
||||
Cancel or OK buttons). The callback is done every time the user
|
||||
changes the rgb value. It is not done if they move the hue control in
|
||||
a way that produces the <i>same</i> rgb value, such as when saturation
|
||||
or value is zero.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Color_Chooser.Fl_Color_Chooser">Fl_Color_Chooser</a>
|
||||
<li><a href="#Fl_Color_Chooser.~Fl_Color_Chooser">~Fl_Color_Chooser</a>
|
||||
<li><a href="#Fl_Color_Chooser.add">add</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Color_Chooser.Fl_Color_Chooser">Fl_Color_Chooser::Fl_Color_Chooser(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Color_Chooser</tt> widget using the given
|
||||
position, size, and label string. The recommended dimensions are
|
||||
200x95. The color is initialized to black.
|
||||
|
||||
<h4><a name="Fl_Color_Chooser.~Fl_Color_Chooser">virtual Fl_Color_Chooser::~Fl_Color_Chooser()</a></h4>
|
||||
|
||||
The destructor removes the color chooser and all of its controls.
|
||||
|
||||
<h4><a name="Fl_Color_Chooser.hue">double Fl_Color_Chooser::hue() const</a></h4>
|
||||
|
||||
Return the current hue. 0 <= hue < 6. Zero is red, one is
|
||||
yellow, two is green, etc. <i>This value is convienent for the internal
|
||||
calculations - some other systems consider hue to run from zero to
|
||||
one, or from 0 to 360.</i>
|
||||
|
||||
<h4><a name="Fl_Color_Chooser.saturation">double Fl_Color_Chooser::saturation() const</a></h4>
|
||||
|
||||
Returns the saturation. 0 <= saturation <= 1.
|
||||
|
||||
<h4><a name="Fl_Color_Chooser.value">double Fl_Color_Chooser::value() const</a></h4>
|
||||
|
||||
Returns the value/brightness. 0 <= value <= 1.
|
||||
|
||||
<h4><a name="Fl_Color_Chooser.r">double Fl_Color_Chooser::r() const</a></h4>
|
||||
|
||||
Returns the current red value. 0 <= r <= 1.
|
||||
|
||||
<h4><a name="Fl_Color_Chooser.g">double Fl_Color_Chooser::g() const</a></h4>
|
||||
|
||||
Returns the current green value. 0 <= g <= 1.
|
||||
|
||||
<h4><a name="Fl_Color_Chooser.b">double Fl_Color_Chooser::b() const</a></h4>
|
||||
|
||||
Returns the current blue value. 0 <= b <= 1.
|
||||
|
||||
<h4><a name="Fl_Color_Chooser.rgb">int Fl_Color_Chooser::rgb(double, double,
|
||||
double)</a></h4>
|
||||
|
||||
Sets the current rgb color values. Does not do the callback. Does
|
||||
not clamp (but out of range values will produce psychedelic effects in
|
||||
the hue selector).
|
||||
|
||||
<h4><a name="Fl_Color_Chooser.hsv">int Fl_Color_Chooser::hsv(double,double,double)</a></h4>
|
||||
|
||||
Set the hsv values. The passed values are clamped (or for hue,
|
||||
modulus 6 is used) to get legal values. Does not do the callback.
|
||||
|
||||
<h4><a name="Fl_Color_Chooser.hsv2rgb">static void Fl_Color_Chooser::hsv2rgb(double, double,
|
||||
double, double&, double&, double&)</a></h4>
|
||||
|
||||
This <i>static</i> method converts HSV colors to RGB colorspace.
|
||||
|
||||
<h4><a name="Fl_Color_Chooser.rgb2hsv">static void Fl_Color_Chooser::rgb2hsv(double, double, double, double&,
|
||||
double&, double&)</a></h4>
|
||||
|
||||
This <i>static</i> method converts RGB colors to HSV colorspace.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Color_Chooser</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Color_Chooser.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Color_Chooser</TT> widget provides a standard RGB color
|
||||
chooser. You can place any number of these into a panel of your own
|
||||
design. This widget contains the hue box, value slider, and rgb input
|
||||
fields from the above diagram (it does not have the color chips or the
|
||||
Cancel or OK buttons). The callback is done every time the user
|
||||
changes the rgb value. It is not done if they move the hue control in
|
||||
a way that produces the <I>same</I> rgb value, such as when saturation
|
||||
or value is zero.
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Color_Chooser.Fl_Color_Chooser>Fl_Color_Chooser</A></LI>
|
||||
<LI><A href=#Fl_Color_Chooser.~Fl_Color_Chooser>~Fl_Color_Chooser</A></LI>
|
||||
<LI><A href=#Fl_Color_Chooser.add>add</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Color_Chooser.Fl_Color_Chooser>
|
||||
Fl_Color_Chooser::Fl_Color_Chooser(int x, int y, int w, int h, const
|
||||
char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Color_Chooser</TT> widget using the given
|
||||
position, size, and label string. The recommended dimensions are
|
||||
200x95. The color is initialized to black.
|
||||
<H4><A name=Fl_Color_Chooser.~Fl_Color_Chooser>virtual
|
||||
Fl_Color_Chooser::~Fl_Color_Chooser()</A></H4>
|
||||
The destructor removes the color chooser and all of its controls.
|
||||
<H4><A name=Fl_Color_Chooser.hue>double Fl_Color_Chooser::hue() const</A>
|
||||
</H4>
|
||||
Return the current hue. 0 <= hue < 6. Zero is red, one is yellow,
|
||||
two is green, etc. <I>This value is convienent for the internal
|
||||
calculations - some other systems consider hue to run from zero to one,
|
||||
or from 0 to 360.</I>
|
||||
<H4><A name=Fl_Color_Chooser.saturation>double
|
||||
Fl_Color_Chooser::saturation() const</A></H4>
|
||||
Returns the saturation. 0 <= saturation <= 1.
|
||||
<H4><A name=Fl_Color_Chooser.value>double Fl_Color_Chooser::value()
|
||||
const</A></H4>
|
||||
Returns the value/brightness. 0 <= value <= 1.
|
||||
<H4><A name=Fl_Color_Chooser.r>double Fl_Color_Chooser::r() const</A></H4>
|
||||
Returns the current red value. 0 <= r <= 1.
|
||||
<H4><A name=Fl_Color_Chooser.g>double Fl_Color_Chooser::g() const</A></H4>
|
||||
Returns the current green value. 0 <= g <= 1.
|
||||
<H4><A name=Fl_Color_Chooser.b>double Fl_Color_Chooser::b() const</A></H4>
|
||||
Returns the current blue value. 0 <= b <= 1.
|
||||
<H4><A name=Fl_Color_Chooser.rgb>int Fl_Color_Chooser::rgb(double,
|
||||
double, double)</A></H4>
|
||||
Sets the current rgb color values. Does not do the callback. Does
|
||||
not clamp (but out of range values will produce psychedelic effects in
|
||||
the hue selector).
|
||||
<H4><A name=Fl_Color_Chooser.hsv>int
|
||||
Fl_Color_Chooser::hsv(double,double,double)</A></H4>
|
||||
Set the hsv values. The passed values are clamped (or for hue,
|
||||
modulus 6 is used) to get legal values. Does not do the callback.
|
||||
<H4><A name=Fl_Color_Chooser.hsv2rgb>static void
|
||||
Fl_Color_Chooser::hsv2rgb(double, double, double, double&, double&,
|
||||
double&)</A></H4>
|
||||
This <I>static</I> method converts HSV colors to RGB colorspace.
|
||||
<H4><A name=Fl_Color_Chooser.rgb2hsv>static void
|
||||
Fl_Color_Chooser::rgb2hsv(double, double, double, double&, double&,
|
||||
double&)</A></H4>
|
||||
This <I>static</I> method converts RGB colors to HSV colorspace. </BODY>
|
||||
</HTML>
|
||||
@@ -1,66 +1,47 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Counter">class Fl_Counter</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Valuator">Fl_Valuator</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Counter>class Fl_Counter</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Valuator.html#Fl_Valuator>Fl_Valuator</A>
|
||||
|
|
||||
+----<b>Fl_Counter</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Counter.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Counter</tt> widget is provided for forms compatibility. It
|
||||
controls a single floating point value.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Counter.Fl_Counter">Fl_Counter</a>
|
||||
<li><a href="#Fl_Counter.~Fl_Counter">~Fl_Counter</a>
|
||||
<li><a href="#Fl_Counter.lstep">lstep</a>
|
||||
<li><a href="#Fl_Counter.type">type</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Counter.Fl_Counter">Fl_Counter::Fl_Counter(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Counter</tt> widget using the given position, size, and
|
||||
label string. The default type is <tt>FL_NORMAL_COUNTER</tt>.
|
||||
|
||||
<h4><a name="Fl_Counter.~Fl_Counter">virtual Fl_Counter::~Fl_Counter()</a></h4>
|
||||
|
||||
Destroys the valuator.
|
||||
|
||||
<h4><a name="Fl_Counter.lstep">double Fl_Counter::lstep() const<br>
|
||||
void Fl_Counter::lstep(double)</a></h4>
|
||||
|
||||
Get or set the increment for the double-arrow buttons. The default
|
||||
value is 1.0.
|
||||
|
||||
<h4><a name="Fl_Counter.type">type(uchar)</a></h4>
|
||||
|
||||
Sets the type of counter:
|
||||
|
||||
<ul>
|
||||
<li><tt>FL_NORMAL_COUNTER</tt> - Displays a counter with 4 arrow
|
||||
buttons.
|
||||
|
||||
<li><tt>FL_SIMPLE_COUNTER</tt> - Displays a counter with only 2
|
||||
arrow buttons.
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Counter</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Counter.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Counter</TT> widget is provided for forms compatibility.
|
||||
It controls a single floating point value.
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Counter.Fl_Counter>Fl_Counter</A></LI>
|
||||
<LI><A href=#Fl_Counter.~Fl_Counter>~Fl_Counter</A></LI>
|
||||
<LI><A href=#Fl_Counter.lstep>lstep</A></LI>
|
||||
<LI><A href=#Fl_Counter.type>type</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Counter.Fl_Counter>Fl_Counter::Fl_Counter(int x, int y,
|
||||
int w, int h, const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Counter</TT> widget using the given position,
|
||||
size, and label string. The default type is <TT>FL_NORMAL_COUNTER</TT>.
|
||||
<H4><A name=Fl_Counter.~Fl_Counter>virtual Fl_Counter::~Fl_Counter()</A></H4>
|
||||
Destroys the valuator.
|
||||
<H4><A name=Fl_Counter.lstep>double Fl_Counter::lstep() const
|
||||
<BR> void Fl_Counter::lstep(double)</A></H4>
|
||||
Get or set the increment for the double-arrow buttons. The default
|
||||
value is 1.0.
|
||||
<H4><A name=Fl_Counter.type>type(uchar)</A></H4>
|
||||
Sets the type of counter:
|
||||
<UL>
|
||||
<LI><TT>FL_NORMAL_COUNTER</TT> - Displays a counter with 4 arrow
|
||||
buttons. </LI>
|
||||
<LI><TT>FL_SIMPLE_COUNTER</TT> - Displays a counter with only 2 arrow
|
||||
buttons. </LI>
|
||||
</UL>
|
||||
</BODY></HTML>
|
||||
+44
-64
@@ -1,65 +1,45 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Dial">class Fl_Dial</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Valuator">Fl_Valuator</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Dial>class Fl_Dial</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Valuator.html#Fl_Valuator>Fl_Valuator</A>
|
||||
|
|
||||
+----<b>Fl_Dial</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Dial.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Dial</tt> widget provides a circular dial to control a
|
||||
single floating point value.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Dial.Fl_Dial">Fl_Dial</a>
|
||||
<li><a href="#Fl_Dial.~Fl_Dial">~Fl_Dial</a>
|
||||
<li><a href="#Fl_Dial.angles">angles</a>
|
||||
<li><a href="#Fl_Dial.type">type</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Dial.Fl_Dial">Fl_Dial::Fl_Dial(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Dial</tt> widget using the given position, size, and
|
||||
label string. The default type is <tt>FL_NORMAL_DIAL</tt>.
|
||||
|
||||
<h4><a name="Fl_Dial.~Fl_Dial">virtual Fl_Dial::~Fl_Dial()</a></h4>
|
||||
|
||||
Destroys the valuator.
|
||||
|
||||
<h4><a name="Fl_Dial.angles">void Fl_Dial::angles(short a, short b)</a></h4>
|
||||
|
||||
Sets the angles used for the minimum and maximum values. By default these
|
||||
are 0 and 360, respectively.
|
||||
|
||||
<h4><a name="Fl_Dial.type">type(uchar)</a></h4>
|
||||
|
||||
Sets the type of the dial to:
|
||||
|
||||
<ul>
|
||||
<li><tt>FL_NORMAL_DIAL</tt> - Draws a normal dial with a knob.
|
||||
|
||||
<li><tt>FL_LINE_DIAL</tt> - Draws a dial with a line.
|
||||
|
||||
<li><tt>FL_FILL_DIAL</tt> - Draws a dial with a filled arc.
|
||||
</tt>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Dial</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Dial.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Dial</TT> widget provides a circular dial to control a
|
||||
single floating point value.
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Dial.Fl_Dial>Fl_Dial</A></LI>
|
||||
<LI><A href=#Fl_Dial.~Fl_Dial>~Fl_Dial</A></LI>
|
||||
<LI><A href=#Fl_Dial.angles>angles</A></LI>
|
||||
<LI><A href=#Fl_Dial.type>type</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Dial.Fl_Dial>Fl_Dial::Fl_Dial(int x, int y, int w, int
|
||||
h, const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Dial</TT> widget using the given position, size,
|
||||
and label string. The default type is <TT>FL_NORMAL_DIAL</TT>.
|
||||
<H4><A name=Fl_Dial.~Fl_Dial>virtual Fl_Dial::~Fl_Dial()</A></H4>
|
||||
Destroys the valuator.
|
||||
<H4><A name=Fl_Dial.angles>void Fl_Dial::angles(short a, short b)</A></H4>
|
||||
Sets the angles used for the minimum and maximum values. By default
|
||||
these are 0 and 360, respectively.
|
||||
<H4><A name=Fl_Dial.type>type(uchar)</A></H4>
|
||||
Sets the type of the dial to:
|
||||
<UL>
|
||||
<LI><TT>FL_NORMAL_DIAL</TT> - Draws a normal dial with a knob. </LI>
|
||||
<LI><TT>FL_LINE_DIAL</TT> - Draws a dial with a line. </LI>
|
||||
<LI><TT>FL_FILL_DIAL</TT> - Draws a dial with a filled arc. </LI>
|
||||
</UL>
|
||||
</BODY></HTML>
|
||||
@@ -1,66 +1,58 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Double_Window">class Fl_Double_Window</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Window">Fl_Window</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Double_Window>class Fl_Double_Window</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Window.html#Fl_Window>Fl_Window</A>
|
||||
|
|
||||
+----<b>Fl_Double_Window</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Double_Window.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Double_Window</tt> class provides a double-buffered window.
|
||||
If possible this will use the X double buffering extension (Xdbe). If
|
||||
not, it will draw the window data into an off-screen pixmap, and then
|
||||
copy it to the on-screen window.
|
||||
|
||||
<p>It is highly recommended that you put the following code before the
|
||||
first <tt>show()</tt> of <i>any</i> window in your program:
|
||||
|
||||
<ul><pre>
|
||||
+----<B>Fl_Double_Window</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Double_Window.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Double_Window</TT> class provides a double-buffered window.
|
||||
If possible this will use the X double buffering extension (Xdbe). If
|
||||
not, it will draw the window data into an off-screen pixmap, and then
|
||||
copy it to the on-screen window.
|
||||
<P>It is highly recommended that you put the following code before the
|
||||
first <TT>show()</TT> of <I>any</I> window in your program: </P>
|
||||
<UL>
|
||||
<PRE>
|
||||
Fl::visual(FL_DOUBLE|FL_INDEX)
|
||||
</pre></ul>
|
||||
|
||||
This makes sure you can use Xdbe on servers where double buffering does
|
||||
not exist for every visual.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Double_Window.Fl_Double_Window">Fl_Double_Window</a>
|
||||
<li><a href="#Fl_Double_Window.~Fl_Double_Window">~Fl_Double_Window</a>
|
||||
<li><a href="#Fl_Double_Window.pixmap">pixmap</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Double_Window.Fl_Double_Window">Fl_Double_Window::Fl_Double_Window(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Double_Window</tt> widget using the given position, size, and
|
||||
label (title) string.
|
||||
|
||||
<h4><a name="Fl_Double_Window.~Fl_Double_Window">virtual Fl_Double_Window::~Fl_Double_Window()</a></h4>
|
||||
|
||||
The destructor <i>also deletes all the children</i>. This allows a
|
||||
whole tree to be deleted at once, without having to keep a pointer to all
|
||||
the children in the user code.
|
||||
|
||||
<h4><a name="Fl_Double_Window.pixmap>ulong Fl_Double_Window::pixmap() const</a></h4>
|
||||
</PRE>
|
||||
</UL>
|
||||
This makes sure you can use Xdbe on servers where double buffering
|
||||
does not exist for every visual.
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Double_Window.Fl_Double_Window>Fl_Double_Window</A></LI>
|
||||
<LI><A href=#Fl_Double_Window.~Fl_Double_Window>~Fl_Double_Window</A></LI>
|
||||
<LI><A href=#Fl_Double_Window.pixmap>pixmap</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Double_Window.Fl_Double_Window>
|
||||
Fl_Double_Window::Fl_Double_Window(int x, int y, int w, int h, const
|
||||
char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Double_Window</TT> widget using the given
|
||||
position, size, and label (title) string.
|
||||
<H4><A name=Fl_Double_Window.~Fl_Double_Window>virtual
|
||||
Fl_Double_Window::~Fl_Double_Window()</A></H4>
|
||||
The destructor <I>also deletes all the children</I>. This allows a
|
||||
whole tree to be deleted at once, without having to keep a pointer to
|
||||
all the children in the user code.
|
||||
<H4><A name="Fl_Double_Window.pixmap>ulong Fl_Double_Window::pixmap() const</a></h4>
|
||||
|
||||
Returns the off-screen pixmap or back buffer. This value is zero until
|
||||
the first time <tt>flush()</tt> is called.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
">
|
||||
</H4>
|
||||
</BODY></HTML>
|
||||
+29
-40
@@ -1,29 +1,24 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_End">class Fl_End</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Group">Fl_Group</a>----<b>Fl_End</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Group.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
This is a dummy class that allows you to end a group in a constructor list of a class:
|
||||
|
||||
<ul><pre>class MyClass {
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_End>class Fl_End</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Group.html#Fl_Group>Fl_Group</A>----<B>Fl_End</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Group.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
This is a dummy class that allows you to end a group in a constructor
|
||||
list of a class:
|
||||
<UL>
|
||||
<PRE>class MyClass {
|
||||
Fl_Group group;
|
||||
Fl_Button button_in_group;
|
||||
Fl_End end;
|
||||
@@ -35,17 +30,11 @@ MyClass::MyClass() :
|
||||
button_in_group(20,20,60,30),
|
||||
end(),
|
||||
button_outside_group(10,120,60,30)
|
||||
{}</pre></ul>
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_End.Fl_End">Fl_End</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_End.Fl_End">Fl_End::Fl_End</a></h4>
|
||||
|
||||
The constructor does <tt>Fl_Group::current()->end()</tt>.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
{}</PRE>
|
||||
</UL>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_End.Fl_End>Fl_End</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_End.Fl_End>Fl_End::Fl_End</A></H4>
|
||||
The constructor does <TT>Fl_Group::current()->end()</TT>. </BODY></HTML>
|
||||
@@ -1,47 +1,35 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Float_Input">class Fl_Float_Input</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Input">Fl_Input</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Float_Input>class Fl_Float_Input</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=functions.html#Fl_Input>Fl_Input</A>
|
||||
|
|
||||
+----<b>Fl_Float_Input</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Input.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Float_Input</tt> class is a subclass of <tt>Fl_Input</tt> that
|
||||
displays its input in red when the value string is not a legal floating point
|
||||
value.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Float_Input.Fl_Float_Input">Fl_Float_Input</a>
|
||||
<li><a href="#Fl_Float_Input.~Fl_Float_Input">~Fl_Float_Input</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Float_Input.Fl_Float_Input">Fl_Float_Input::Fl_Float_Input(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Float_Input</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_DOWN_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Float_Input.~Fl_Float_Input">virtual Fl_Float_Input::~Fl_Float_Input()</a></h4>
|
||||
|
||||
Destroys the widget and any value associated with it.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Float_Input</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Input.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Float_Input</TT> class is a subclass of <TT>Fl_Input</TT>
|
||||
that displays its input in red when the value string is not a legal
|
||||
floating point value.
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Float_Input.Fl_Float_Input>Fl_Float_Input</A></LI>
|
||||
<LI><A href=#Fl_Float_Input.~Fl_Float_Input>~Fl_Float_Input</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Float_Input.Fl_Float_Input>
|
||||
Fl_Float_Input::Fl_Float_Input(int x, int y, int w, int h, const char
|
||||
*label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Float_Input</TT> widget using the given position,
|
||||
size, and label string. The default boxtype is <TT>FL_DOWN_BOX</TT>.
|
||||
<H4><A name=Fl_Float_Input.~Fl_Float_Input>virtual
|
||||
Fl_Float_Input::~Fl_Float_Input()</A></H4>
|
||||
Destroys the widget and any value associated with it. </BODY></HTML>
|
||||
+55
-68
@@ -1,74 +1,65 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Free">class Fl_Free</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Widget">Fl_Widget</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Free>class Fl_Free</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Widget.html#Fl_Widget>Fl_Widget</A>
|
||||
|
|
||||
+----<b>Fl_Free</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Free.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
Emulation of the Forms "free" widget. This emulation allows the free
|
||||
demo to run, and appears to be useful for porting programs written in
|
||||
Forms which use the free widget or make subclasses of the Forms widgets.
|
||||
|
||||
<p>There are five types of free, which determine when the handle
|
||||
function is called:
|
||||
|
||||
<ul><pre>
|
||||
+----<B>Fl_Free</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Free.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
Emulation of the Forms "free" widget. This emulation allows the free
|
||||
demo to run, and appears to be useful for porting programs written in
|
||||
Forms which use the free widget or make subclasses of the Forms
|
||||
widgets.
|
||||
<P>There are five types of free, which determine when the handle
|
||||
function is called: </P>
|
||||
<UL>
|
||||
<PRE>
|
||||
#define FL_NORMAL_FREE 1
|
||||
#define FL_SLEEPING_FREE 2
|
||||
#define FL_INPUT_FREE 3
|
||||
#define FL_CONTINUOUS_FREE 4
|
||||
#define FL_ALL_FREE 5
|
||||
</pre></ul>
|
||||
|
||||
<p>An FL_INPUT_FREE accepts FL_FOCUS events. A FL_CONTINUOUS_FREE
|
||||
sets a timeout callback 100 times a second and provides a FL_STEP
|
||||
event, this has obvious detrimental effects on machine performance.
|
||||
FL_ALL_FREE does both. FL_SLEEPING_FREE are deactivated.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Free.Fl_Free">Fl_Free</a>
|
||||
<li><a href="#Fl_Free.~Fl_Free">~Fl_Free</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Free.Fl_Free">Fl_Free(uchar type, int, int, int, int, const char*l, FL_HANDLEPTR hdl)</a></h4>
|
||||
|
||||
The constructor takes both the <tt>type</tt> and the <tt>handle</tt> function.
|
||||
The handle function should be declared as follows:
|
||||
|
||||
<ul><pre>
|
||||
</PRE>
|
||||
</UL>
|
||||
<P>An FL_INPUT_FREE accepts FL_FOCUS events. A FL_CONTINUOUS_FREE sets
|
||||
a timeout callback 100 times a second and provides a FL_STEP event,
|
||||
this has obvious detrimental effects on machine performance.
|
||||
FL_ALL_FREE does both. FL_SLEEPING_FREE are deactivated. </P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Free.Fl_Free>Fl_Free</A></LI>
|
||||
<LI><A href=#Fl_Free.~Fl_Free>~Fl_Free</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Free.Fl_Free>Fl_Free(uchar type, int, int, int, int,
|
||||
const char*l, FL_HANDLEPTR hdl)</A></H4>
|
||||
The constructor takes both the <TT>type</TT> and the <TT>handle</TT>
|
||||
function. The handle function should be declared as follows:
|
||||
<UL>
|
||||
<PRE>
|
||||
int
|
||||
handle_function(Fl_Widget *w,
|
||||
int event,
|
||||
float event_x,
|
||||
float event_y,
|
||||
char key)
|
||||
</pre></ul>
|
||||
|
||||
This function is called from the the <tt>handle()</tt> method in
|
||||
response to most events, and is called by the <tt>draw()</tt> method.
|
||||
The <tt>event</tt> argument contains the event type:
|
||||
|
||||
<ul><pre>
|
||||
</PRE>
|
||||
</UL>
|
||||
This function is called from the the <TT>handle()</TT> method in
|
||||
response to most events, and is called by the <TT>draw()</TT> method.
|
||||
The <TT>event</TT> argument contains the event type:
|
||||
<UL>
|
||||
<PRE>
|
||||
// old event names for compatability:
|
||||
#define FL_MOUSE FL_DRAG
|
||||
#define FL_DRAW 0
|
||||
@@ -76,12 +67,8 @@ The <tt>event</tt> argument contains the event type:
|
||||
#define FL_FREEMEM 12
|
||||
#define FL_FREEZE FL_UNMAP
|
||||
#define FL_THAW FL_MAP
|
||||
</pre></ul>
|
||||
|
||||
<h4><a name="Fl_Free.~Fl_Free">virtual Fl_Free::~Fl_Free()</a></h4>
|
||||
|
||||
The destructor will call the handle function with the event
|
||||
<tt>FL_FREE_MEM</tt>.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H4><A name=Fl_Free.~Fl_Free>virtual Fl_Free::~Fl_Free()</A></H4>
|
||||
The destructor will call the handle function with the event <TT>
|
||||
FL_FREE_MEM</TT>. </BODY></HTML>
|
||||
+193
-240
@@ -1,166 +1,134 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Gl_Window">class Fl_Gl_Window</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Widget">Fl_Widget</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Gl_Window>class Fl_Gl_Window</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Widget.html#Fl_Widget>Fl_Widget</A>
|
||||
|
|
||||
+----<b>Fl_Gl_Window</b>
|
||||
+----<B>Fl_Gl_Window</B>
|
||||
|
|
||||
+----<a href="#Fl_Pack">Fl_Pack</a>, <a href="#Fl_Scroll">Fl_Scroll</a>, <a href="#Fl_Tabs">Fl_Tabs</a>, <a href="#Fl_Tile">Fl_Tile</a>, <a href="#Fl_Window">Fl_Window</a>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Gl_Window.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Gl_Window</tt> widget sets things up so OpenGL works, and
|
||||
also keeps an OpenGL "context" for that window, so that changes to the
|
||||
lighting and projection may be reused between redraws.
|
||||
</tt>Fl_Gl_Window</tt> also flushes the OpenGL streams and swaps
|
||||
buffers after <tt>draw()</tt> returns.
|
||||
|
||||
<p>OpenGL hardware typically provides some overlay bit planes, which
|
||||
are very useful for drawing UI controls atop your 3D graphics. If the
|
||||
overlay hardware is not provided, FLTK tries to simulate the overlay,
|
||||
This works pretty well if your graphics are double buffered, but not
|
||||
very well for single-buffered.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
|
||||
<center>
|
||||
<table width=90%>
|
||||
<tr>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Gl_Window.Fl_Gl_Window">Fl_Gl_Window</a>
|
||||
<li><a href="#Fl_Gl_Window.~Fl_Gl_Window">~Fl_Gl_Window</a>
|
||||
<li><a href="#Fl_Gl_Window.can_do">can_do</a>
|
||||
<li><a href="#Fl_Gl_Window.can_do_overlay">can_do_overlay</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Gl_Window.draw">draw</a>
|
||||
<li><a href="#Fl_Gl_Window.draw_overlay">draw_overlay</a>
|
||||
<li><a href="#Fl_Gl_Window.handle">handle</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Gl_Window.hide">hide</a>
|
||||
<li><a href="#Fl_Gl_Window.invalidate">invalidate</a>
|
||||
<li><a href="#Fl_Gl_Window.make_current">make_current</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Gl_Window.make_overlay_current">make_overlay_current</a>
|
||||
<li><a href="#Fl_Gl_Window.mode">mode</a>
|
||||
<li><a href="#Fl_Gl_Window.ortho">ortho</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Gl_Window.redraw_overlay">redraw_overlay</a>
|
||||
<li><a href="#Fl_Gl_Window.swap_buffers">swap_buffers</a>
|
||||
<li><a href="#Fl_Gl_Window.valid">valid</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<h4><a name="Fl_Gl_Window.Fl_Gl_Window">Fl_Gl_Window::Fl_Gl_Window(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Gl_Window</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_NO_BOX</tt>. The default mode is
|
||||
<tt>FL_RGB|FL_DOUBLE|FL_DEPTH</tt>.
|
||||
|
||||
<h4><a name="Fl_Gl_Window.~Fl_Gl_Window">virtual Fl_Gl_Window::~Fl_Gl_Window()</a></h4>
|
||||
|
||||
The destructor removes the widget and destroys the OpenGL context associated
|
||||
with it.
|
||||
|
||||
<h4><a name="Fl_Gl_Window.draw">virtual void Fl_Gl_Window::draw(void)</a></h4>
|
||||
|
||||
<tt>Fl_Gl_Window::draw()</tt> is a pure virtual method. You must
|
||||
subclass <tt>Fl_Gl_Window</tt> and provide an implementation for
|
||||
<tt>draw()</tt>. You may also provide an implementation of
|
||||
draw_overlay() if you want to draw into the overlay planes. You can
|
||||
avoid reinitializing the viewport and lights and other things by
|
||||
checking <tt>valid()</tt> at the start of <tt>draw()</tt> and only
|
||||
doing the initialization if it is false.
|
||||
|
||||
<p>The <tt>draw()</tt> method can <i>only</i> use OpenGL calls. Do not
|
||||
attempt to call X, any of the functions in <FL/fl_draw.H>, or
|
||||
<tt>glX</tt> directly. Do not call <tt>gl_start()</tt> or
|
||||
<tt>gl_finish()</tt>.
|
||||
|
||||
<p>If double-buffering is enabled in the window, the back and front buffers
|
||||
are swapped after this function is completed.
|
||||
|
||||
<h4><a name="Fl_Gl_Window.mode">const int Fl_Gl_Window::mode() const<br>
|
||||
int Fl_Gl_Window::mode(int m)</a></h4>
|
||||
|
||||
Set or change the OpenGL capabilites of the window. The value can be
|
||||
any of the following OR'd together:
|
||||
|
||||
<ul>
|
||||
<li><tt>FL_RGB</tt> - RGB color (not indexed)
|
||||
<li><tt>FL_RGB8</tt> - RGB color with at least 8 bits of each color
|
||||
<li><tt>FL_INDEX</tt> - Indexed mode
|
||||
<li><tt>FL_SINGLE</tt> - not double buffered
|
||||
<li><tt>FL_DOUBLE</tt> - double buffered
|
||||
<li><tt>FL_ACCUM</tt> - accumulation buffer
|
||||
<li><tt>FL_ALPHA</tt> - alpha channel in color
|
||||
<li><tt>FL_DEPTH</tt> - depth buffer
|
||||
<li><tt>FL_STENCIL</tt> - stencil buffer
|
||||
<li><tt>FL_MULTISAMPLE</tt> - multisample antialiasing
|
||||
</ul>
|
||||
|
||||
<tt>FL_RGB</tt> and <tt>FL_SINGLE</tt> have a value of zero, so they are
|
||||
"on" unless you give <tt>FL_INDEX</tt> or <tt>FL_DOUBLE</tt>.
|
||||
|
||||
<p>If the desired combination cannot be done, FLTK will try turning off
|
||||
<tt>FL_MULTISAMPLE</tt>. If this also fails the <tt>show()</tt> will call
|
||||
<tt>Fl::error()</tt> and not show the window.
|
||||
|
||||
<p>You can change the mode while the window is displayed. This
|
||||
is most useful for turning double-buffering on and off. Under
|
||||
X this will cause the old X window to be destroyed and a new one to be
|
||||
created. If this is a top-level window this will unfortunately also
|
||||
cause the window to blink, raise to the top, and be de-iconized, and
|
||||
the <tt>xid()</tt> will change, possibly breaking other code. It is best to
|
||||
make the GL window a child of another window if you wish to do this!
|
||||
|
||||
<h4><a name="Fl_Gl_Window.can_do">static int Fl_Gl_Window::can_do(int)<br>
|
||||
int Fl_Gl_Window::can_do() const</a></h4>
|
||||
|
||||
Returns non-zero if the hardware supports the given or current OpenGL mode.
|
||||
|
||||
<h4><a name="Fl_Gl_Window.valid">char Fl_Gl_Window::valid() const<br>
|
||||
void Fl_Gl_Window::valid(char i)</a></h4>
|
||||
|
||||
<tt>Fl_Gl_Window::valid()</tt> is turned off when FLTK creates a
|
||||
new context for this window or when the window resizes, and is turned
|
||||
on <i>after</i> <tt>draw()</tt> is called. You can use this inside your <tt>draw()</tt>
|
||||
method to avoid unneccessarily initializing the OpenGL context. Just
|
||||
do this:
|
||||
|
||||
<ul><pre>
|
||||
+----<A href=Fl_Pack.html#Fl_Pack>Fl_Pack</A>, <A href=Fl_Scroll.html#Fl_Scroll>Fl_Scroll</A>, <A href=Fl_Tabs.html#Fl_Tabs>Fl_Tabs</A>, <A href=Fl_Tile.html#Fl_Tile>Fl_Tile</A>, <A href=Fl_Window.html#Fl_Window>Fl_Window</A>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Gl_Window.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Gl_Window</TT> widget sets things up so OpenGL works, and
|
||||
also keeps an OpenGL "context" for that window, so that changes to the
|
||||
lighting and projection may be reused between redraws. Fl_Gl_Window
|
||||
also flushes the OpenGL streams and swaps buffers after <TT>draw()</TT>
|
||||
returns.
|
||||
<P>OpenGL hardware typically provides some overlay bit planes, which
|
||||
are very useful for drawing UI controls atop your 3D graphics. If the
|
||||
overlay hardware is not provided, FLTK tries to simulate the overlay,
|
||||
This works pretty well if your graphics are double buffered, but not
|
||||
very well for single-buffered. </P>
|
||||
<H3>Methods</H3>
|
||||
<CENTER>
|
||||
<TABLE width=90%>
|
||||
<TR><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Gl_Window.Fl_Gl_Window>Fl_Gl_Window</A></LI>
|
||||
<LI><A href=#Fl_Gl_Window.~Fl_Gl_Window>~Fl_Gl_Window</A></LI>
|
||||
<LI><A href=#Fl_Gl_Window.can_do>can_do</A></LI>
|
||||
<LI><A href=#Fl_Gl_Window.can_do_overlay>can_do_overlay</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Gl_Window.draw>draw</A></LI>
|
||||
<LI><A href=#Fl_Gl_Window.draw_overlay>draw_overlay</A></LI>
|
||||
<LI><A href=#Fl_Gl_Window.handle>handle</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Gl_Window.hide>hide</A></LI>
|
||||
<LI><A href=#Fl_Gl_Window.invalidate>invalidate</A></LI>
|
||||
<LI><A href=#Fl_Gl_Window.make_current>make_current</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Gl_Window.make_overlay_current>make_overlay_current</A></LI>
|
||||
<LI><A href=#Fl_Gl_Window.mode>mode</A></LI>
|
||||
<LI><A href=#Fl_Gl_Window.ortho>ortho</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Gl_Window.redraw_overlay>redraw_overlay</A></LI>
|
||||
<LI><A href=#Fl_Gl_Window.swap_buffers>swap_buffers</A></LI>
|
||||
<LI><A href=#Fl_Gl_Window.valid>valid</A></LI>
|
||||
</UL>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
<H4><A name=Fl_Gl_Window.Fl_Gl_Window>Fl_Gl_Window::Fl_Gl_Window(int x,
|
||||
int y, int w, int h, const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Gl_Window</TT> widget using the given position,
|
||||
size, and label string. The default boxtype is <TT>FL_NO_BOX</TT>. The
|
||||
default mode is <TT>FL_RGB|FL_DOUBLE|FL_DEPTH</TT>.
|
||||
<H4><A name=Fl_Gl_Window.~Fl_Gl_Window>virtual
|
||||
Fl_Gl_Window::~Fl_Gl_Window()</A></H4>
|
||||
The destructor removes the widget and destroys the OpenGL context
|
||||
associated with it.
|
||||
<H4><A name=Fl_Gl_Window.draw>virtual void Fl_Gl_Window::draw(void)</A></H4>
|
||||
<TT>Fl_Gl_Window::draw()</TT> is a pure virtual method. You must
|
||||
subclass <TT>Fl_Gl_Window</TT> and provide an implementation for <TT>
|
||||
draw()</TT>. You may also provide an implementation of draw_overlay()
|
||||
if you want to draw into the overlay planes. You can avoid
|
||||
reinitializing the viewport and lights and other things by checking <TT>
|
||||
valid()</TT> at the start of <TT>draw()</TT> and only doing the
|
||||
initialization if it is false.
|
||||
<P>The <TT>draw()</TT> method can <I>only</I> use OpenGL calls. Do not
|
||||
attempt to call X, any of the functions in <FL/fl_draw.H>, or <TT>glX</TT>
|
||||
directly. Do not call <TT>gl_start()</TT> or <TT>gl_finish()</TT>. </P>
|
||||
<P>If double-buffering is enabled in the window, the back and front
|
||||
buffers are swapped after this function is completed. </P>
|
||||
<H4><A name=Fl_Gl_Window.mode>const int Fl_Gl_Window::mode() const
|
||||
<BR> int Fl_Gl_Window::mode(int m)</A></H4>
|
||||
Set or change the OpenGL capabilites of the window. The value can be
|
||||
any of the following OR'd together:
|
||||
<UL>
|
||||
<LI><TT>FL_RGB</TT> - RGB color (not indexed) </LI>
|
||||
<LI><TT>FL_RGB8</TT> - RGB color with at least 8 bits of each color </LI>
|
||||
<LI><TT>FL_INDEX</TT> - Indexed mode </LI>
|
||||
<LI><TT>FL_SINGLE</TT> - not double buffered </LI>
|
||||
<LI><TT>FL_DOUBLE</TT> - double buffered </LI>
|
||||
<LI><TT>FL_ACCUM</TT> - accumulation buffer </LI>
|
||||
<LI><TT>FL_ALPHA</TT> - alpha channel in color </LI>
|
||||
<LI><TT>FL_DEPTH</TT> - depth buffer </LI>
|
||||
<LI><TT>FL_STENCIL</TT> - stencil buffer </LI>
|
||||
<LI><TT>FL_MULTISAMPLE</TT> - multisample antialiasing </LI>
|
||||
</UL>
|
||||
<TT>FL_RGB</TT> and <TT>FL_SINGLE</TT> have a value of zero, so they
|
||||
are "on" unless you give <TT>FL_INDEX</TT> or <TT>FL_DOUBLE</TT>.
|
||||
<P>If the desired combination cannot be done, FLTK will try turning off <TT>
|
||||
FL_MULTISAMPLE</TT>. If this also fails the <TT>show()</TT> will call <TT>
|
||||
Fl::error()</TT> and not show the window. </P>
|
||||
<P>You can change the mode while the window is displayed. This is most
|
||||
useful for turning double-buffering on and off. Under X this will
|
||||
cause the old X window to be destroyed and a new one to be created. If
|
||||
this is a top-level window this will unfortunately also cause the
|
||||
window to blink, raise to the top, and be de-iconized, and the <TT>xid()</TT>
|
||||
will change, possibly breaking other code. It is best to make the GL
|
||||
window a child of another window if you wish to do this! </P>
|
||||
<H4><A name=Fl_Gl_Window.can_do>static int Fl_Gl_Window::can_do(int)
|
||||
<BR> int Fl_Gl_Window::can_do() const</A></H4>
|
||||
Returns non-zero if the hardware supports the given or current OpenGL
|
||||
mode.
|
||||
<H4><A name=Fl_Gl_Window.valid>char Fl_Gl_Window::valid() const
|
||||
<BR> void Fl_Gl_Window::valid(char i)</A></H4>
|
||||
<TT>Fl_Gl_Window::valid()</TT> is turned off when FLTK creates a new
|
||||
context for this window or when the window resizes, and is turned on <I>
|
||||
after</I><TT>draw()</TT> is called. You can use this inside your <TT>
|
||||
draw()</TT> method to avoid unneccessarily initializing the OpenGL
|
||||
context. Just do this:
|
||||
<UL>
|
||||
<PRE>
|
||||
void mywindow::draw() {
|
||||
if (!valid()) {
|
||||
glViewport(0,0,w(),h());
|
||||
@@ -171,16 +139,17 @@ void mywindow::draw() {
|
||||
... draw your geometry here ...
|
||||
}
|
||||
|
||||
<br>void Fl_Gl_Window::invalidate();
|
||||
<br>void Fl_Gl_Window::valid(char i);</a></h4>
|
||||
<BR>void Fl_Gl_Window::invalidate();
|
||||
<BR>void Fl_Gl_Window::valid(char i);
|
||||
|
||||
<tt>Fl_Gl_Window::valid()</tt> is turned off when FLTK creates a
|
||||
<TT>Fl_Gl_Window::valid()</TT> is turned off when FLTK creates a
|
||||
new context for this window and by the window resizing, and is turned
|
||||
on <i>after</i> draw() is called. You can use this inside your draw()
|
||||
on <I>after</I> draw() is called. You can use this inside your draw()
|
||||
method to avoid unneccessarily initializing the OpenGL context. Just
|
||||
do this:
|
||||
|
||||
<pre><tt>void mywindow::draw() {
|
||||
</PRE>
|
||||
<PRE><TT>void mywindow::draw() {
|
||||
if (!valid()) {
|
||||
glViewport(0,0,w(),h());
|
||||
glFrustum(...);
|
||||
@@ -189,77 +158,61 @@ do this:
|
||||
}
|
||||
... draw your geometry here ...
|
||||
}
|
||||
</pre></ul>
|
||||
|
||||
You can turn <tt>valid()</tt> on by calling <tt>valid(1)</tt>. You
|
||||
should only do this after fixing the transformation inside a
|
||||
<tt>draw()</tt> or after <tt>make_current()</tt>. This is done
|
||||
automatically after <tt>draw()</tt> returns.
|
||||
|
||||
<h4><a name="Fl_Gl_Window.invalidate">void Fl_Gl_Window::invalidate()</a></h4>
|
||||
|
||||
The <tt>invalidate()</tt> method turns off <tt>valid()</tt> and is
|
||||
equivalent to calling <tt>value(0)</tt>.
|
||||
|
||||
<h4><a name="Fl_Gl_Window.ortho">void Fl_Gl_Window::ortho()</a></h4>
|
||||
|
||||
Set the projection so 0,0 is in the lower left of the window and each
|
||||
pixel is 1 unit wide/tall. If you are drawing 2D images, your
|
||||
<tt>draw()</tt> method may want to call this if <tt>valid()</tt> is
|
||||
false.
|
||||
|
||||
<h4><a name="Fl_Gl_Window.make_current">void Fl_Gl_Window::make_current()</a></h4>
|
||||
|
||||
The <tt>make_current()</tt> method selects the OpenGL context for the
|
||||
widget. It is called automatically prior to the <tt>draw()</tt> method
|
||||
being called and can also be used to implement feedback and/or selection
|
||||
within the <tt>handle()</tt> method.
|
||||
|
||||
<h4><a name="Fl_Gl_Window.make_overlay_current">void Fl_Gl_Window::make_overlay_current()</a></h4>
|
||||
|
||||
The <tt>make_overlay_current()</tt> method selects the OpenGL context
|
||||
for the widget's overlay. It is called automatically prior to the
|
||||
<tt>draw_overlay()</tt> method being called and can also be used to
|
||||
implement feedback and/or selection within the <tt>handle()</tt>
|
||||
method.
|
||||
|
||||
<h4><a name="Fl_Gl_Window.swap_buffers">void Fl_Gl_Window::swap_buffers()</a></h4>
|
||||
|
||||
The <tt>swap_buffers()</tt> method swaps the back and front buffers.
|
||||
It is called automatically after the <tt>draw()</tt> method is called.
|
||||
|
||||
<h4><a name="Fl_Gl_Window.hide">void Fl_Gl_Window::hide()</a></h4>
|
||||
|
||||
Hides the window and destroys the OpenGL context.
|
||||
|
||||
<h4><a name="Fl_Gl_Window.can_do_overlay">int Fl_Gl_Window::can_do_overlay()</a></h4>
|
||||
|
||||
Returns true if the hardware overlay is possible. If this is false,
|
||||
FLTK will try to simulate the overlay, with significant loss of update
|
||||
speed. Calling this will cause FLTK to open the display.
|
||||
|
||||
<h4><a name="Fl_Gl_Window.redraw_overlay">void Fl_Gl_Window::redraw_overlay()</a></h4>
|
||||
|
||||
This method causes <tt>draw_overlay</tt> to be called at a later time.
|
||||
Initially the overlay is clear, if you want the window to display
|
||||
something in the overlay when it first appears, you must call this
|
||||
immediately after you <tt>show()</tt> your window.
|
||||
|
||||
<h4><a name="Fl_Gl_Window.draw_overlay">virtual void Fl_Gl_Window::draw_overlay()</a></h4>
|
||||
|
||||
You must implement this virtual function if you want to draw into the
|
||||
overlay. The overlay is cleared before this is called. You should
|
||||
draw anything that is not clear using OpenGL. You must use
|
||||
<tt>gl_color(i)</tt> to choose colors (it allocates them from the colormap
|
||||
using system-specific calls), and remember that you are in an indexed
|
||||
OpenGL mode and drawing anything other than flat-shaded will probably
|
||||
not work.
|
||||
|
||||
<p>Both this function and <tt>Fl_Gl_Window::draw()</tt> should check
|
||||
<tt>Fl_Gl_Window::valid()</tt> and set the same transformation. If you
|
||||
don't your code may not work on other systems. Depending on the OS,
|
||||
and on whether overlays are real or simulated, the OpenGL context may
|
||||
be the same or different between the overlay and main window.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</TT></PRE>
|
||||
</UL>
|
||||
You can turn <TT>valid()</TT> on by calling <TT>valid(1)</TT>. You
|
||||
should only do this after fixing the transformation inside a <TT>draw()</TT>
|
||||
or after <TT>make_current()</TT>. This is done automatically after <TT>
|
||||
draw()</TT> returns.
|
||||
<H4><A name=Fl_Gl_Window.invalidate>void Fl_Gl_Window::invalidate()</A></H4>
|
||||
The <TT>invalidate()</TT> method turns off <TT>valid()</TT> and is
|
||||
equivalent to calling <TT>value(0)</TT>.
|
||||
<H4><A name=Fl_Gl_Window.ortho>void Fl_Gl_Window::ortho()</A></H4>
|
||||
Set the projection so 0,0 is in the lower left of the window and each
|
||||
pixel is 1 unit wide/tall. If you are drawing 2D images, your <TT>
|
||||
draw()</TT> method may want to call this if <TT>valid()</TT> is false.
|
||||
<H4><A name=Fl_Gl_Window.make_current>void Fl_Gl_Window::make_current()</A>
|
||||
</H4>
|
||||
The <TT>make_current()</TT> method selects the OpenGL context for the
|
||||
widget. It is called automatically prior to the <TT>draw()</TT> method
|
||||
being called and can also be used to implement feedback and/or
|
||||
selection within the <TT>handle()</TT> method.
|
||||
<H4><A name=Fl_Gl_Window.make_overlay_current>void
|
||||
Fl_Gl_Window::make_overlay_current()</A></H4>
|
||||
The <TT>make_overlay_current()</TT> method selects the OpenGL context
|
||||
for the widget's overlay. It is called automatically prior to the <TT>
|
||||
draw_overlay()</TT> method being called and can also be used to
|
||||
implement feedback and/or selection within the <TT>handle()</TT>
|
||||
method.
|
||||
<H4><A name=Fl_Gl_Window.swap_buffers>void Fl_Gl_Window::swap_buffers()</A>
|
||||
</H4>
|
||||
The <TT>swap_buffers()</TT> method swaps the back and front buffers.
|
||||
It is called automatically after the <TT>draw()</TT> method is called.
|
||||
<H4><A name=Fl_Gl_Window.hide>void Fl_Gl_Window::hide()</A></H4>
|
||||
Hides the window and destroys the OpenGL context.
|
||||
<H4><A name=Fl_Gl_Window.can_do_overlay>int
|
||||
Fl_Gl_Window::can_do_overlay()</A></H4>
|
||||
Returns true if the hardware overlay is possible. If this is false,
|
||||
FLTK will try to simulate the overlay, with significant loss of update
|
||||
speed. Calling this will cause FLTK to open the display.
|
||||
<H4><A name=Fl_Gl_Window.redraw_overlay>void
|
||||
Fl_Gl_Window::redraw_overlay()</A></H4>
|
||||
This method causes <TT>draw_overlay</TT> to be called at a later time.
|
||||
Initially the overlay is clear, if you want the window to display
|
||||
something in the overlay when it first appears, you must call this
|
||||
immediately after you <TT>show()</TT> your window.
|
||||
<H4><A name=Fl_Gl_Window.draw_overlay>virtual void
|
||||
Fl_Gl_Window::draw_overlay()</A></H4>
|
||||
You must implement this virtual function if you want to draw into the
|
||||
overlay. The overlay is cleared before this is called. You should
|
||||
draw anything that is not clear using OpenGL. You must use <TT>
|
||||
gl_color(i)</TT> to choose colors (it allocates them from the colormap
|
||||
using system-specific calls), and remember that you are in an indexed
|
||||
OpenGL mode and drawing anything other than flat-shaded will probably
|
||||
not work.
|
||||
<P>Both this function and <TT>Fl_Gl_Window::draw()</TT> should check <TT>
|
||||
Fl_Gl_Window::valid()</TT> and set the same transformation. If you
|
||||
don't your code may not work on other systems. Depending on the OS,
|
||||
and on whether overlays are real or simulated, the OpenGL context may
|
||||
be the same or different between the overlay and main window. </P>
|
||||
</BODY></HTML>
|
||||
+134
-176
@@ -1,178 +1,136 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Group">class Fl_Group</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Widget">Fl_Widget</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Group>class Fl_Group</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Widget.html#Fl_Widget>Fl_Widget</A>
|
||||
|
|
||||
+----<b>Fl_Group</b>
|
||||
+----<B>Fl_Group</B>
|
||||
|
|
||||
+----<a href="#Fl_Pack">Fl_Pack</a>, <a href="#Fl_Scroll">Fl_Scroll</a>, <a href="#Fl_Tabs">Fl_Tabs</a>, <a href="#Fl_Tile">Fl_Tile</a>, <a href="#Fl_Window">Fl_Window</a>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Group.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Group</tt> class is the FLTK container widget. It maintains
|
||||
an array of child widgets. These children can themselves be any widget
|
||||
including <tt>Fl_Group</tt>. The most important subclass of <tt>Fl_Group</tt>
|
||||
is <a href="#Fl_Window"><tt>Fl_Window</tt></a>, however groups can also
|
||||
be used to control radio buttons or to enforce resize behavior.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<center>
|
||||
<table width=90%>
|
||||
<tr>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Group.Fl_Group">Fl_Group</a>
|
||||
<li><a href="#Fl_Group.~Fl_Group">~Fl_Group</a>
|
||||
<li><a href="#Fl_Group.add">add</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Group.add_resizable">add_resizable</a>
|
||||
<li><a href="#Fl_Group.array">array</a>
|
||||
<li><a href="#Fl_Group.begin">begin</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Group.child">child</a>
|
||||
<li><a href="#Fl_Group.children">children</a>
|
||||
<li><a href="#Fl_Group.current">current</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Group.end">end</a>
|
||||
<li><a href="#Fl_Group.find">find</a>
|
||||
<li><a href="#Fl_Group.insert">insert</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Group.remove">remove</a>
|
||||
<li><a href="#Fl_Group.resizeable">resizable</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<h4><a name="Fl_Group.Fl_Group">Fl_Group::Fl_Group(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Group</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_NO_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Group.~Fl_Group">virtual Fl_Group::~Fl_Group()</a></h4>
|
||||
|
||||
The destructor <i>also deletes all the children</i>. This allows a
|
||||
whole tree to be deleted at once, without having to keep a pointer to all
|
||||
the children in the user code. A kludge has been done so the
|
||||
<tt>Fl_Group</tt> and all of it's children can be automatic (local)
|
||||
variables, but you must declare the <tt>Fl_Group</tt> <i>first</i>, so
|
||||
that it is destroyed last.
|
||||
|
||||
<h4><a name="Fl_Group.add">void Fl_Group::add(Fl_Widget &w)<BR>
|
||||
void Fl_Group::add(Fl_Widget *w)</a></h4>
|
||||
|
||||
Adds a widget to the group at the end of the child array.
|
||||
|
||||
<h4><a name="Fl_Group.add_resizable">Fl_Group &Fl_Group::add_resizable(Fl_Widget &box)</a></h4>
|
||||
|
||||
Adds a widget to the group and makes it the resizable widget.
|
||||
|
||||
<h4><a name="Fl_Group.array">const Fl_Widget **Fl_Group::array() const</a></h4>
|
||||
|
||||
Returns a pointer to the array of children. <i>This pointer can change
|
||||
when children are added or removed!</i>
|
||||
|
||||
<h4><a name="Fl_Group.begin">void Fl_Group::begin()</a></h4>
|
||||
|
||||
<tt>begin()</tt> sets the current group so you can build the widget tree
|
||||
by just constructing the widgets. <tt>begin()</tt> is automatically called by
|
||||
the constructor for Fl_Group (and thus for Fl_Window as well).
|
||||
<tt>begin()</tt> does <tt>current(this)</tt>.
|
||||
|
||||
<p><i>Don't forget to <tt>end()</tt> the group or window!</i>
|
||||
|
||||
<h4><a name="Fl_Group.child">Fl_Widget *Fl_Group::child(int n) const</a></h4>
|
||||
|
||||
Returns child <tt>n</tt>, where <tt>0 <= n < children()</tt>.
|
||||
|
||||
<h4><a name="Fl_Group.children">int Fl_Group::children() const</a></h4>
|
||||
|
||||
Returns how many child widgets the group has.
|
||||
|
||||
<h4><a name="Fl_Group.current">static Fl_Group *Fl_Group::current()<BR>
|
||||
static void Fl_Group::current(Fl_Group *w)</a></h4>
|
||||
|
||||
<tt>current()</tt> returns the currently active group in the widget tree.
|
||||
To prevent widgets from being added to a group, call <tt>current()</tt>
|
||||
with a <tt>NULL</tt> group.
|
||||
|
||||
<h4><a name="Fl_Group.end">void Fl_Group::end()</a></h4>
|
||||
|
||||
<tt>end()</tt> does <tt>current(this->parent())</tt>. Any new widgets added
|
||||
to the widget tree will be added to the parent of the group.
|
||||
|
||||
<h4><a name="Fl_Group.find">int Fl_Group::find(const Fl_Widget *w) const<BR>
|
||||
int Fl_Group::find(const Fl_Widget &w) const</a></h4>
|
||||
|
||||
Searches the child array for the widget and returns the index. Returns
|
||||
<a href="#Fl_Group.children"><tt>children()</tt></a> if the widget is
|
||||
<tt>NULL</tt> or not found.
|
||||
|
||||
<h4><a name="Fl_Group.insert">void Fl_Group::insert(Fl_Widget &w, int n)<BR>
|
||||
void Fl_Group::insert(Fl_Widget &w, Fl_Widget *beforethis)</a></h4>
|
||||
|
||||
Inserts a widget into the child array. It is put at index <tt>n</tt> which
|
||||
must be less or equal to children(). The second version does a
|
||||
<tt>find(beforethis)</tt> and inserts using that index.
|
||||
|
||||
<h4><a name="Fl_Group.remove">void Fl_Group::remove(Fl_Widget &w)</a></h4>
|
||||
|
||||
Removes a widget from the group. This does nothing if the widget
|
||||
is not currently a child of this group.
|
||||
|
||||
<h4><a name="Fl_Group.resizeable">void Fl_Group::resizable(Fl_Widget *box)<BR>
|
||||
void Fl_Group::resizable(Fl_Widget &box)<BR>
|
||||
Fl_Widget *Fl_Group::resizable() const</a></h4>
|
||||
|
||||
The resizable widget defines the resizing box for the group. When the
|
||||
group is resized it calculates a new size and position for all of its
|
||||
children. Widgets that are horizontally or vertically inside the dimensions
|
||||
of the box are scaled to the new size. Widgets outside the box are moved.
|
||||
|
||||
<p>In these examples the gray area is the resizable:<br>
|
||||
|
||||
<p align=center><img SRC="resizebox1.gif" align=TOP height=240>
|
||||
<img SRC="resizebox2.gif" align=TOP height=240>
|
||||
|
||||
<p>The resizable may be set to the group itself (this is the default value
|
||||
for an <tt>Fl_Group</tt>, although <tt>NULL</tt> is the default for an
|
||||
<tt>Fl_Window</tt>), in which case all the contents are resized. If the
|
||||
resizable is <tt>NULL</tt> then all widgets remain a fixed size and
|
||||
distance from the top-left corner.
|
||||
|
||||
<p>It is possible to achieve any type of resize behavior by using an
|
||||
invisible <tt>Fl_Box</tt> as the resizable and/or by using a hierarchy of
|
||||
child <tt>Fl_Group</tt>'s.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<A href=Fl_Pack.html#Fl_Pack>Fl_Pack</A>, <A href=Fl_Scroll.html#Fl_Scroll>Fl_Scroll</A>, <A href=Fl_Tabs.html#Fl_Tabs>Fl_Tabs</A>, <A href=Fl_Tile.html#Fl_Tile>Fl_Tile</A>, <A href=Fl_Window.html#Fl_Window>Fl_Window</A>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Group.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Group</TT> class is the FLTK container widget. It maintains
|
||||
an array of child widgets. These children can themselves be any widget
|
||||
including <TT>Fl_Group</TT>. The most important subclass of <TT>Fl_Group</TT>
|
||||
is <A href=Fl_Window.html#Fl_Window><TT>Fl_Window</TT></A>, however
|
||||
groups can also be used to control radio buttons or to enforce resize
|
||||
behavior.
|
||||
<H3>Methods</H3>
|
||||
<CENTER>
|
||||
<TABLE width=90%>
|
||||
<TR><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Group.Fl_Group>Fl_Group</A></LI>
|
||||
<LI><A href=#Fl_Group.~Fl_Group>~Fl_Group</A></LI>
|
||||
<LI><A href=#Fl_Group.add>add</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Group.add_resizable>add_resizable</A></LI>
|
||||
<LI><A href=#Fl_Group.array>array</A></LI>
|
||||
<LI><A href=#Fl_Group.begin>begin</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Group.child>child</A></LI>
|
||||
<LI><A href=#Fl_Group.children>children</A></LI>
|
||||
<LI><A href=#Fl_Group.current>current</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Group.end>end</A></LI>
|
||||
<LI><A href=#Fl_Group.find>find</A></LI>
|
||||
<LI><A href=#Fl_Group.insert>insert</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Group.remove>remove</A></LI>
|
||||
<LI><A href=#Fl_Group.resizeable>resizable</A></LI>
|
||||
</UL>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
<H4><A name=Fl_Group.Fl_Group>Fl_Group::Fl_Group(int x, int y, int w,
|
||||
int h, const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Group</TT> widget using the given position, size,
|
||||
and label string. The default boxtype is <TT>FL_NO_BOX</TT>.
|
||||
<H4><A name=Fl_Group.~Fl_Group>virtual Fl_Group::~Fl_Group()</A></H4>
|
||||
The destructor <I>also deletes all the children</I>. This allows a
|
||||
whole tree to be deleted at once, without having to keep a pointer to
|
||||
all the children in the user code. A kludge has been done so the <TT>
|
||||
Fl_Group</TT> and all of it's children can be automatic (local)
|
||||
variables, but you must declare the <TT>Fl_Group</TT><I>first</I>, so
|
||||
that it is destroyed last.
|
||||
<H4><A name=Fl_Group.add>void Fl_Group::add(Fl_Widget &w)
|
||||
<BR> void Fl_Group::add(Fl_Widget *w)</A></H4>
|
||||
Adds a widget to the group at the end of the child array.
|
||||
<H4><A name=Fl_Group.add_resizable>Fl_Group
|
||||
&Fl_Group::add_resizable(Fl_Widget &box)</A></H4>
|
||||
Adds a widget to the group and makes it the resizable widget.
|
||||
<H4><A name=Fl_Group.array>const Fl_Widget **Fl_Group::array() const</A></H4>
|
||||
Returns a pointer to the array of children. <I>This pointer can change
|
||||
when children are added or removed!</I>
|
||||
<H4><A name=Fl_Group.begin>void Fl_Group::begin()</A></H4>
|
||||
<TT>begin()</TT> sets the current group so you can build the widget
|
||||
tree by just constructing the widgets. <TT>begin()</TT> is
|
||||
automatically called by the constructor for Fl_Group (and thus for
|
||||
Fl_Window as well). <TT>begin()</TT> does <TT>current(this)</TT>.
|
||||
<P><I>Don't forget to <TT>end()</TT> the group or window!</I></P>
|
||||
<H4><A name=Fl_Group.child>Fl_Widget *Fl_Group::child(int n) const</A></H4>
|
||||
Returns child <TT>n</TT>, where <TT>0
|
||||
<!--= n < children()</tt-->
|
||||
.
|
||||
<H4><A name=Fl_Group.children>int Fl_Group::children() const</A></H4>
|
||||
Returns how many child widgets the group has.
|
||||
<H4><A name=Fl_Group.current>static Fl_Group *Fl_Group::current()
|
||||
<BR> static void Fl_Group::current(Fl_Group *w)</A></H4>
|
||||
<TT>current()</TT> returns the currently active group in the widget
|
||||
tree. To prevent widgets from being added to a group, call <TT>current()</TT>
|
||||
with a <TT>NULL</TT> group.
|
||||
<H4><A name=Fl_Group.end>void Fl_Group::end()</A></H4>
|
||||
<TT>end()</TT> does <TT>current(this->parent())</TT>. Any new widgets
|
||||
added to the widget tree will be added to the parent of the group.
|
||||
<H4><A name=Fl_Group.find>int Fl_Group::find(const Fl_Widget *w) const
|
||||
<BR> int Fl_Group::find(const Fl_Widget &w) const</A></H4>
|
||||
Searches the child array for the widget and returns the index. Returns <A
|
||||
href=#Fl_Group.children><TT>children()</TT></A> if the widget is <TT>
|
||||
NULL</TT> or not found.
|
||||
<H4><A name=Fl_Group.insert>void Fl_Group::insert(Fl_Widget &w, int n)
|
||||
<BR> void Fl_Group::insert(Fl_Widget &w, Fl_Widget *beforethis)</A></H4>
|
||||
Inserts a widget into the child array. It is put at index <TT>n</TT>
|
||||
which must be less or equal to children(). The second version does a <TT>
|
||||
find(beforethis)</TT> and inserts using that index.
|
||||
<H4><A name=Fl_Group.remove>void Fl_Group::remove(Fl_Widget &w)</A></H4>
|
||||
Removes a widget from the group. This does nothing if the widget is
|
||||
not currently a child of this group.
|
||||
<H4><A name=Fl_Group.resizeable>void Fl_Group::resizable(Fl_Widget *box)
|
||||
<BR> void Fl_Group::resizable(Fl_Widget &box)
|
||||
<BR> Fl_Widget *Fl_Group::resizable() const</A></H4>
|
||||
The resizable widget defines the resizing box for the group. When the
|
||||
group is resized it calculates a new size and position for all of its
|
||||
children. Widgets that are horizontally or vertically inside the
|
||||
dimensions of the box are scaled to the new size. Widgets outside the
|
||||
box are moved.
|
||||
<P>In these examples the gray area is the resizable:
|
||||
<BR></P>
|
||||
<P align=center><IMG align=TOP height=240 SRC=./resizebox1.gif> <IMG align=TOP
|
||||
height=240 SRC=./resizebox2.gif></P>
|
||||
<P>The resizable may be set to the group itself (this is the default
|
||||
value for an <TT>Fl_Group</TT>, although <TT>NULL</TT> is the default
|
||||
for an <TT>Fl_Window</TT>), in which case all the contents are resized.
|
||||
If the resizable is <TT>NULL</TT> then all widgets remain a fixed size
|
||||
and distance from the top-left corner. </P>
|
||||
<P>It is possible to achieve any type of resize behavior by using an
|
||||
invisible <TT>Fl_Box</TT> as the resizable and/or by using a hierarchy
|
||||
of child <TT>Fl_Group</TT>'s. </P>
|
||||
</TT></BODY></HTML>
|
||||
@@ -1,74 +1,55 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Hold_Browser">class Fl_Hold_Browser</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Browser">Fl_Browser</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Hold_Browser>class Fl_Hold_Browser</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Browser.html#Fl_Browser>Fl_Browser</A>
|
||||
|
|
||||
+----<b>Fl_Hold_Browser</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Hold_Browser.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Hold_Browser</tt> class is a subclass of <tt>Fl_Browser</tt>
|
||||
which lets the user select a single item, or no items by clicking on
|
||||
the empty space. As long as the mouse button is held down the item
|
||||
pointed to by it is highlighted, and this highlighting remains on when
|
||||
the mouse button is released. Normally the callback is done when the
|
||||
user releases the mouse, but you can change this with <tt>when()</tt>.
|
||||
|
||||
<p>See <a href="#Fl_Browser"><tt>Fl_Browser</tt></a> for methods to add
|
||||
and remove lines from the browser.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Hold_Browser.Fl_Hold_Browser">Fl_Hold_Browser</a>
|
||||
<li><a href="#Fl_Hold_Browser.~Fl_Hold_Browser">~Fl_Hold_Browser</a>
|
||||
<li><a href="#Fl_Hold_Browser.deselect">deselect</a>
|
||||
<li><a href="#Fl_Hold_Browser.select">select</a>
|
||||
<li><a href="#Fl_Hold_Browser.value">value</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Hold_Browser.Fl_Hold_Browser">Fl_Hold_Browser::Fl_Hold_Browser(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Hold_Browser</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_DOWN_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Hold_Browser.~Fl_Hold_Browser">virtual Fl_Hold_Browser::~Fl_Hold_Browser()</a></h4>
|
||||
|
||||
The destructor <i>also deletes all the items in the list</i>.
|
||||
|
||||
<h4><a name="Fl_Hold_Browser.deselect">int Fl_Browser::deselect()</a></h4>
|
||||
|
||||
Same as <tt>value(0)</tt>.
|
||||
|
||||
<h4><a name="Fl_Hold_Browser.select">int Fl_Browser::select(int,int=1)<br>
|
||||
int Fl_Browser::selected(int) const</a></h4>
|
||||
|
||||
You can use these for compatibility with
|
||||
<a href="#Fl_Multi_Browser"><tt>Fl_Multi_Browser</tt></a>. If you
|
||||
turn on the selection of more than one line the results are
|
||||
unpredictable.
|
||||
|
||||
<h4><a name="Fl_Hold_Browser.value">int Fl_Browser::value() const<br>
|
||||
void Fl_Browser::value(int)</a></h4>
|
||||
|
||||
Set or get which line is selected. This returns zero if no line is
|
||||
selected, so be aware that this can happen in a callback.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Hold_Browser</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Hold_Browser.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Hold_Browser</TT> class is a subclass of <TT>Fl_Browser</TT>
|
||||
which lets the user select a single item, or no items by clicking on
|
||||
the empty space. As long as the mouse button is held down the item
|
||||
pointed to by it is highlighted, and this highlighting remains on when
|
||||
the mouse button is released. Normally the callback is done when the
|
||||
user releases the mouse, but you can change this with <TT>when()</TT>.
|
||||
<P>See <A href=Fl_Browser.html#Fl_Browser><TT>Fl_Browser</TT></A> for
|
||||
methods to add and remove lines from the browser. </P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Hold_Browser.Fl_Hold_Browser>Fl_Hold_Browser</A></LI>
|
||||
<LI><A href=#Fl_Hold_Browser.~Fl_Hold_Browser>~Fl_Hold_Browser</A></LI>
|
||||
<LI><A href=#Fl_Hold_Browser.deselect>deselect</A></LI>
|
||||
<LI><A href=#Fl_Hold_Browser.select>select</A></LI>
|
||||
<LI><A href=#Fl_Hold_Browser.value>value</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Hold_Browser.Fl_Hold_Browser>
|
||||
Fl_Hold_Browser::Fl_Hold_Browser(int x, int y, int w, int h, const char
|
||||
*label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Hold_Browser</TT> widget using the given
|
||||
position, size, and label string. The default boxtype is <TT>FL_DOWN_BOX</TT>
|
||||
.
|
||||
<H4><A name=Fl_Hold_Browser.~Fl_Hold_Browser>virtual
|
||||
Fl_Hold_Browser::~Fl_Hold_Browser()</A></H4>
|
||||
The destructor <I>also deletes all the items in the list</I>.
|
||||
<H4><A name=Fl_Hold_Browser.deselect>int Fl_Browser::deselect()</A></H4>
|
||||
Same as <TT>value(0)</TT>.
|
||||
<H4><A name=Fl_Hold_Browser.select>int Fl_Browser::select(int,int=1)
|
||||
<BR> int Fl_Browser::selected(int) const</A></H4>
|
||||
You can use these for compatibility with <A href=Fl_Multi_Browser.html#Fl_Multi_Browser>
|
||||
<TT>Fl_Multi_Browser</TT></A>. If you turn on the selection of more
|
||||
than one line the results are unpredictable.
|
||||
<H4><A name=Fl_Hold_Browser.value>int Fl_Browser::value() const
|
||||
<BR> void Fl_Browser::value(int)</A></H4>
|
||||
Set or get which line is selected. This returns zero if no line is
|
||||
selected, so be aware that this can happen in a callback. </BODY></HTML>
|
||||
+177
-254
@@ -1,256 +1,179 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Input">class Fl_Input</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Input_">Fl_Input_</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Input>class Fl_Input</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Input_.html#Fl_Input_>Fl_Input_</A>
|
||||
|
|
||||
+----<b>Fl_Input</b>
|
||||
+----<B>Fl_Input</B>
|
||||
|
|
||||
+----<a href="#Fl_Float_Input">Fl_Float_Input</a>, <a href="#Fl_Int_Input">Fl_Int_Input</a>,
|
||||
<a href="#Fl_Multiline_Input">Fl_Multiline_Input</a>, <a href="#Fl_Secret_Input">Fl_Secret_Input</a>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Input.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
This is the FLTK text input widget. It displays a single line of text
|
||||
and lets the user edit it. Normally it is drawn with an inset box and
|
||||
a white background. The text may contain any characters (even 0), and
|
||||
will correctly display anything, using ^X notation for unprintable
|
||||
control characters and \nnn notation for unprintable characters with
|
||||
the high bit set. It assummes the font can draw any characters in the
|
||||
ISO8859-1 character set.
|
||||
|
||||
<table border=1>
|
||||
|
||||
<tr><td><b>Mouse button 1</b></td>
|
||||
<td>Moves the cursor to this point. Drag selects characters. Double
|
||||
click selects words. Triple click selects all text. Shift+click
|
||||
extends the selection.</td>
|
||||
|
||||
<tr><td><b>Mouse button 2</b></td>
|
||||
<td>Insert the current X selection at the cursor (unlike Motif this
|
||||
does not move the insertion point to the mouse). If the widget does
|
||||
not have the input focus (and thus no cursor) it puts the cursor where
|
||||
clicked and inserts the selection there.</td>
|
||||
|
||||
<tr><td><b>Mouse button 3</b></td>
|
||||
<td>Currently acts like button 1.</td>
|
||||
|
||||
<tr><td><b>Backspace</b></td>
|
||||
<td>Deletes one character to the left, or deletes the
|
||||
selected region.</td>
|
||||
|
||||
<tr><td><b>Enter</b></td>
|
||||
<td>May cause the callback, see when().</td>
|
||||
|
||||
<tr><td><b>^A or Home</b></td>
|
||||
<td>Go to start of line.</td>
|
||||
|
||||
<tr><td><b>^B or Left</b></td>
|
||||
<td>Move left</td>
|
||||
|
||||
<tr><td><b>^C</b></td>
|
||||
<td>Copy the selection to the clipboard</td>
|
||||
|
||||
<tr><td><b>^D or Delete</b></td>
|
||||
<td>Deletes one character to the right or deletes the selected region.
|
||||
<i>Due to silly historical X problems, the Delete key will act like
|
||||
Backspace until you type a "real" backspace.</i></td>
|
||||
|
||||
<tr><td><b>^E or End</b></td>
|
||||
<td>Go to the end of line.</td>
|
||||
|
||||
<tr><td><b>^F or Right</b></td>
|
||||
<td>Move right</td>
|
||||
|
||||
<tr><td><b>^K</b></td>
|
||||
<td>Delete to the end of line (next \n character) or deletes
|
||||
a single \n character. These deletions are all concatenated into the
|
||||
clipboard.</td>
|
||||
|
||||
<tr><td><b>^N or Down</b></td>
|
||||
<td>Move down (for Fl_Multiline_Input only, otherwise it moves to the
|
||||
next input field).</td>
|
||||
|
||||
<tr><td><b>^P or Up</b></td>
|
||||
<td>Move up (for Fl_Multiline_Input only, otherwise it moves to the
|
||||
previous input field).</td>
|
||||
|
||||
<tr><td><b>^Q or<br>RightCtrl or<br>Compose</b></td>
|
||||
<td>Start a <a href=compose.html>compose-character</a> sequence. The
|
||||
next one or two keys typed define the character to insert. This also
|
||||
can be used to "quote" control characters.</td>
|
||||
|
||||
<tr><td><b>^U</b></td>
|
||||
<td>Delete everything.</td>
|
||||
|
||||
<tr><td><b>^V or ^Y</b></td>
|
||||
<td>Paste the clipboard</td>
|
||||
|
||||
<tr><td><b>^X or ^W</b></td>
|
||||
<td>Copy the region to the clipboard and delete it.</td>
|
||||
|
||||
<tr><td><b>^Z or ^_</b></td>
|
||||
<td>Undo. This is a single-level undo mechanism, but all adjacent
|
||||
deletions and insertions are concatenated into a single "undo". Often
|
||||
this will undo a lot more than you expected.</td>
|
||||
|
||||
<tr><td><b>Shift+move</b></td>
|
||||
<td>Move the cursor but also extend the selection.</td>
|
||||
|
||||
</table>
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<center>
|
||||
<table width=90%>
|
||||
<tr>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Input.Fl_Input">Fl_Input</a>
|
||||
<li><a href="#Fl_Input.~Fl_Input">~Fl_Input</a>
|
||||
<li><a href="#Fl_Input.cursor_color">cursor_color</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Input.index">index</a>
|
||||
<li><a href="#Fl_Input.size">size</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Input.static_value">static_value</a>
|
||||
<li><a href="#Fl_Input.textcolor">textcolor</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Input.textfont">textfont</a>
|
||||
<li><a href="#Fl_Input.textsize">textsize</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Input.value">value</a>
|
||||
<li><a href="#Fl_Input.when">when</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<h4><a name="Fl_Input.Fl_Input">Fl_Input::Fl_Input(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Input</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_DOWN_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Input.~Fl_Input">virtual Fl_Input::~Fl_Input()</a></h4>
|
||||
|
||||
Destroys the widget and any value associated with it.
|
||||
|
||||
<h4><a name="Fl_Input.value">const char *Fl_Input::value() const<br>
|
||||
int Fl_Input::value(const char*)<br>
|
||||
int Fl_Input::value(const char*, int)</a></h4>
|
||||
|
||||
The first form returns the current value, which is a pointer to the
|
||||
internal buffer and is valid only until the next event is
|
||||
handled.
|
||||
|
||||
<p>The second two forms change the text and set the mark and the point
|
||||
to the end of it. The string is copied to the internal buffer. Passing
|
||||
<tt>NULL</tt> is the same as "". This returns non-zero if the new
|
||||
value is different than the current one. You can use the second
|
||||
version to directly set the length if you know it already or want to
|
||||
put nul's in the text.
|
||||
|
||||
<h4><a name="Fl_Input.static_value">int Fl_Input::static_value(const char*)<br>
|
||||
int Fl_Input::static_value(const char*, int)</a></h4>
|
||||
|
||||
Change the text and set the mark and the point to the end of it. The
|
||||
string is <i>not</i> copied. If the user edits the string it is copied
|
||||
to the internal buffer then. This can save a great deal of time and
|
||||
memory if your program is rapidly changing the values of text fields,
|
||||
but this will only work if the passed string remains unchanged until
|
||||
either the <tt>Fl_Input</tt> is destroyed or <tt>value()</tt> is called
|
||||
again.
|
||||
|
||||
<h4><a name="Fl_Input.size">int Fl_Input::size() const</a></h4>
|
||||
|
||||
Returns the number of characters in <tt>value()</tt>. This may be greater than
|
||||
<tt>strlen(value())</tt> if there are nul characters in it.
|
||||
|
||||
<h4><a name="Fl_Input.index">char Fl_Input::index(int) const</a></h4>
|
||||
|
||||
Same as <tt>value()[n]</tt>, but may be faster in plausible implementations.
|
||||
No bounds checking is done.
|
||||
|
||||
<h4><a name="Fl_Input.when">Fl_When Fl_Widget::when() const<br>
|
||||
void Fl_Widget::when(Fl_When)</a></h4>
|
||||
|
||||
Controls when callbacks are done. The following values are useful,
|
||||
the default value is <tt>FL_WHEN_RELEASE</tt>:
|
||||
|
||||
<ul>
|
||||
<li><tt>0</tt>: The callback is not done, but <tt>changed()</tt> is
|
||||
turned on.
|
||||
|
||||
<li><tt>FL_WHEN_CHANGED</tt>: The callback is done each time the
|
||||
text is changed by the user.
|
||||
|
||||
<li><tt>FL_WHEN_RELEASE</tt>: The callback will
|
||||
be done when this widget loses the focus, including when the window is
|
||||
unmapped. This is a useful value for text fields in a panel where
|
||||
doing the callback on every change is wasteful. However the callback
|
||||
will also happen if the mouse is moved out of the window, which means
|
||||
it should not do anything visible (like pop up an error message). You
|
||||
might do better setting this to zero, and scanning all the items for
|
||||
<tt>changed()</tt> when the OK button on a panel is pressed.
|
||||
|
||||
<li><tt>FL_WHEN_ENTER_KEY</tt>: If the user types the Enter
|
||||
key, the entire text is selected, and the callback is done if
|
||||
the text has changed. Normally the Enter key will navigate to
|
||||
the next field (or insert a newline for a
|
||||
<tt>Fl_Mulitline_Input</tt>), this changes the behavior.
|
||||
|
||||
<li><tt>FL_WHEN_ENTER_KEY|FL_WHEN_NOT_CHANGED</tt>: The Enter key
|
||||
will do the callback even if the text has not changed. Useful for
|
||||
command fields.
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Input.textcolor">Fl_Color Fl_Input::textcolor() const<br>
|
||||
void Fl_Input::textcolor(Fl_Color)</a></h4>
|
||||
|
||||
Gets or sets the color of the text in the input field.
|
||||
|
||||
<h4><a name="Fl_Input.textfont">Fl_Font Fl_Input::textfont() const<br>
|
||||
void Fl_Input::textfont(Fl_Font)</a></h4>
|
||||
|
||||
Gets or sets the font of the text in the input field.
|
||||
|
||||
<h4><a name="Fl_Input.textsize">uchar Fl_Input::textsize() const<br>
|
||||
void Fl_Input::textsize(uchar)</a></h4>
|
||||
|
||||
Gets or sets the size of the text in the input field.
|
||||
|
||||
<h4><a name="Fl_Input.cursor_color">Fl_Color Fl_Input::cursor_color() const<br>
|
||||
void Fl_Input::cursor_color(Fl_Color)</a></h4>
|
||||
|
||||
Get or set the color of the cursor. This is black by default.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<A href=Fl_Float_Input.html#Fl_Float_Input>Fl_Float_Input</A>, <A href=Fl_Int_Input.html#Fl_Int_Input>Fl_Int_Input</A>,
|
||||
<A href=Fl_Multiline_Input.html#Fl_Multiline_Input>Fl_Multiline_Input</A>, <A href=Fl_Secret_Input.html#Fl_Secret_Input>Fl_Secret_Input</A>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Input.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
This is the FLTK text input widget. It displays a single line of text
|
||||
and lets the user edit it. Normally it is drawn with an inset box and
|
||||
a white background. The text may contain any characters (even 0), and
|
||||
will correctly display anything, using ^X notation for unprintable
|
||||
control characters and \nnn notation for unprintable characters with
|
||||
the high bit set. It assummes the font can draw any characters in the
|
||||
ISO8859-1 character set.
|
||||
<TABLE border=1>
|
||||
<TR><TD><B>Mouse button 1</B></TD><TD>Moves the cursor to this point.
|
||||
Drag selects characters. Double click selects words. Triple click
|
||||
selects all text. Shift+click extends the selection.</TD></TR>
|
||||
<TR><TD><B>Mouse button 2</B></TD><TD>Insert the current X selection at
|
||||
the cursor (unlike Motif this does not move the insertion point to the
|
||||
mouse). If the widget does not have the input focus (and thus no
|
||||
cursor) it puts the cursor where clicked and inserts the selection
|
||||
there.</TD></TR>
|
||||
<TR><TD><B>Mouse button 3</B></TD><TD>Currently acts like button 1.</TD></TR>
|
||||
<TR><TD><B>Backspace</B></TD><TD>Deletes one character to the left, or
|
||||
deletes the selected region.</TD></TR>
|
||||
<TR><TD><B>Enter</B></TD><TD>May cause the callback, see when().</TD></TR>
|
||||
<TR><TD><B>^A or Home</B></TD><TD>Go to start of line.</TD></TR>
|
||||
<TR><TD><B>^B or Left</B></TD><TD>Move left</TD></TR>
|
||||
<TR><TD><B>^C</B></TD><TD>Copy the selection to the clipboard</TD></TR>
|
||||
<TR><TD><B>^D or Delete</B></TD><TD>Deletes one character to the right
|
||||
or deletes the selected region. <I>Due to silly historical X problems,
|
||||
the Delete key will act like Backspace until you type a "real"
|
||||
backspace.</I></TD></TR>
|
||||
<TR><TD><B>^E or End</B></TD><TD>Go to the end of line.</TD></TR>
|
||||
<TR><TD><B>^F or Right</B></TD><TD>Move right</TD></TR>
|
||||
<TR><TD><B>^K</B></TD><TD>Delete to the end of line (next \n character)
|
||||
or deletes a single \n character. These deletions are all concatenated
|
||||
into the clipboard.</TD></TR>
|
||||
<TR><TD><B>^N or Down</B></TD><TD>Move down (for Fl_Multiline_Input
|
||||
only, otherwise it moves to the next input field).</TD></TR>
|
||||
<TR><TD><B>^P or Up</B></TD><TD>Move up (for Fl_Multiline_Input only,
|
||||
otherwise it moves to the previous input field).</TD></TR>
|
||||
<TR><TD><B>^Q or
|
||||
<BR>RightCtrl or
|
||||
<BR>Compose</B></TD><TD>Start a <A href=compose.html>compose-character</A>
|
||||
sequence. The next one or two keys typed define the character to
|
||||
insert. This also can be used to "quote" control characters.</TD></TR>
|
||||
<TR><TD><B>^U</B></TD><TD>Delete everything.</TD></TR>
|
||||
<TR><TD><B>^V or ^Y</B></TD><TD>Paste the clipboard</TD></TR>
|
||||
<TR><TD><B>^X or ^W</B></TD><TD>Copy the region to the clipboard and
|
||||
delete it.</TD></TR>
|
||||
<TR><TD><B>^Z or ^_</B></TD><TD>Undo. This is a single-level undo
|
||||
mechanism, but all adjacent deletions and insertions are concatenated
|
||||
into a single "undo". Often this will undo a lot more than you
|
||||
expected.</TD></TR>
|
||||
<TR><TD><B>Shift+move</B></TD><TD>Move the cursor but also extend the
|
||||
selection.</TD></TR>
|
||||
</TABLE>
|
||||
<H3>Methods</H3>
|
||||
<CENTER>
|
||||
<TABLE width=90%>
|
||||
<TR><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Input.Fl_Input>Fl_Input</A></LI>
|
||||
<LI><A href=#Fl_Input.~Fl_Input>~Fl_Input</A></LI>
|
||||
<LI><A href=#Fl_Input.cursor_color>cursor_color</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Input.index>index</A></LI>
|
||||
<LI><A href=#Fl_Input.size>size</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Input.static_value>static_value</A></LI>
|
||||
<LI><A href=#Fl_Input.textcolor>textcolor</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Input.textfont>textfont</A></LI>
|
||||
<LI><A href=#Fl_Input.textsize>textsize</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Input.value>value</A></LI>
|
||||
<LI><A href=#Fl_Input.when>when</A></LI>
|
||||
</UL>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
<H4><A name=Fl_Input.Fl_Input>Fl_Input::Fl_Input(int x, int y, int w,
|
||||
int h, const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Input</TT> widget using the given position, size,
|
||||
and label string. The default boxtype is <TT>FL_DOWN_BOX</TT>.
|
||||
<H4><A name=Fl_Input.~Fl_Input>virtual Fl_Input::~Fl_Input()</A></H4>
|
||||
Destroys the widget and any value associated with it.
|
||||
<H4><A name=Fl_Input.value>const char *Fl_Input::value() const
|
||||
<BR> int Fl_Input::value(const char*)
|
||||
<BR> int Fl_Input::value(const char*, int)</A></H4>
|
||||
The first form returns the current value, which is a pointer to the
|
||||
internal buffer and is valid only until the next event is handled.
|
||||
<P>The second two forms change the text and set the mark and the point
|
||||
to the end of it. The string is copied to the internal buffer. Passing <TT>
|
||||
NULL</TT> is the same as "". This returns non-zero if the new value is
|
||||
different than the current one. You can use the second version to
|
||||
directly set the length if you know it already or want to put nul's in
|
||||
the text. </P>
|
||||
<H4><A name=Fl_Input.static_value>int Fl_Input::static_value(const
|
||||
char*)
|
||||
<BR> int Fl_Input::static_value(const char*, int)</A></H4>
|
||||
Change the text and set the mark and the point to the end of it. The
|
||||
string is <I>not</I> copied. If the user edits the string it is copied
|
||||
to the internal buffer then. This can save a great deal of time and
|
||||
memory if your program is rapidly changing the values of text fields,
|
||||
but this will only work if the passed string remains unchanged until
|
||||
either the <TT>Fl_Input</TT> is destroyed or <TT>value()</TT> is called
|
||||
again.
|
||||
<H4><A name=Fl_Input.size>int Fl_Input::size() const</A></H4>
|
||||
Returns the number of characters in <TT>value()</TT>. This may be
|
||||
greater than <TT>strlen(value())</TT> if there are nul characters in
|
||||
it.
|
||||
<H4><A name=Fl_Input.index>char Fl_Input::index(int) const</A></H4>
|
||||
Same as <TT>value()[n]</TT>, but may be faster in plausible
|
||||
implementations. No bounds checking is done.
|
||||
<H4><A name=Fl_Input.when>Fl_When Fl_Widget::when() const
|
||||
<BR> void Fl_Widget::when(Fl_When)</A></H4>
|
||||
Controls when callbacks are done. The following values are useful,
|
||||
the default value is <TT>FL_WHEN_RELEASE</TT>:
|
||||
<UL>
|
||||
<LI><TT>0</TT>: The callback is not done, but <TT>changed()</TT> is
|
||||
turned on. </LI>
|
||||
<LI><TT>FL_WHEN_CHANGED</TT>: The callback is done each time the text
|
||||
is changed by the user. </LI>
|
||||
<LI><TT>FL_WHEN_RELEASE</TT>: The callback will be done when this
|
||||
widget loses the focus, including when the window is unmapped. This
|
||||
is a useful value for text fields in a panel where doing the callback
|
||||
on every change is wasteful. However the callback will also happen if
|
||||
the mouse is moved out of the window, which means it should not do
|
||||
anything visible (like pop up an error message). You might do better
|
||||
setting this to zero, and scanning all the items for <TT>changed()</TT>
|
||||
when the OK button on a panel is pressed. </LI>
|
||||
<LI><TT>FL_WHEN_ENTER_KEY</TT>: If the user types the Enter key, the
|
||||
entire text is selected, and the callback is done if the text has
|
||||
changed. Normally the Enter key will navigate to the next field (or
|
||||
insert a newline for a <TT>Fl_Mulitline_Input</TT>), this changes the
|
||||
behavior. </LI>
|
||||
<LI><TT>FL_WHEN_ENTER_KEY|FL_WHEN_NOT_CHANGED</TT>: The Enter key will
|
||||
do the callback even if the text has not changed. Useful for command
|
||||
fields. </LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Input.textcolor>Fl_Color Fl_Input::textcolor() const
|
||||
<BR> void Fl_Input::textcolor(Fl_Color)</A></H4>
|
||||
Gets or sets the color of the text in the input field.
|
||||
<H4><A name=Fl_Input.textfont>Fl_Font Fl_Input::textfont() const
|
||||
<BR> void Fl_Input::textfont(Fl_Font)</A></H4>
|
||||
Gets or sets the font of the text in the input field.
|
||||
<H4><A name=Fl_Input.textsize>uchar Fl_Input::textsize() const
|
||||
<BR> void Fl_Input::textsize(uchar)</A></H4>
|
||||
Gets or sets the size of the text in the input field.
|
||||
<H4><A name=Fl_Input.cursor_color>Fl_Color Fl_Input::cursor_color()
|
||||
const
|
||||
<BR> void Fl_Input::cursor_color(Fl_Color)</A></H4>
|
||||
Get or set the color of the cursor. This is black by default. </BODY></HTML>
|
||||
+164
-212
@@ -1,220 +1,172 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Input_">class Fl_Input_</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Widget">Fl_Widget</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Input_>class Fl_Input_</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Widget.html#Fl_Widget>Fl_Widget</A>
|
||||
|
|
||||
+----<b>Fl_Input_</b>
|
||||
+----<B>Fl_Input_</B>
|
||||
|
|
||||
+----<a href="#Fl_Input">Fl_Input</a>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Input_.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
This is a virtual base class below
|
||||
<a href="#Fl_Input"><tt>Fl_Input</tt></a>. It has all the same interfaces,
|
||||
but lacks the <tt>handle()</tt> and <tt>draw()</tt> method. You may
|
||||
want to subclass it if you are one of those people who likes to change
|
||||
how the editing keys work.
|
||||
|
||||
<p>This can act like any of the subclasses of Fl_Input, by setting
|
||||
<tt>type()</tt> to one of the following values:
|
||||
|
||||
<ul><pre>
|
||||
+----<A href=functions.html#Fl_Input>Fl_Input</A>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Input_.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
This is a virtual base class below <A href=functions.html#Fl_Input><TT>
|
||||
Fl_Input</TT></A>. It has all the same interfaces, but lacks the <TT>
|
||||
handle()</TT> and <TT>draw()</TT> method. You may want to subclass it
|
||||
if you are one of those people who likes to change how the editing keys
|
||||
work.
|
||||
<P>This can act like any of the subclasses of Fl_Input, by setting <TT>
|
||||
type()</TT> to one of the following values: </P>
|
||||
<UL>
|
||||
<PRE>
|
||||
#define FL_NORMAL_INPUT 0
|
||||
#define FL_FLOAT_INPUT 1
|
||||
#define FL_INT_INPUT 2
|
||||
#define FL_MULTILINE_INPUT 4
|
||||
#define FL_SECRET_INPUT 5
|
||||
</pre></ul>
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<center>
|
||||
<table width=90%>
|
||||
<tr>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Input_.Fl_Input_">Fl_Input_</a>
|
||||
<li><a href="#Fl_Input_.~Fl_Input_">~Fl_Input_</a>
|
||||
<li><a href="#Fl_Input_.copy">copy</a>
|
||||
<li><a href="#Fl_Input_.copy_cuts">copy_cuts</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Input_.cut">cut</a>
|
||||
<li><a href="#Fl_Input_.drawtext">drawtext</a>
|
||||
<li><a href="#Fl_Input_.handletext">handletext</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Input_.insert">insert</a>
|
||||
<li><a href="#Fl_Input_.lineboundary">lineboundary</a>
|
||||
<li><a href="#Fl_Input_.mark">mark</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Input_.maybe_do_callback">maybe_do_callback</a>
|
||||
<li><a href="#Fl_Input_.position">position</a>
|
||||
<li><a href="#Fl_Input_.replace">replace</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Input_.undo">undo</a>
|
||||
<li><a href="#Fl_Input_.up_down_position">up_down_position</a>
|
||||
<li><a href="#Fl_Input_.wordboundary">wordboundary</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<h4><a name="Fl_Input_.Fl_Input_">Fl_Input_::Fl_Input_(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Input_</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_DOWN_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Input_.~Fl_Input_">virtual Fl_Input_::~Fl_Input_()</a></h4>
|
||||
|
||||
The destructor removes the widget and any value associated with it.
|
||||
|
||||
<h4><a name="Fl_Input_.wordboundary">int Fl_Input_::wordboundary(int i) const</a></h4>
|
||||
|
||||
Returns true if position <tt>i</tt> is at the start or end of a word.
|
||||
|
||||
<h4><a name="Fl_Input_.lineboundary">int Fl_Input_::lineboundary(int i) const</a></h4>
|
||||
|
||||
Returns true if position <tt>i</tt> is at the start or end of a line.
|
||||
|
||||
<h4><a name="Fl_Input_.drawtext">void Fl_Input_::drawtext(int,int,int,int)</a></h4>
|
||||
|
||||
Draw the text in the passed bounding box. If <tt>damage() &
|
||||
FL_DAMAGE_ALL</tt> is true, this assummes the area has already been
|
||||
erased to <tt>color()</tt>. Otherwise it does minimal update and
|
||||
erases the area itself.
|
||||
|
||||
<h4><a name="Fl_Input_.handletext">void Fl_Input_::handletext(int e,int,int,int,int)</a></h4>
|
||||
|
||||
Default handler for all event types. Your <tt>handle()</tt> method
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Methods</H3>
|
||||
<CENTER>
|
||||
<TABLE width=90%>
|
||||
<TR><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Input_.Fl_Input_>Fl_Input_</A></LI>
|
||||
<LI><A href=#Fl_Input_.~Fl_Input_>~Fl_Input_</A></LI>
|
||||
<LI><A href=#Fl_Input_.copy>copy</A></LI>
|
||||
<LI><A href=#Fl_Input_.copy_cuts>copy_cuts</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Input_.cut>cut</A></LI>
|
||||
<LI><A href=#Fl_Input_.drawtext>drawtext</A></LI>
|
||||
<LI><A href=#Fl_Input_.handletext>handletext</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Input_.insert>insert</A></LI>
|
||||
<LI><A href=#Fl_Input_.lineboundary>lineboundary</A></LI>
|
||||
<LI><A href=#Fl_Input_.mark>mark</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Input_.maybe_do_callback>maybe_do_callback</A></LI>
|
||||
<LI><A href=#Fl_Input_.position>position</A></LI>
|
||||
<LI><A href=#Fl_Input_.replace>replace</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Input_.undo>undo</A></LI>
|
||||
<LI><A href=#Fl_Input_.up_down_position>up_down_position</A></LI>
|
||||
<LI><A href=#Fl_Input_.wordboundary>wordboundary</A></LI>
|
||||
</UL>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
<H4><A name=Fl_Input_.Fl_Input_>Fl_Input_::Fl_Input_(int x, int y, int
|
||||
w, int h, const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Input_</TT> widget using the given position,
|
||||
size, and label string. The default boxtype is <TT>FL_DOWN_BOX</TT>.
|
||||
<H4><A name=Fl_Input_.~Fl_Input_>virtual Fl_Input_::~Fl_Input_()</A></H4>
|
||||
The destructor removes the widget and any value associated with it.
|
||||
<H4><A name=Fl_Input_.wordboundary>int Fl_Input_::wordboundary(int i)
|
||||
const</A></H4>
|
||||
Returns true if position <TT>i</TT> is at the start or end of a word.
|
||||
<H4><A name=Fl_Input_.lineboundary>int Fl_Input_::lineboundary(int i)
|
||||
const</A></H4>
|
||||
Returns true if position <TT>i</TT> is at the start or end of a line.
|
||||
<H4><A name=Fl_Input_.drawtext>void Fl_Input_::drawtext(int,int,int,int)</A>
|
||||
</H4>
|
||||
Draw the text in the passed bounding box. If <TT>damage()
|
||||
FL_DAMAGE_ALL</TT> is true, this assummes the area has already been
|
||||
erased to <TT>color()</TT>. Otherwise it does minimal update and
|
||||
erases the area itself.
|
||||
<H4><A name=Fl_Input_.handletext>void Fl_Input_::handletext(int
|
||||
e,int,int,int,int)</A></H4>
|
||||
Default handler for all event types. Your <TT>handle()</TT> method
|
||||
should call this for all events that it does not handle completely.
|
||||
You must pass it the same bounding box as passed to <tt>draw()</tt>.
|
||||
Handles <tt>FL_PUSH</tt>, <tt>FL_DRAG</tt>, <tt>FL_RELEASE</tt> to
|
||||
select text, handles <tt>FL_FOCUS</tt> and <tt>FL_UNFOCUS</tt> to show
|
||||
and hide the cursor.
|
||||
|
||||
<h4><a name="Fl_Input_.up_down_position">int Fl_Input_::up_down_position(int i, int keepmark=0)</a></h4>
|
||||
|
||||
Do the correct thing for arrow keys. Sets the position (and mark if
|
||||
<i>keepmark</i> is zero) to somewhere in the same line as
|
||||
<i>i</i>, such that pressing the arrows repeatedly will cause the
|
||||
point to move up and down.
|
||||
|
||||
<h4><a name="Fl_Input_.maybe_do_callback">void Fl_Input_::maybe_do_callback()</a></h4>
|
||||
|
||||
Does the callback if <tt>changed()</tt> is true or if <tt>when() &
|
||||
FL_WHEN_NOT_CHANGED</tt> is non-zero. You should call this at any
|
||||
point you think you should generate a callback.
|
||||
|
||||
<h4><a name="Fl_Input_.position">int Fl_Input_::position() const<br>
|
||||
int Fl_Input_::position(int new_position, int new_mark)<br>
|
||||
int Fl_Input_::position(int new_position_and_new_mark)</a></h4>
|
||||
|
||||
The input widget maintains two pointers into the string. The "position" is
|
||||
where the cursor is. The "mark" is the other end of the selected
|
||||
text. If they are equal then there is no selection. Changing this
|
||||
does not affect the clipboard (use <tt>copy()</tt> to do that).
|
||||
|
||||
<p>Changing these values causes a <tt>redraw()</tt>. The new values
|
||||
are bounds checked. The return value is non-zero if the new position
|
||||
is different than the old one. <tt>position(n)</tt> is the same as
|
||||
<tt>position(n,n)</tt>. <tt>mark(n)</tt> is the same as
|
||||
<tt>position(position(),n)</tt>.
|
||||
|
||||
<h4><a name="Fl_Input_.mark">int Fl_Input_::mark() const<br>
|
||||
int Fl_Input_::mark(int new_mark)</a></h4>
|
||||
|
||||
Gets or sets the current selection mark. <tt>mark(n)</tt> is the same
|
||||
as <tt>position(position(),n)</tt>.
|
||||
|
||||
<h4><a name="Fl_Input_.replace">int Fl_Input_::replace(int a, int b, const char *insert, int length=0)</a></h4>
|
||||
|
||||
This call does all editing of the text. It deletes the region between
|
||||
<tt>a</tt> and <tt>b</tt> (either one may be less or equal to the
|
||||
other), and then inserts the string <tt>insert</tt> at that point and
|
||||
leaves the <tt>mark()</tt> and <tt>position()</tt> after the
|
||||
insertion. Does the callback if <tt>when() & FL_WHEN_CHANGED</tt> and
|
||||
there is a change.
|
||||
|
||||
<p>Set <tt>start</tt> and <tt>end</tt> equal to not delete anything. Set
|
||||
<tt>insert</tt> to <tt>NULL</tt> to not insert anything.
|
||||
|
||||
<p><tt>length</tt> must be zero or <tt>strlen(insert)</tt>, this saves
|
||||
a tiny bit of time if you happen to already know the length of the
|
||||
insertion, or can be used to insert a portion of a string or a string
|
||||
containing nul's.
|
||||
|
||||
<p><tt>a</tt> and <tt>b</tt> are clamped to the 0..<tt>size()</tt>
|
||||
range, so it is safe to pass any values.
|
||||
|
||||
<p><tt>cut()</tt> and <tt>insert()</tt> are just inline functions that
|
||||
call <tt>replace()</tt>.
|
||||
|
||||
<h4><a name="Fl_Input_.cut">int Fl_Input_::cut()<br>
|
||||
int Fl_Input_::cut(int n)<br>
|
||||
int Fl_Input_::cut(int a, int b);</a></h4>
|
||||
|
||||
<tt>Fl_Input_::cut()</tt> deletes the current selection.
|
||||
<tt>cut(n)</tt> deletes <tt>n</tt> characters after the
|
||||
<tt>position()</tt>. <tt>cut(-n)</tt> deletes <tt>n</tt> characters
|
||||
before the <tt>position()</tt>. <tt>cut(a,b)</tt> deletes the
|
||||
characters between offsets <tt>a</tt> and <tt>b</tt>. <tt>A</tt>,
|
||||
<tt>b</tt>, and <tt>n</tt> are all clamped to the size of the string.
|
||||
The mark and point are left where the deleted text was.
|
||||
|
||||
<p>If you want the data to go into the clipboard, do
|
||||
<tt>Fl_Input_::copy()</tt> before calling <tt>Fl_Input_::cut()</tt>, or
|
||||
do <tt>Fl_Input_::copy_cuts()</tt> afterwards.
|
||||
|
||||
<h4><a name="Fl_Input_.insert">int Fl_Input_::insert(const char *t,int l=0)</a></h4>
|
||||
|
||||
Insert the string <tt>t</tt> at the current position, and leave the
|
||||
mark and position after it. If <tt>l</tt> is not zero then it is
|
||||
assummed to be <tt>strlen(t)</tt>.
|
||||
|
||||
<h4><a name="Fl_Input_.copy">int Fl_Input_::copy()</a></h4>
|
||||
|
||||
Put the current selection between <tt>mark()</tt> and
|
||||
<tt>position()</tt> into the clipboard. Does not replace the old
|
||||
clipboard contents if <tt>position()</tt> and <tt>mark()</tt> are
|
||||
equal.
|
||||
|
||||
<h4><a name="Fl_Input_.undo">int Fl_Input_::undo()</a></h4>
|
||||
|
||||
Does undo of several previous calls to <tt>replace()</tt>. Returns
|
||||
non-zero if any change was made.
|
||||
|
||||
<h4><a name="Fl_Input_.copy_cuts">int Fl_Input_::copy_cuts()</a></h4>
|
||||
|
||||
Copy all the previous contiguous cuts from the undo information to the
|
||||
clipboard. This is used to make ^K work.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
You must pass it the same bounding box as passed to <TT>draw()</TT>.
|
||||
Handles <TT>FL_PUSH</TT>, <TT>FL_DRAG</TT>, <TT>FL_RELEASE</TT> to
|
||||
select text, handles <TT>FL_FOCUS</TT> and <TT>FL_UNFOCUS</TT> to show
|
||||
and hide the cursor.
|
||||
<H4><A name=Fl_Input_.up_down_position>int
|
||||
Fl_Input_::up_down_position(int i, int keepmark=0)</A></H4>
|
||||
Do the correct thing for arrow keys. Sets the position (and mark if <I>
|
||||
keepmark</I> is zero) to somewhere in the same line as <I>i</I>, such
|
||||
that pressing the arrows repeatedly will cause the point to move up and
|
||||
down.
|
||||
<H4><A name=Fl_Input_.maybe_do_callback>void
|
||||
Fl_Input_::maybe_do_callback()</A></H4>
|
||||
Does the callback if <TT>changed()</TT> is true or if <TT>when()
|
||||
FL_WHEN_NOT_CHANGED</TT> is non-zero. You should call this at any
|
||||
point you think you should generate a callback.
|
||||
<H4><A name=Fl_Input_.position>int Fl_Input_::position() const
|
||||
<BR> int Fl_Input_::position(int new_position, int new_mark)
|
||||
<BR> int Fl_Input_::position(int new_position_and_new_mark)</A></H4>
|
||||
The input widget maintains two pointers into the string. The
|
||||
"position" is where the cursor is. The "mark" is the other end of the
|
||||
selected text. If they are equal then there is no selection. Changing
|
||||
this does not affect the clipboard (use <TT>copy()</TT> to do that).
|
||||
<P>Changing these values causes a <TT>redraw()</TT>. The new values
|
||||
are bounds checked. The return value is non-zero if the new position
|
||||
is different than the old one. <TT>position(n)</TT> is the same as <TT>
|
||||
position(n,n)</TT>. <TT>mark(n)</TT> is the same as <TT>
|
||||
position(position(),n)</TT>. </P>
|
||||
<H4><A name=Fl_Input_.mark>int Fl_Input_::mark() const
|
||||
<BR> int Fl_Input_::mark(int new_mark)</A></H4>
|
||||
Gets or sets the current selection mark. <TT>mark(n)</TT> is the same
|
||||
as <TT>position(position(),n)</TT>.
|
||||
<H4><A name=Fl_Input_.replace>int Fl_Input_::replace(int a, int b,
|
||||
const char *insert, int length=0)</A></H4>
|
||||
This call does all editing of the text. It deletes the region between <TT>
|
||||
a</TT> and <TT>b</TT> (either one may be less or equal to the other),
|
||||
and then inserts the string <TT>insert</TT> at that point and leaves
|
||||
the <TT>mark()</TT> and <TT>position()</TT> after the insertion. Does
|
||||
the callback if <TT>when() FL_WHEN_CHANGED</TT> and there is a change.
|
||||
<P>Set <TT>start</TT> and <TT>end</TT> equal to not delete anything.
|
||||
Set <TT>insert</TT> to <TT>NULL</TT> to not insert anything. </P>
|
||||
<P><TT>length</TT> must be zero or <TT>strlen(insert)</TT>, this saves
|
||||
a tiny bit of time if you happen to already know the length of the
|
||||
insertion, or can be used to insert a portion of a string or a string
|
||||
containing nul's. </P>
|
||||
<P><TT>a</TT> and <TT>b</TT> are clamped to the 0..<TT>size()</TT>
|
||||
range, so it is safe to pass any values. </P>
|
||||
<P><TT>cut()</TT> and <TT>insert()</TT> are just inline functions that
|
||||
call <TT>replace()</TT>. </P>
|
||||
<H4><A name=Fl_Input_.cut>int Fl_Input_::cut()
|
||||
<BR> int Fl_Input_::cut(int n)
|
||||
<BR> int Fl_Input_::cut(int a, int b);</A></H4>
|
||||
<TT>Fl_Input_::cut()</TT> deletes the current selection. <TT>cut(n)</TT>
|
||||
deletes <TT>n</TT> characters after the <TT>position()</TT>. <TT>
|
||||
cut(-n)</TT> deletes <TT>n</TT> characters before the <TT>position()</TT>
|
||||
. <TT>cut(a,b)</TT> deletes the characters between offsets <TT>a</TT>
|
||||
and <TT>b</TT>. <TT>A</TT>, <TT>b</TT>, and <TT>n</TT> are all clamped
|
||||
to the size of the string. The mark and point are left where the
|
||||
deleted text was.
|
||||
<P>If you want the data to go into the clipboard, do <TT>
|
||||
Fl_Input_::copy()</TT> before calling <TT>Fl_Input_::cut()</TT>, or do <TT>
|
||||
Fl_Input_::copy_cuts()</TT> afterwards. </P>
|
||||
<H4><A name=Fl_Input_.insert>int Fl_Input_::insert(const char *t,int
|
||||
l=0)</A></H4>
|
||||
Insert the string <TT>t</TT> at the current position, and leave the
|
||||
mark and position after it. If <TT>l</TT> is not zero then it is
|
||||
assummed to be <TT>strlen(t)</TT>.
|
||||
<H4><A name=Fl_Input_.copy>int Fl_Input_::copy()</A></H4>
|
||||
Put the current selection between <TT>mark()</TT> and <TT>position()</TT>
|
||||
into the clipboard. Does not replace the old clipboard contents if <TT>
|
||||
position()</TT> and <TT>mark()</TT> are equal.
|
||||
<H4><A name=Fl_Input_.undo>int Fl_Input_::undo()</A></H4>
|
||||
Does undo of several previous calls to <TT>replace()</TT>. Returns
|
||||
non-zero if any change was made.
|
||||
<H4><A name=Fl_Input_.copy_cuts>int Fl_Input_::copy_cuts()</A></H4>
|
||||
Copy all the previous contiguous cuts from the undo information to the
|
||||
clipboard. This is used to make ^K work. </BODY></HTML>
|
||||
@@ -1,47 +1,34 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Int_Input">class Fl_Int_Input</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Input">Fl_Input</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Int_Input>class Fl_Int_Input</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=functions.html#Fl_Input>Fl_Input</A>
|
||||
|
|
||||
+----<b>Fl_Int_Input</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Input.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Int_Input</tt> class is a subclass of <tt>Fl_Input</tt> that
|
||||
displays its input in red when the value string is not a legal integer
|
||||
value.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Int_Input.Fl_Int_Input">Fl_Int_Input</a>
|
||||
<li><a href="#Fl_Int_Input.~Fl_Int_Input">~Fl_Int_Input</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Int_Input.Fl_Int_Input">Fl_Int_Input::Fl_Int_Input(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Int_Input</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_DOWN_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Int_Input.~Fl_Int_Input">virtual Fl_Int_Input::~Fl_Int_Input()</a></h4>
|
||||
|
||||
Destroys the widget and any value associated with it.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Int_Input</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Input.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Int_Input</TT> class is a subclass of <TT>Fl_Input</TT>
|
||||
that displays its input in red when the value string is not a legal
|
||||
integer value.
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Int_Input.Fl_Int_Input>Fl_Int_Input</A></LI>
|
||||
<LI><A href=#Fl_Int_Input.~Fl_Int_Input>~Fl_Int_Input</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Int_Input.Fl_Int_Input>Fl_Int_Input::Fl_Int_Input(int x,
|
||||
int y, int w, int h, const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Int_Input</TT> widget using the given position,
|
||||
size, and label string. The default boxtype is <TT>FL_DOWN_BOX</TT>.
|
||||
<H4><A name=Fl_Int_Input.~Fl_Int_Input>virtual
|
||||
Fl_Int_Input::~Fl_Int_Input()</A></H4>
|
||||
Destroys the widget and any value associated with it. </BODY></HTML>
|
||||
@@ -1,53 +1,40 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Light_Button">class Fl_Light_Button</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Button">Fl_Button</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Light_Button>class Fl_Light_Button</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Button.html#Fl_Button>Fl_Button</A>
|
||||
|
|
||||
+----<b>Fl_Light_Button</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Light_Button.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
Buttons generate callbacks when they are clicked by the user. You
|
||||
control exactly when and how by changing the values for <tt>type()</tt> and
|
||||
<tt>when()</tt>.
|
||||
|
||||
<P>The <tt>Fl_Light_Button</tt> subclass display the "on" state by
|
||||
turning on a light, rather than drawing pushed in. The shape of the
|
||||
"light" is initially set to FL_DOWN_BOX. The color of the
|
||||
light when on is controlled with <tt>selection_color()<tt>, which defaults to
|
||||
FL_YELLOW.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Light_Button.Fl_Light_Button">Fl_Light_Button</a>
|
||||
<li><a href="#Fl_Light_Button.~Fl_Light_Button">~Fl_Light_Button</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Light_Button.Fl_Light_Button">Fl_Light_Button::Fl_Light_Button(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Light_Button</tt> widget using the given position,
|
||||
size, and label string.
|
||||
|
||||
<h4><a name="Fl_Light_Button.~Fl_Light_Button">Fl_Light_Button::~Fl_Light_Button()</a></h4>
|
||||
|
||||
The destructor deletes the check button.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Light_Button</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Light_Button.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
Buttons generate callbacks when they are clicked by the user. You
|
||||
control exactly when and how by changing the values for <TT>type()</TT>
|
||||
and <TT>when()</TT>.
|
||||
<P>The <TT>Fl_Light_Button</TT> subclass display the "on" state by
|
||||
turning on a light, rather than drawing pushed in. The shape of the
|
||||
"light" is initially set to FL_DOWN_BOX. The color of the light when
|
||||
on is controlled with <TT>selection_color()<TT>, which defaults to
|
||||
FL_YELLOW. </TT></TT></P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Light_Button.Fl_Light_Button>Fl_Light_Button</A></LI>
|
||||
<LI><A href=#Fl_Light_Button.~Fl_Light_Button>~Fl_Light_Button</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Light_Button.Fl_Light_Button>
|
||||
Fl_Light_Button::Fl_Light_Button(int x, int y, int w, int h, const char
|
||||
*label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Light_Button</TT> widget using the given
|
||||
position, size, and label string.
|
||||
<H4><A name=Fl_Light_Button.~Fl_Light_Button>
|
||||
Fl_Light_Button::~Fl_Light_Button()</A></H4>
|
||||
The destructor deletes the check button. </BODY></HTML>
|
||||
+161
-218
@@ -1,220 +1,163 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Menu_">class Fl_Menu_</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Widget">Fl_Widget</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Menu_>class Fl_Menu_</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Widget.html#Fl_Widget>Fl_Widget</A>
|
||||
|
|
||||
+----<b>Fl_Menu_</b>----<a href="#Fl_Menu_Item">Fl_Menu_Item</a>
|
||||
+----<B>Fl_Menu_</B>----<A href=Fl_Menu_Item.html#Fl_Menu_Item>Fl_Menu_Item</A>
|
||||
|
|
||||
+----<a href="#Fl_Choice">Fl_Choice</a>, <a href="#Fl_Menu_Bar">Fl_Menu_Bar</a>, <a href="#Fl_Menu_Button">Fl_Menu_Button</a>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Menu_.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
All widgets that have a menu in FLTK are subclassed off of this class.
|
||||
Currently FLTK provides you with
|
||||
<a href="#Fl_Menu_Button"><tt>Fl_Menu_Button</tt></a>,
|
||||
<a href="#Fl_Menu_Bar"><tt>Fl_Menu_Bar</tt></a>, and
|
||||
<a href="#Fl_Choice"><tt>Fl_Choice</tt></a>.
|
||||
|
||||
<p>The class contains a pointer to an array of structures of type
|
||||
<a href="#Fl_Menu_Item"><tt>Fl_Menu_Item</tt></a>.
|
||||
These describe the contents of the menu. Usually the array is a large
|
||||
initialization constant, but there are methods to build it
|
||||
dynamically.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<center>
|
||||
<table width=90%>
|
||||
<tr>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Menu_.Fl_Menu_">Fl_Menu_</a>
|
||||
<li><a href="#Fl_Menu_.~Fl_Menu_">~Fl_Menu_</a>
|
||||
<li><a href="#Fl_Menu_.add">add</a>
|
||||
<li><a href="#Fl_Menu_.clear">clear</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Menu_.down_box">down_box</a>
|
||||
<li><a href="#Fl_Menu_.global">global</a>
|
||||
<li><a href="#Fl_Menu_.menu">menu</a>
|
||||
<li><a href="#Fl_Menu_.mode">mode</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Menu_.remove">remove</a>
|
||||
<li><a href="#Fl_Menu_.replace">replace</a>
|
||||
<li><a href="#Fl_Menu_.shortcut">shortcut</a>
|
||||
<li><a href="#Fl_Menu_.size">size</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Menu_.test_shortcut">test_shortcut</a>
|
||||
<li><a href="#Fl_Menu_.text">text</a>
|
||||
<li><a href="#Fl_Menu_.textcolor">textcolor</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Menu_.textfont">textfont</a>
|
||||
<li><a href="#Fl_Menu_.textsize">textsize</a>
|
||||
<li><a href="#Fl_Menu_.value">value</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<h4><a name="Fl_Menu_.Fl_Menu_">Fl_Menu_::Fl_Menu_(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Menu_</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_NO_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Menu_.~Fl_Menu_">virtual Fl_Menu_::~Fl_Menu_()</a></h4>
|
||||
|
||||
Destroys the menu and its items.
|
||||
|
||||
<h4><a name="Fl_Menu_.menu">const Fl_Menu_Item* Fl_Menu_::menu() const<br>
|
||||
void Fl_Menu_::menu(const Fl_Menu_Item*)</a></h4>
|
||||
|
||||
Get or set the menu array directly. Setting it to <tt>NULL</tt> indicates that
|
||||
you want the widget to allocate its own array.
|
||||
|
||||
<h4><a name="Fl_Menu_.value">int Fl_Menu_::value() const<br>
|
||||
int Fl_Menu_::value(int)<br>
|
||||
int Fl_Menu_::value(const Fl_Menu_Item*)</a></h4>
|
||||
|
||||
The value is the index into <tt>menu()</tt> of the last item chosen by the
|
||||
user. It is zero initially. You can set it as an integer, or set it
|
||||
with a pointer to a menu item. The set routines return non-zero if
|
||||
the new value is different than the old one.
|
||||
|
||||
<h4><a name="Fl_Menu_.test_shortcut">const Fl_Menu_Item* Fl_Menu_::test_shortcut()</a></h4>
|
||||
|
||||
Only call this in response to <tt>FL_SHORTCUT events</tt>. If the event
|
||||
matches an entry in the menu that entry is selected and the callback
|
||||
will be done (or <tt>changed()</tt> will be set). This allows shortcuts
|
||||
directed at one window to call menus in another.
|
||||
|
||||
<h4><a name="Fl_Menu_.global">void Fl_Menu_::global()</a></h4>
|
||||
|
||||
Make the shortcuts for this menu work no matter what window has the
|
||||
focus when you type it. This is done by using <a
|
||||
href="#add_handler"><tt>Fl::add_handler()</tt></a>. This
|
||||
<tt>Fl_Menu_</tt> widget does not have to be visible (ie the window it
|
||||
is in can be hidden, or it does not have to be put in a window at all).
|
||||
|
||||
<p>Currently there can be only one <tt>global()<tt> menu. Setting a new one
|
||||
will replace the old one. There is no way to remove the <tt>global()</tt>
|
||||
setting (including destroying the menu).
|
||||
|
||||
<h4><a name="Fl_Menu_.text">const char* Fl_Menu_::text() const<br>
|
||||
const char* Fl_Menu_::text(int i) const</a></h4>
|
||||
|
||||
Returns the title of the last item chosen, or of item <tt>i</tt>.
|
||||
|
||||
<h4><a name="Fl_Menu_.size">int Fl_Menu_::size() const</a></h4>
|
||||
|
||||
This returns <tt>menu()->size()</tt>, which is how many entries are in
|
||||
the array, not counting the <tt>NULL</tt> ending, but including all
|
||||
submenus titles and the <tt>NULL</tt>'s that end them. If the menu is
|
||||
<tt>NULL</tt> this returns zero.
|
||||
|
||||
<h4><a name="Fl_Menu_.add">int Fl_Menu_::add(const char *,const char *,Fl_Callback *,void *v=0,int f=0)<br>
|
||||
int Fl_Menu_::add(const char *)</a></h4>
|
||||
|
||||
The first form adds a new menu item, with a <tt>title</tt> string,
|
||||
<tt>shortcut</tt> string, <tt>callback</tt>, argument to the callback,
|
||||
and flags. If <tt>menu()</tt> was originally set with <tt>NULL</tt>
|
||||
then space is allocated for the new item. If instead you gave it an
|
||||
array then the array must have enough empty space for the new item.
|
||||
The title string is copied, but the shortcut is not.
|
||||
|
||||
<p>The second form splits the string at any | characters and then does
|
||||
<tt>add(s,0,0,0,0)</tt> with each section. This is often useful if you
|
||||
are just using the value, and is compatable with some Forms programs.
|
||||
|
||||
<p>Text is a string of the form "foo/bar/baz", this example will result
|
||||
in a submenu called "foo" and one in that called "bar" and and entry
|
||||
called "baz". The text is copied to new memory and can be freed. The
|
||||
other arguments are copied into the menu item unchanged.
|
||||
|
||||
<P>If an item exists already with that name then it is replaced with
|
||||
this new one. Otherwise this new one is added to the end of the
|
||||
correct menu or submenu. The return value is the offset into the
|
||||
array that the new entry was placed at.
|
||||
|
||||
<p>No bounds checking is done, the table must be big enough for all the
|
||||
entries you plan to add. Don't forget that there is a <tt>NULL</tt> terminator
|
||||
on the end, and the first time a item is added to a submenu three
|
||||
items are added (the title and the <tt>NULL</tt> terminator, as well as the
|
||||
actual menu item)
|
||||
|
||||
<P>The return value is the index into the array that the entry was put.
|
||||
|
||||
<h4><a name="Fl_Menu_.clear">void Fl_Menu_::clear()</a></h4>
|
||||
|
||||
Delete all the menu items. Don't do this if you used <tt>menu(x)</tt> to
|
||||
set it to your own array. You should do this before destroying the
|
||||
<tt>Fl_Menu_</tt> widget if it uses it's own array.
|
||||
|
||||
<h4><a name="Fl_Menu_.replace">void Fl_Menu_::replace(int n, const char *)</a></h4>
|
||||
|
||||
Changes the text of item <tt>n</tt>. The passed string is copied.
|
||||
|
||||
<h4><a name="Fl_Menu_.remove">void Fl_Menu_::remove(int n)</a></h4>
|
||||
|
||||
Deletes item <tt>n</tt> from the menu.
|
||||
|
||||
<h4><a name="Fl_Menu_.shortcut">void Fl_Menu_::shortcut(int i, int n);</a></h4>
|
||||
|
||||
Changes the shortcut of item <tt>i</tt> to <tt>n</tt>.
|
||||
|
||||
<h4><a name="Fl_Menu_.mode">void Fl_Menu_::mode(int i,int x);</a></h4>
|
||||
|
||||
Changes the flags of item <tt>i</tt>.
|
||||
|
||||
<h4><a name="Fl_Menu_.textcolor">Fl_Color Fl_Menu_::textcolor() const<br>
|
||||
void Fl_Menu_::textcolor(Fl_Color)</a></h4>
|
||||
|
||||
Get or set the current color of menu item labels.
|
||||
|
||||
<h4><a name="Fl_Menu_.textfont">Fl_Font Fl_Menu_::textfont() const<br>
|
||||
void Fl_Menu_::textfont(Fl_Font)</a></h4>
|
||||
|
||||
Get or set the current font of menu item labels.
|
||||
|
||||
<h4><a name="Fl_Menu_.textsize">uchar Fl_Menu_::textsize() const<br>
|
||||
void Fl_Menu_::textsize(uchar)</a></h4>
|
||||
|
||||
Get or set the font size of menu item labels.
|
||||
|
||||
<h4><a name="Fl_Menu_.down_box">Fl_Boxtype Fl_Menu_::down_box() const<br>
|
||||
void Fl_Menu_::down_box(Fl_Boxtype)</a></h4>
|
||||
|
||||
This box type is used to surround the currently-selected items in the
|
||||
menus. If this is <tt>FL_NO_BOX</tt> then it acts like
|
||||
<tt>FL_THIN_UP_BOX</tt> and <tt>selection_color()</tt> acts like
|
||||
<tt>FL_WHITE</tt>, for back compatability.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<A href=functions.html#Fl_Choice>Fl_Choice</A>, <A href=Fl_Menu_Bar.html#Fl_Menu_Bar>Fl_Menu_Bar</A>, <A href=Fl_Menu_Button.html#Fl_Menu_Button>Fl_Menu_Button</A>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Menu_.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
All widgets that have a menu in FLTK are subclassed off of this class.
|
||||
Currently FLTK provides you with <A href=Fl_Menu_Button.html#Fl_Menu_Button>
|
||||
<TT>Fl_Menu_Button</TT></A>, <A href=Fl_Menu_Bar.html#Fl_Menu_Bar><TT>
|
||||
Fl_Menu_Bar</TT></A>, and <A href=functions.html#Fl_Choice><TT>Fl_Choice</TT>
|
||||
</A>.
|
||||
<P>The class contains a pointer to an array of structures of type <A href=Fl_Menu_Item.html#Fl_Menu_Item>
|
||||
<TT>Fl_Menu_Item</TT></A>. These describe the contents of the menu.
|
||||
Usually the array is a large initialization constant, but there are
|
||||
methods to build it dynamically. </P>
|
||||
<H3>Methods</H3>
|
||||
<CENTER>
|
||||
<TABLE width=90%>
|
||||
<TR><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Menu_.Fl_Menu_>Fl_Menu_</A></LI>
|
||||
<LI><A href=#Fl_Menu_.~Fl_Menu_>~Fl_Menu_</A></LI>
|
||||
<LI><A href=#Fl_Menu_.add>add</A></LI>
|
||||
<LI><A href=#Fl_Menu_.clear>clear</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Menu_.down_box>down_box</A></LI>
|
||||
<LI><A href=#Fl_Menu_.global>global</A></LI>
|
||||
<LI><A href=#Fl_Menu_.menu>menu</A></LI>
|
||||
<LI><A href=#Fl_Menu_.mode>mode</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Menu_.remove>remove</A></LI>
|
||||
<LI><A href=#Fl_Menu_.replace>replace</A></LI>
|
||||
<LI><A href=#Fl_Menu_.shortcut>shortcut</A></LI>
|
||||
<LI><A href=#Fl_Menu_.size>size</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Menu_.test_shortcut>test_shortcut</A></LI>
|
||||
<LI><A href=#Fl_Menu_.text>text</A></LI>
|
||||
<LI><A href=#Fl_Menu_.textcolor>textcolor</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Menu_.textfont>textfont</A></LI>
|
||||
<LI><A href=#Fl_Menu_.textsize>textsize</A></LI>
|
||||
<LI><A href=#Fl_Menu_.value>value</A></LI>
|
||||
</UL>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
<H4><A name=Fl_Menu_.Fl_Menu_>Fl_Menu_::Fl_Menu_(int x, int y, int w,
|
||||
int h, const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Menu_</TT> widget using the given position, size,
|
||||
and label string. The default boxtype is <TT>FL_NO_BOX</TT>.
|
||||
<H4><A name=Fl_Menu_.~Fl_Menu_>virtual Fl_Menu_::~Fl_Menu_()</A></H4>
|
||||
Destroys the menu and its items.
|
||||
<H4><A name=Fl_Menu_.menu>const Fl_Menu_Item* Fl_Menu_::menu() const
|
||||
<BR> void Fl_Menu_::menu(const Fl_Menu_Item*)</A></H4>
|
||||
Get or set the menu array directly. Setting it to <TT>NULL</TT>
|
||||
indicates that you want the widget to allocate its own array.
|
||||
<H4><A name=Fl_Menu_.value>int Fl_Menu_::value() const
|
||||
<BR> int Fl_Menu_::value(int)
|
||||
<BR> int Fl_Menu_::value(const Fl_Menu_Item*)</A></H4>
|
||||
The value is the index into <TT>menu()</TT> of the last item chosen by
|
||||
the user. It is zero initially. You can set it as an integer, or set
|
||||
it with a pointer to a menu item. The set routines return non-zero if
|
||||
the new value is different than the old one.
|
||||
<H4><A name=Fl_Menu_.test_shortcut>const Fl_Menu_Item*
|
||||
Fl_Menu_::test_shortcut()</A></H4>
|
||||
Only call this in response to <TT>FL_SHORTCUT events</TT>. If the
|
||||
event matches an entry in the menu that entry is selected and the
|
||||
callback will be done (or <TT>changed()</TT> will be set). This allows
|
||||
shortcuts directed at one window to call menus in another.
|
||||
<H4><A name=Fl_Menu_.global>void Fl_Menu_::global()</A></H4>
|
||||
Make the shortcuts for this menu work no matter what window has the
|
||||
focus when you type it. This is done by using <A href=osissues.html#add_handler>
|
||||
<TT>Fl::add_handler()</TT></A>. This <TT>Fl_Menu_</TT> widget does not
|
||||
have to be visible (ie the window it is in can be hidden, or it does
|
||||
not have to be put in a window at all).
|
||||
<P>Currently there can be only one <TT>global()<TT>menu. Setting a new
|
||||
one will replace the old one. There is no way to remove the <TT>
|
||||
global()</TT> setting (including destroying the menu). </TT></TT></P>
|
||||
<H4><A name=Fl_Menu_.text>const char* Fl_Menu_::text() const
|
||||
<BR> const char* Fl_Menu_::text(int i) const</A></H4>
|
||||
Returns the title of the last item chosen, or of item <TT>i</TT>.
|
||||
<H4><A name=Fl_Menu_.size>int Fl_Menu_::size() const</A></H4>
|
||||
This returns <TT>menu()->size()</TT>, which is how many entries are in
|
||||
the array, not counting the <TT>NULL</TT> ending, but including all
|
||||
submenus titles and the <TT>NULL</TT>'s that end them. If the menu is <TT>
|
||||
NULL</TT> this returns zero.
|
||||
<H4><A name=Fl_Menu_.add>int Fl_Menu_::add(const char *,const char
|
||||
*,Fl_Callback *,void *v=0,int f=0)
|
||||
<BR> int Fl_Menu_::add(const char *)</A></H4>
|
||||
The first form adds a new menu item, with a <TT>title</TT> string, <TT>
|
||||
shortcut</TT> string, <TT>callback</TT>, argument to the callback, and
|
||||
flags. If <TT>menu()</TT> was originally set with <TT>NULL</TT> then
|
||||
space is allocated for the new item. If instead you gave it an array
|
||||
then the array must have enough empty space for the new item. The
|
||||
title string is copied, but the shortcut is not.
|
||||
<P>The second form splits the string at any | characters and then does <TT>
|
||||
add(s,0,0,0,0)</TT> with each section. This is often useful if you are
|
||||
just using the value, and is compatable with some Forms programs. </P>
|
||||
<P>Text is a string of the form "foo/bar/baz", this example will result
|
||||
in a submenu called "foo" and one in that called "bar" and and entry
|
||||
called "baz". The text is copied to new memory and can be freed. The
|
||||
other arguments are copied into the menu item unchanged. </P>
|
||||
<P>If an item exists already with that name then it is replaced with
|
||||
this new one. Otherwise this new one is added to the end of the
|
||||
correct menu or submenu. The return value is the offset into the array
|
||||
that the new entry was placed at. </P>
|
||||
<P>No bounds checking is done, the table must be big enough for all the
|
||||
entries you plan to add. Don't forget that there is a <TT>NULL</TT>
|
||||
terminator on the end, and the first time a item is added to a submenu
|
||||
three items are added (the title and the <TT>NULL</TT> terminator, as
|
||||
well as the actual menu item) </P>
|
||||
<P>The return value is the index into the array that the entry was put. </P>
|
||||
<H4><A name=Fl_Menu_.clear>void Fl_Menu_::clear()</A></H4>
|
||||
Delete all the menu items. Don't do this if you used <TT>menu(x)</TT>
|
||||
to set it to your own array. You should do this before destroying the <TT>
|
||||
Fl_Menu_</TT> widget if it uses it's own array.
|
||||
<H4><A name=Fl_Menu_.replace>void Fl_Menu_::replace(int n, const char *)</A>
|
||||
</H4>
|
||||
Changes the text of item <TT>n</TT>. The passed string is copied.
|
||||
<H4><A name=Fl_Menu_.remove>void Fl_Menu_::remove(int n)</A></H4>
|
||||
Deletes item <TT>n</TT> from the menu.
|
||||
<H4><A name=Fl_Menu_.shortcut>void Fl_Menu_::shortcut(int i, int n);</A></H4>
|
||||
Changes the shortcut of item <TT>i</TT> to <TT>n</TT>.
|
||||
<H4><A name=Fl_Menu_.mode>void Fl_Menu_::mode(int i,int x);</A></H4>
|
||||
Changes the flags of item <TT>i</TT>.
|
||||
<H4><A name=Fl_Menu_.textcolor>Fl_Color Fl_Menu_::textcolor() const
|
||||
<BR> void Fl_Menu_::textcolor(Fl_Color)</A></H4>
|
||||
Get or set the current color of menu item labels.
|
||||
<H4><A name=Fl_Menu_.textfont>Fl_Font Fl_Menu_::textfont() const
|
||||
<BR> void Fl_Menu_::textfont(Fl_Font)</A></H4>
|
||||
Get or set the current font of menu item labels.
|
||||
<H4><A name=Fl_Menu_.textsize>uchar Fl_Menu_::textsize() const
|
||||
<BR> void Fl_Menu_::textsize(uchar)</A></H4>
|
||||
Get or set the font size of menu item labels.
|
||||
<H4><A name=Fl_Menu_.down_box>Fl_Boxtype Fl_Menu_::down_box() const
|
||||
<BR> void Fl_Menu_::down_box(Fl_Boxtype)</A></H4>
|
||||
This box type is used to surround the currently-selected items in the
|
||||
menus. If this is <TT>FL_NO_BOX</TT> then it acts like <TT>
|
||||
FL_THIN_UP_BOX</TT> and <TT>selection_color()</TT> acts like <TT>
|
||||
FL_WHITE</TT>, for back compatability. </BODY></HTML>
|
||||
@@ -1,85 +1,63 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Menu_Bar">class Fl_Menu_Bar</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Menu_">Fl_Menu_</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Menu_Bar>class Fl_Menu_Bar</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Menu_.html#Fl_Menu_>Fl_Menu_</A>
|
||||
|
|
||||
+----<b>Fl_Menu_Bar</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Menu_Bar.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
This widget provides a standard menubar interface. Usually you will
|
||||
put this widget along the top edge of your window. The height of the
|
||||
widget should be 30 for the menu titles to draw correctly with the default
|
||||
font.
|
||||
|
||||
<p>The items on the bar and the menus they bring up are defined by a
|
||||
single <a href="#Fl_Menu_Item"><tt>Fl_Menu_Item</tt></a> array. Because a
|
||||
<tt>Fl_Menu_Item</tt> array defines a hierarchy, the top level menu defines the
|
||||
items in the menubar, while the submenus define the pull-down menus.
|
||||
Sub-sub menus and lower pop up to the right of the submenus.
|
||||
|
||||
<p><img src=menubar.gif>
|
||||
|
||||
<P>If there is an item in the top menu that is not a title of a
|
||||
submenu, then it acts like a "button" in the menubar. Clicking on
|
||||
it will pick it.
|
||||
|
||||
<P>When the user picks an item off the menu, the item's callback is
|
||||
done with the menubar as the <tt>Fl_Widget*</tt> argument. If the item
|
||||
does not have a callback the menubar's callback is done instead.
|
||||
|
||||
<p>Submenus will also pop up in response to shortcuts indicated by
|
||||
putting a '&' character in the name field of the menu item. If you
|
||||
put a '&' character in a top-level "button" then the shortcut picks
|
||||
it. The '&' character in submenus is ignored until the menu is popped
|
||||
up.
|
||||
|
||||
<p>Typing the <tt>shortcut()</tt> of any of the menu items will cause callbacks
|
||||
exactly the same as when you pick the item with the mouse.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Menu_Bar.Fl_Menu_Bar">Fl_Menu_Bar</a>
|
||||
<li><a href="#Fl_Menu_Bar.~Fl_Menu_Bar">~Fl_Menu_Bar</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Menu_Bar.Fl_Menu_Bar">Fl_Menu_Bar::Fl_Menu_Bar(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Menu_Bar</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_UP_BOX</tt>.
|
||||
|
||||
<p>The constructor sets <tt>menu()</tt> to <tt>NULL</tt>. See <a
|
||||
href="#Fl_Menu_"><tt>Fl_Menu_</tt></a> for the methods to set or change
|
||||
the menu.
|
||||
|
||||
<P><tt>labelsize()</tt>, <tt>labelfont()</tt>, and
|
||||
<tt>labelcolor()</tt> are used to control how the menubar items are
|
||||
drawn. They are initialized from the <tt>Fl_Menu</tt> static
|
||||
variables, but you can change them if desired.
|
||||
|
||||
<p><tt>label()</tt> is ignored unless you change <tt>align()</tt> to
|
||||
put it outside the menubar.
|
||||
|
||||
<h4><a name="Fl_Menu_Bar.~Fl_Menu_Bar">virtual Fl_Menu_Bar::~Fl_Menu_Bar()</a></h4>
|
||||
|
||||
The destructor removes the <tt>Fl_Menu_Bar</tt> widget and all of its menu items.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Menu_Bar</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Menu_Bar.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
This widget provides a standard menubar interface. Usually you will
|
||||
put this widget along the top edge of your window. The height of the
|
||||
widget should be 30 for the menu titles to draw correctly with the
|
||||
default font.
|
||||
<P>The items on the bar and the menus they bring up are defined by a
|
||||
single <A href=Fl_Menu_Item.html#Fl_Menu_Item><TT>Fl_Menu_Item</TT></A>
|
||||
array. Because a <TT>Fl_Menu_Item</TT> array defines a hierarchy, the
|
||||
top level menu defines the items in the menubar, while the submenus
|
||||
define the pull-down menus. Sub-sub menus and lower pop up to the right
|
||||
of the submenus. </P>
|
||||
<P><IMG src=./menubar.gif></P>
|
||||
<P>If there is an item in the top menu that is not a title of a
|
||||
submenu, then it acts like a "button" in the menubar. Clicking on it
|
||||
will pick it. </P>
|
||||
<P>When the user picks an item off the menu, the item's callback is
|
||||
done with the menubar as the <TT>Fl_Widget*</TT> argument. If the item
|
||||
does not have a callback the menubar's callback is done instead. </P>
|
||||
<P>Submenus will also pop up in response to shortcuts indicated by
|
||||
putting a ''character in the name field of the menu item. If you put a
|
||||
''character in a top-level "button" then the shortcut picks it. The
|
||||
''character in submenus is ignored until the menu is popped up. </P>
|
||||
<P>Typing the <TT>shortcut()</TT> of any of the menu items will cause
|
||||
callbacks exactly the same as when you pick the item with the mouse. </P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Menu_Bar.Fl_Menu_Bar>Fl_Menu_Bar</A></LI>
|
||||
<LI><A href=#Fl_Menu_Bar.~Fl_Menu_Bar>~Fl_Menu_Bar</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Menu_Bar.Fl_Menu_Bar>Fl_Menu_Bar::Fl_Menu_Bar(int x, int
|
||||
y, int w, int h, const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Menu_Bar</TT> widget using the given position,
|
||||
size, and label string. The default boxtype is <TT>FL_UP_BOX</TT>.
|
||||
<P>The constructor sets <TT>menu()</TT> to <TT>NULL</TT>. See <A href=Fl_Menu_.html#Fl_Menu_>
|
||||
<TT>Fl_Menu_</TT></A> for the methods to set or change the menu. </P>
|
||||
<P><TT>labelsize()</TT>, <TT>labelfont()</TT>, and <TT>labelcolor()</TT>
|
||||
are used to control how the menubar items are drawn. They are
|
||||
initialized from the <TT>Fl_Menu</TT> static variables, but you can
|
||||
change them if desired. </P>
|
||||
<P><TT>label()</TT> is ignored unless you change <TT>align()</TT> to
|
||||
put it outside the menubar. </P>
|
||||
<H4><A name=Fl_Menu_Bar.~Fl_Menu_Bar>virtual Fl_Menu_Bar::~Fl_Menu_Bar()</A>
|
||||
</H4>
|
||||
The destructor removes the <TT>Fl_Menu_Bar</TT> widget and all of its
|
||||
menu items. </BODY></HTML>
|
||||
@@ -1,101 +1,79 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Menu_Button">class Fl_Menu_Button</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Menu_">Fl_Menu_</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Menu_Button>class Fl_Menu_Button</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Menu_.html#Fl_Menu_>Fl_Menu_</A>
|
||||
|
|
||||
+----<b>Fl_Menu_Button</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Menu_Button.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
This is a button that when pushed pops up a menu (or hierarchy of
|
||||
menus) defined by an array of <a href="#Fl_Menu_Item"><tt>Fl_Menu_Item</tt></a>
|
||||
objects.
|
||||
|
||||
<P><img src=menu_button.gif>
|
||||
|
||||
<p>Normally any mouse button will pop up a menu and it is lined up
|
||||
below the button as shown in the picture. However an <tt>Fl_Menu_Button</tt>
|
||||
may also control a pop-up menu. This is done by setting the
|
||||
<tt>type()</tt>,
|
||||
see below.
|
||||
|
||||
<p>The menu will also pop up in response to shortcuts indicated by
|
||||
putting a '&' character in the <tt>label()</tt>.
|
||||
|
||||
<p>Typing the <tt>shortcut()</tt> of any of the menu items will cause
|
||||
+----<B>Fl_Menu_Button</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Menu_Button.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
This is a button that when pushed pops up a menu (or hierarchy of
|
||||
menus) defined by an array of <A href=Fl_Menu_Item.html#Fl_Menu_Item><TT>
|
||||
Fl_Menu_Item</TT></A> objects.
|
||||
<P><IMG src=./menu_button.gif></P>
|
||||
<P>Normally any mouse button will pop up a menu and it is lined up
|
||||
below the button as shown in the picture. However an <TT>Fl_Menu_Button</TT>
|
||||
may also control a pop-up menu. This is done by setting the <TT>type()</TT>
|
||||
, see below. </P>
|
||||
<P>The menu will also pop up in response to shortcuts indicated by
|
||||
putting a ''character in the <TT>label()</TT>. </P>
|
||||
<P>Typing the <TT>shortcut()</TT> of any of the menu items will cause
|
||||
callbacks exactly the same as when you pick the item with the mouse.
|
||||
The '&' character in menu item names are only looked at when the menu
|
||||
is popped up, however.
|
||||
|
||||
<P>When the user picks an item off the menu, the item's callback is
|
||||
done with the menu_button as the <tt>Fl_Widget*</tt> argument. If the item
|
||||
does not have a callback the menu_button's callback is done instead.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Menu_Button.Fl_Menu_Button">Fl_Menu_Button</a>
|
||||
<li><a href="#Fl_Menu_Button.~Fl_Menu_Button">~Fl_Menu_Button</a>
|
||||
<li><a href="#Fl_Menu_Button.popup">popup</a>
|
||||
<li><a href="#Fl_Menu_Button.type">type</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Menu_Button.Fl_Menu_Button">Fl_Menu_Button::Fl_Menu_Button(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Menu_Button</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_UP_BOX</tt>.
|
||||
|
||||
<p>The constructor sets <tt>menu()</tt> to <tt>NULL</tt>. See <a
|
||||
href="#Fl_Menu_"><tt>Fl_Menu_</tt></a> for the methods to set or change
|
||||
the menu.
|
||||
|
||||
<h4><a name="Fl_Menu_Button.~Fl_Menu_Button">virtual Fl_Menu_Button::~Fl_Menu_Button()</a></h4>
|
||||
|
||||
The destructor removes the <tt>Fl_Menu_Button</tt> widget and all of its menu items.
|
||||
|
||||
<h4><a name="Fl_Menu_Button.popup">const Fl_Menu* Fl_Menu_Button::popup()</a></h4>
|
||||
|
||||
Act exactly as though the user clicked the button or typed the shortcut
|
||||
key. The menu appears, it waits for the user to pick an item, and if
|
||||
they pick one it sets <tt>value()</tt> and does the callback or sets
|
||||
<tt>changed()</tt> as described above. The menu item is returned or
|
||||
<tt>NULL<tt> if the user dismisses the menu.
|
||||
|
||||
<h4><a name="Fl_Menu_Button.type">void Fl_Widget::type(uchar)</a></h4>
|
||||
|
||||
If <tt>type()</tt> is zero a normal menu button is produced. If it is
|
||||
nonzero then this is a pop-up menu. The bits in <tt>type()</tt>
|
||||
indicate what mouse buttons pop up the menu. For convienece the
|
||||
constants <tt>Fl_Menu_Button::POPUP1, POPUP2, POPUP3, POPUP12, POPUP13,
|
||||
POPUP23</tt>, and <tt>POPUP123</tt> are defined.
|
||||
<tt>Fl_Menu_Button::POPUP3</tt> is usually what you want.
|
||||
|
||||
<p>A popup menu button is invisible and does not interfere with any
|
||||
events other than the mouse button specified (and any shortcuts). The
|
||||
widget can be stretched to cover all your other widgets by putting it last
|
||||
in the hierarchy so it is "on top". You can also make several widgets
|
||||
covering different areas for context-sensitive popup menus.
|
||||
|
||||
<p>The popup menus appear with the cursor pointing at the previously
|
||||
selected item. This is a <i>feature</i>. If you don't like it, do
|
||||
<tt>value(0)</tt> after the menu items are picked to forget the current
|
||||
item.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
The ''character in menu item names are only looked at when the menu is
|
||||
popped up, however. </P>
|
||||
<P>When the user picks an item off the menu, the item's callback is
|
||||
done with the menu_button as the <TT>Fl_Widget*</TT> argument. If the
|
||||
item does not have a callback the menu_button's callback is done
|
||||
instead. </P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Menu_Button.Fl_Menu_Button>Fl_Menu_Button</A></LI>
|
||||
<LI><A href=#Fl_Menu_Button.~Fl_Menu_Button>~Fl_Menu_Button</A></LI>
|
||||
<LI><A href=#Fl_Menu_Button.popup>popup</A></LI>
|
||||
<LI><A href=#Fl_Menu_Button.type>type</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Menu_Button.Fl_Menu_Button>
|
||||
Fl_Menu_Button::Fl_Menu_Button(int x, int y, int w, int h, const char
|
||||
*label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Menu_Button</TT> widget using the given position,
|
||||
size, and label string. The default boxtype is <TT>FL_UP_BOX</TT>.
|
||||
<P>The constructor sets <TT>menu()</TT> to <TT>NULL</TT>. See <A href=Fl_Menu_.html#Fl_Menu_>
|
||||
<TT>Fl_Menu_</TT></A> for the methods to set or change the menu. </P>
|
||||
<H4><A name=Fl_Menu_Button.~Fl_Menu_Button>virtual
|
||||
Fl_Menu_Button::~Fl_Menu_Button()</A></H4>
|
||||
The destructor removes the <TT>Fl_Menu_Button</TT> widget and all of
|
||||
its menu items.
|
||||
<H4><A name=Fl_Menu_Button.popup>const Fl_Menu* Fl_Menu_Button::popup()</A>
|
||||
</H4>
|
||||
Act exactly as though the user clicked the button or typed the
|
||||
shortcut key. The menu appears, it waits for the user to pick an item,
|
||||
and if they pick one it sets <TT>value()</TT> and does the callback or
|
||||
sets <TT>changed()</TT> as described above. The menu item is returned
|
||||
or <TT>NULL<TT>if the user dismisses the menu.
|
||||
<H4><A name=Fl_Menu_Button.type>void Fl_Widget::type(uchar)</A></H4>
|
||||
If <TT>type()</TT> is zero a normal menu button is produced. If it is
|
||||
nonzero then this is a pop-up menu. The bits in <TT>type()</TT>
|
||||
indicate what mouse buttons pop up the menu. For convienece the
|
||||
constants <TT>Fl_Menu_Button::POPUP1, POPUP2, POPUP3, POPUP12, POPUP13,
|
||||
POPUP23</TT>, and <TT>POPUP123</TT> are defined. <TT>
|
||||
Fl_Menu_Button::POPUP3</TT> is usually what you want.
|
||||
<P>A popup menu button is invisible and does not interfere with any
|
||||
events other than the mouse button specified (and any shortcuts). The
|
||||
widget can be stretched to cover all your other widgets by putting it
|
||||
last in the hierarchy so it is "on top". You can also make several
|
||||
widgets covering different areas for context-sensitive popup menus. </P>
|
||||
<P>The popup menus appear with the cursor pointing at the previously
|
||||
selected item. This is a <I>feature</I>. If you don't like it, do <TT>
|
||||
value(0)</TT> after the menu items are picked to forget the current
|
||||
item. </P>
|
||||
</TT></TT></BODY></HTML>
|
||||
+268
-339
File diff suppressed because it is too large
Load Diff
@@ -1,59 +1,45 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Menu_Window">class Fl_Menu_Window</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Single_Window">Fl_Single_Window</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Menu_Window>class Fl_Menu_Window</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Single_Window.html#Fl_Single_Window>Fl_Single_Window</A>
|
||||
|
|
||||
+----<b>Fl_Menu_Window</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Menu_Window.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Menu_Window</tt> widget is a window type used for menus. By
|
||||
default the window is drawn in the hardware overlay planes if they are
|
||||
available so that the menu don't force the rest of the window to
|
||||
redraw.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Menu_Window.Fl_Menu_Window">Fl_Menu_Window</a>
|
||||
<li><a href="#Fl_Menu_Window.~Fl_Menu_Window">~Fl_Menu_Window</a>
|
||||
<li><a href="#Fl_Menu_Window.clear_overlay">clear_overlay</a>
|
||||
<li><a href="#Fl_Menu_Window.set_overlay">set_overlay</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Menu_Window.Fl_Menu_Window">Fl_Menu_Window::Fl_Menu_Window(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Menu_Window</tt> widget using the given position, size, and
|
||||
label string.
|
||||
|
||||
<h4><a name="Fl_Menu_Window.~Fl_Menu_Window">virtual Fl_Menu_Window::~Fl_Menu_Window()</a></h4>
|
||||
|
||||
Destroys the window and all of its children.
|
||||
|
||||
<h4><a name="Fl_Menu_Window.clear_overlay">Fl_Menu_Window::clear_overlay();</a></h4>
|
||||
|
||||
Tells FLTK to use normal drawing planes instead of overlay planes. This is
|
||||
usually necessary if your menu contains multi-color pixmaps.
|
||||
|
||||
<h4><a name="Fl_Menu_Window.set_overlay">Fl_Menu_Window::set_overlay()</a></h4>
|
||||
|
||||
Tells FLTK to use hardware overlay planes if they are available.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Menu_Window</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Menu_Window.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Menu_Window</TT> widget is a window type used for menus. By
|
||||
default the window is drawn in the hardware overlay planes if they are
|
||||
available so that the menu don't force the rest of the window to
|
||||
redraw.
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Menu_Window.Fl_Menu_Window>Fl_Menu_Window</A></LI>
|
||||
<LI><A href=#Fl_Menu_Window.~Fl_Menu_Window>~Fl_Menu_Window</A></LI>
|
||||
<LI><A href=#Fl_Menu_Window.clear_overlay>clear_overlay</A></LI>
|
||||
<LI><A href=#Fl_Menu_Window.set_overlay>set_overlay</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Menu_Window.Fl_Menu_Window>
|
||||
Fl_Menu_Window::Fl_Menu_Window(int x, int y, int w, int h, const char
|
||||
*label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Menu_Window</TT> widget using the given position,
|
||||
size, and label string.
|
||||
<H4><A name=Fl_Menu_Window.~Fl_Menu_Window>virtual
|
||||
Fl_Menu_Window::~Fl_Menu_Window()</A></H4>
|
||||
Destroys the window and all of its children.
|
||||
<H4><A name=Fl_Menu_Window.clear_overlay>
|
||||
Fl_Menu_Window::clear_overlay();</A></H4>
|
||||
Tells FLTK to use normal drawing planes instead of overlay planes.
|
||||
This is usually necessary if your menu contains multi-color pixmaps.
|
||||
<H4><A name=Fl_Menu_Window.set_overlay>Fl_Menu_Window::set_overlay()</A></H4>
|
||||
Tells FLTK to use hardware overlay planes if they are available. </BODY>
|
||||
</HTML>
|
||||
@@ -1,73 +1,56 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Multi_Browser">class Fl_Multi_Browser</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Browser">Fl_Browser</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Multi_Browser>class Fl_Multi_Browser</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Browser.html#Fl_Browser>Fl_Browser</A>
|
||||
|
|
||||
+----<b>Fl_Multi_Browser</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Multi_Browser.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Multi_Browser</tt> class is a subclass of
|
||||
<tt>Fl_Browser</tt> which lets the user select any set of the lines.
|
||||
The user interface is Macintosh style: clicking an item turns off all
|
||||
the others and selects that one, dragging selects all the items the
|
||||
mouse moves over, and shift + click toggles the items. This is
|
||||
different then how forms did it. Normally the callback is done when
|
||||
the user releases the mouse, but you can change this with
|
||||
<tt>when()</tt>.
|
||||
|
||||
<p>See <a href="#Fl_Browser"><tt>Fl_Browser</tt></a> for methods to add
|
||||
and remove lines from the browser.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Multi_Browser.Fl_Multi_Browser">Fl_Multi_Browser</a>
|
||||
<li><a href="#Fl_Multi_Browser.~Fl_Multi_Browser">~Fl_Multi_Browser</a>
|
||||
<li><a href="#Fl_Multi_Browser.deselect">deselect</a>
|
||||
<li><a href="#Fl_Multi_Browser.select">select</a>
|
||||
<li><a href="#Fl_Multi_Browser.value">value</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Multi_Browser.Fl_Multi_Browser">Fl_Multi_Browser::Fl_Multi_Browser(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Multi_Browser</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_DOWN_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Multi_Browser.~Fl_Multi_Browser">virtual Fl_Multi_Browser::~Fl_Multi_Browser()</a></h4>
|
||||
|
||||
The destructor <i>also deletes all the items in the list</i>.
|
||||
|
||||
<h4><a name="Fl_Multi_Browser.deselect">int Fl_Browser::deselect()</a></h4>
|
||||
|
||||
Deselects all lines.
|
||||
|
||||
<h4><a name="Fl_Multi_Browser.select">int Fl_Browser::select(int,int=1)<br>
|
||||
int Fl_Browser::selected(int) const</a></h4>
|
||||
|
||||
Selects one or more lines or gets the current selection state of a line.
|
||||
|
||||
<h4><a name="Fl_Multi_Browser.value">int Fl_Browser::value() const<br>
|
||||
void Fl_Browser::value(int)</a></h4>
|
||||
|
||||
Selects a single line or gets the last toggled line. This returns zero
|
||||
if no line has been toggled, so be aware that this can happen in a callback.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Multi_Browser</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Multi_Browser.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Multi_Browser</TT> class is a subclass of <TT>Fl_Browser</TT>
|
||||
which lets the user select any set of the lines. The user interface
|
||||
is Macintosh style: clicking an item turns off all the others and
|
||||
selects that one, dragging selects all the items the mouse moves over,
|
||||
and shift + click toggles the items. This is different then how forms
|
||||
did it. Normally the callback is done when the user releases the
|
||||
mouse, but you can change this with <TT>when()</TT>.
|
||||
<P>See <A href=Fl_Browser.html#Fl_Browser><TT>Fl_Browser</TT></A> for
|
||||
methods to add and remove lines from the browser. </P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Multi_Browser.Fl_Multi_Browser>Fl_Multi_Browser</A></LI>
|
||||
<LI><A href=#Fl_Multi_Browser.~Fl_Multi_Browser>~Fl_Multi_Browser</A></LI>
|
||||
<LI><A href=#Fl_Multi_Browser.deselect>deselect</A></LI>
|
||||
<LI><A href=#Fl_Multi_Browser.select>select</A></LI>
|
||||
<LI><A href=#Fl_Multi_Browser.value>value</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Multi_Browser.Fl_Multi_Browser>
|
||||
Fl_Multi_Browser::Fl_Multi_Browser(int x, int y, int w, int h, const
|
||||
char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Multi_Browser</TT> widget using the given
|
||||
position, size, and label string. The default boxtype is <TT>FL_DOWN_BOX</TT>
|
||||
.
|
||||
<H4><A name=Fl_Multi_Browser.~Fl_Multi_Browser>virtual
|
||||
Fl_Multi_Browser::~Fl_Multi_Browser()</A></H4>
|
||||
The destructor <I>also deletes all the items in the list</I>.
|
||||
<H4><A name=Fl_Multi_Browser.deselect>int Fl_Browser::deselect()</A></H4>
|
||||
Deselects all lines.
|
||||
<H4><A name=Fl_Multi_Browser.select>int Fl_Browser::select(int,int=1)
|
||||
<BR> int Fl_Browser::selected(int) const</A></H4>
|
||||
Selects one or more lines or gets the current selection state of a
|
||||
line.
|
||||
<H4><A name=Fl_Multi_Browser.value>int Fl_Browser::value() const
|
||||
<BR> void Fl_Browser::value(int)</A></H4>
|
||||
Selects a single line or gets the last toggled line. This returns zero
|
||||
if no line has been toggled, so be aware that this can happen in a
|
||||
callback. </BODY></HTML>
|
||||
@@ -1,53 +1,43 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Multiline_Input">class Fl_Multiline_Input</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Input">Fl_Input</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Multiline_Input>class Fl_Multiline_Input</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=functions.html#Fl_Input>Fl_Input</A>
|
||||
|
|
||||
+----<b>Fl_Multiline_Input</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Input.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
This input field displays '\n' characters as new lines rather than ^J,
|
||||
and accepts the Return, Tab, and up and down arrow keys. This is for
|
||||
editing multiline text.
|
||||
|
||||
<p>This is far from the nirvana of text editors, and is probably only
|
||||
good for small bits of text, 10 lines at most. I think FLTK can be
|
||||
used to write a powerful text editor, but it is not going to be a
|
||||
built-in feature. Powerful text editors in a toolkit are a big source
|
||||
of bloat.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Multiline_Input.Fl_Multiline_Input">Fl_Multiline_Input</a>
|
||||
<li><a href="#Fl_Multiline_Input.~Fl_Multiline_Input">~Fl_Multiline_Input</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Multiline_Input.Fl_Multiline_Input">Fl_Multiline_Input::Fl_Multiline_Input(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Multiline_Input</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_DOWN_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Multiline_Input.~Fl_Multiline_Input">virtual Fl_Multiline_Input::~Fl_Multiline_Input()</a></h4>
|
||||
|
||||
Destroys the widget and any value associated with it.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Multiline_Input</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Input.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
This input field displays '\n' characters as new lines rather than ^J,
|
||||
and accepts the Return, Tab, and up and down arrow keys. This is for
|
||||
editing multiline text.
|
||||
<P>This is far from the nirvana of text editors, and is probably only
|
||||
good for small bits of text, 10 lines at most. I think FLTK can be
|
||||
used to write a powerful text editor, but it is not going to be a
|
||||
built-in feature. Powerful text editors in a toolkit are a big source
|
||||
of bloat. </P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Multiline_Input.Fl_Multiline_Input>Fl_Multiline_Input</A>
|
||||
</LI>
|
||||
<LI><A href=#Fl_Multiline_Input.~Fl_Multiline_Input>~Fl_Multiline_Input</A>
|
||||
</LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Multiline_Input.Fl_Multiline_Input>
|
||||
Fl_Multiline_Input::Fl_Multiline_Input(int x, int y, int w, int h,
|
||||
const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Multiline_Input</TT> widget using the given
|
||||
position, size, and label string. The default boxtype is <TT>FL_DOWN_BOX</TT>
|
||||
.
|
||||
<H4><A name=Fl_Multiline_Input.~Fl_Multiline_Input>virtual
|
||||
Fl_Multiline_Input::~Fl_Multiline_Input()</A></H4>
|
||||
Destroys the widget and any value associated with it. </BODY></HTML>
|
||||
@@ -1,46 +1,38 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Multiline_Output">class Fl_Multiline_Output</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Output">Fl_Output</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Multiline_Output>class Fl_Multiline_Output</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Output.html#Fl_Output>Fl_Output</A>
|
||||
|
|
||||
+----<b>Fl_Multiline_Output</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Multiline_Output.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
This widget is a subclass of <tt>Fl_Output</tt> that displays multiple lines
|
||||
of text. It also displays tab characters as whitespace to the next column.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Multiline_Output.Fl_Multiline_Output">Fl_Multiline_Output</a>
|
||||
<li><a href="#Fl_Multiline_Output.~Fl_Multiline_Output">~Fl_Multiline_Output</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Multiline_Output.Fl_Multiline_Output">Fl_Multiline_Output::Fl_Multiline_Output(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Multiline_Output</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_DOWN_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Multiline_Output.~Fl_Multiline_Output">virtual Fl_Multiline_Output::~Fl_Multiline_Output()</a></h4>
|
||||
|
||||
Destroys the widget and any value associated with it.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Multiline_Output</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Multiline_Output.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
This widget is a subclass of <TT>Fl_Output</TT> that displays multiple
|
||||
lines of text. It also displays tab characters as whitespace to the
|
||||
next column.
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Multiline_Output.Fl_Multiline_Output>Fl_Multiline_Output</A>
|
||||
</LI>
|
||||
<LI><A href=#Fl_Multiline_Output.~Fl_Multiline_Output>
|
||||
~Fl_Multiline_Output</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Multiline_Output.Fl_Multiline_Output>
|
||||
Fl_Multiline_Output::Fl_Multiline_Output(int x, int y, int w, int h,
|
||||
const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Multiline_Output</TT> widget using the given
|
||||
position, size, and label string. The default boxtype is <TT>FL_DOWN_BOX</TT>
|
||||
.
|
||||
<H4><A name=Fl_Multiline_Output.~Fl_Multiline_Output>virtual
|
||||
Fl_Multiline_Output::~Fl_Multiline_Output()</A></H4>
|
||||
Destroys the widget and any value associated with it. </BODY></HTML>
|
||||
+78
-106
@@ -1,108 +1,80 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Output">class Fl_Output</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Input_">Fl_Input_</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Output>class Fl_Output</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Input_.html#Fl_Input_>Fl_Input_</A>
|
||||
|
|
||||
+----<b>Fl_Output</b>
|
||||
+----<B>Fl_Output</B>
|
||||
|
|
||||
+----<a href="#Fl_Multiline_Output">Fl_Multiline_Output</a>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Output.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
This widget displays a piece of text. When you set the <tt>value()</tt>,
|
||||
<tt>Fl_Output</tt> does a <tt>strcpy()</tt> to it's own storage, which is useful for
|
||||
program-generated values. The user may select portions of the text
|
||||
using the mouse and paste the contents into other fields or programs.
|
||||
|
||||
<p><img src=text.gif>
|
||||
|
||||
<p>There is a single subclass, <a
|
||||
href="#Fl_Multiline_Output">Fl_Multiline_Output</a>, which allows you to
|
||||
display multiple lines of text.
|
||||
|
||||
<p>The text may contain any characters except \0, and will correctly
|
||||
display anything, using ^X notation for unprintable control characters
|
||||
and \nnn notation for unprintable characters with the high bit set. It
|
||||
assummes the font can draw any characters in the ISO-Latin1 character
|
||||
set.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Output.Fl_Output">Fl_Output</a>
|
||||
<li><a href="#Fl_Output.~Fl_Output">~Fl_Output</a>
|
||||
<li><a href="#Fl_Output.cursor_color">cursor_color</a>
|
||||
<li><a href="#Fl_Output.index">index</a>
|
||||
<li><a href="#Fl_Output.size">size</a>
|
||||
<li><a href="#Fl_Output.textcolor">textcolor</a>
|
||||
<li><a href="#Fl_Output.textfont">textfont</a>
|
||||
<li><a href="#Fl_Output.textsize">textsize</a>
|
||||
<li><a href="#Fl_Output.value">value</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Output.Fl_Output">Fl_Output::Fl_Output(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Output</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_DOWN_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Output.~Fl_Output">virtual Fl_Output::~Fl_Output()</a></h4>
|
||||
|
||||
Destroys the widget and any value associated with it.
|
||||
|
||||
<h4><a name="Fl_Output.value">const char *Fl_Output::value() const<br>
|
||||
int Fl_Output::value(const char*)<br>
|
||||
int Fl_Output::value(const char*, int)</a></h4>
|
||||
|
||||
The first form returns the current value, which is a pointer to the
|
||||
internal buffer and is valid only until the value is changed.
|
||||
|
||||
<p>The second two forms change the text and set the mark and the point
|
||||
to the end of it. The string is copied to the internal buffer. Passing
|
||||
<tt>NULL</tt> is the same as "". This returns non-zero if the new
|
||||
value is different than the current one. You can use the second
|
||||
version to directly set the length if you know it already or want to
|
||||
put nul's in the text.
|
||||
|
||||
<h4><a name="Fl_Output.size">int Fl_Output::size() const</a></h4>
|
||||
|
||||
Returns the number of characters in <tt>value()</tt>. This may be greater than
|
||||
<tt>strlen(value())</tt> if there are nul characters in it.
|
||||
|
||||
<h4><a name="Fl_Output.index">char Fl_Output::index(int) const</a></h4>
|
||||
|
||||
Same as <tt>value()[n]</tt>, but may be faster in plausible implementations.
|
||||
No bounds checking is done.
|
||||
|
||||
<h4><a name="Fl_Output.textcolor">Fl_Color Fl_Output::textcolor() const<br>
|
||||
void Fl_Output::textcolor(Fl_Color)</a></h4>
|
||||
|
||||
Gets or sets the color of the text in the input field.
|
||||
|
||||
<h4><a name="Fl_Output.textfont">Fl_Font Fl_Output::textfont() const<br>
|
||||
void Fl_Output::textfont(Fl_Font)</a></h4>
|
||||
|
||||
Gets or sets the font of the text in the input field.
|
||||
|
||||
<h4><a name="Fl_Output.textsize">uchar Fl_Output::textsize() const<br>
|
||||
void Fl_Output::textsize(uchar)</a></h4>
|
||||
|
||||
Gets or sets the size of the text in the input field.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<A href=Fl_Multiline_Output.html#Fl_Multiline_Output>Fl_Multiline_Output</A>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Output.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
This widget displays a piece of text. When you set the <TT>value()</TT>
|
||||
, <TT>Fl_Output</TT> does a <TT>strcpy()</TT> to it's own storage,
|
||||
which is useful for program-generated values. The user may select
|
||||
portions of the text using the mouse and paste the contents into other
|
||||
fields or programs.
|
||||
<CENTER><IMG src=./text.gif></CENTER>
|
||||
<P>There is a single subclass, <A href=Fl_Multiline_Output.html#Fl_Multiline_Output>
|
||||
Fl_Multiline_Output</A>, which allows you to display multiple lines of
|
||||
text. </P>
|
||||
<P>The text may contain any characters except \0, and will correctly
|
||||
display anything, using ^X notation for unprintable control characters
|
||||
and \nnn notation for unprintable characters with the high bit set. It
|
||||
assummes the font can draw any characters in the ISO-Latin1 character
|
||||
set. </P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Output.Fl_Output>Fl_Output</A></LI>
|
||||
<LI><A href=#Fl_Output.~Fl_Output>~Fl_Output</A></LI>
|
||||
<LI><A href=#Fl_Output.cursor_color>cursor_color</A></LI>
|
||||
<LI><A href=#Fl_Output.index>index</A></LI>
|
||||
<LI><A href=#Fl_Output.size>size</A></LI>
|
||||
<LI><A href=#Fl_Output.textcolor>textcolor</A></LI>
|
||||
<LI><A href=#Fl_Output.textfont>textfont</A></LI>
|
||||
<LI><A href=#Fl_Output.textsize>textsize</A></LI>
|
||||
<LI><A href=#Fl_Output.value>value</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Output.Fl_Output>Fl_Output::Fl_Output(int x, int y, int
|
||||
w, int h, const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Output</TT> widget using the given position,
|
||||
size, and label string. The default boxtype is <TT>FL_DOWN_BOX</TT>.
|
||||
<H4><A name=Fl_Output.~Fl_Output>virtual Fl_Output::~Fl_Output()</A></H4>
|
||||
Destroys the widget and any value associated with it.
|
||||
<H4><A name=Fl_Output.value>const char *Fl_Output::value() const
|
||||
<BR> int Fl_Output::value(const char*)
|
||||
<BR> int Fl_Output::value(const char*, int)</A></H4>
|
||||
The first form returns the current value, which is a pointer to the
|
||||
internal buffer and is valid only until the value is changed.
|
||||
<P>The second two forms change the text and set the mark and the point
|
||||
to the end of it. The string is copied to the internal buffer. Passing <TT>
|
||||
NULL</TT> is the same as "". This returns non-zero if the new value is
|
||||
different than the current one. You can use the second version to
|
||||
directly set the length if you know it already or want to put nul's in
|
||||
the text. </P>
|
||||
<H4><A name=Fl_Output.size>int Fl_Output::size() const</A></H4>
|
||||
Returns the number of characters in <TT>value()</TT>. This may be
|
||||
greater than <TT>strlen(value())</TT> if there are nul characters in
|
||||
it.
|
||||
<H4><A name=Fl_Output.index>char Fl_Output::index(int) const</A></H4>
|
||||
Same as <TT>value()[n]</TT>, but may be faster in plausible
|
||||
implementations. No bounds checking is done.
|
||||
<H4><A name=Fl_Output.textcolor>Fl_Color Fl_Output::textcolor() const
|
||||
<BR> void Fl_Output::textcolor(Fl_Color)</A></H4>
|
||||
Gets or sets the color of the text in the input field.
|
||||
<H4><A name=Fl_Output.textfont>Fl_Font Fl_Output::textfont() const
|
||||
<BR> void Fl_Output::textfont(Fl_Font)</A></H4>
|
||||
Gets or sets the font of the text in the input field.
|
||||
<H4><A name=Fl_Output.textsize>uchar Fl_Output::textsize() const
|
||||
<BR> void Fl_Output::textsize(uchar)</A></H4>
|
||||
Gets or sets the size of the text in the input field. </BODY></HTML>
|
||||
|
||||
@@ -1,70 +1,56 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Overlay_Window">class Fl_Overlay_Window</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Double_Window">Fl_Double_Window</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Overlay_Window>class Fl_Overlay_Window</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Double_Window.html#Fl_Double_Window>Fl_Double_Window</A>
|
||||
|
|
||||
+----<b>Fl_Overlay_Window</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Overlay_Window.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
This window provides double buffering and also the ability to draw the
|
||||
"overlay" which is another picture placed on top of the main image.
|
||||
The overlay is designed to be a rapidly-changing but simple graphic
|
||||
such as a mouse selection box. <tt>Fl_Overlay_Window</tt> uses the
|
||||
overlay planes provided by your graphics hardware if they are available.
|
||||
|
||||
<p>If no hardware support is found the overlay is simulated by drawing
|
||||
directly into the on-screen copy of the double-buffered window, and
|
||||
"erased" by copying the backbuffer over it again. This means the
|
||||
overlay will blink if you change the image in the window.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Overlay_Window.Fl_Overlay_Window">Fl_Overlay_Window</a>
|
||||
<li><a href="#Fl_Overlay_Window.~Fl_Overlay_Window">~Fl_Overlay_Window</a>
|
||||
<li><a href="#Fl_Overlay_Window.draw_overlay">draw_overlay</a>
|
||||
<li><a href="#Fl_Overlay_Window.redraw_overlay">redraw_overlay</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Overlay_Window.Fl_Overlay_Window">Fl_Overlay_Window::Fl_Overlay_Window(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Overlay_Window</tt> widget using the given position, size, and
|
||||
label (title) string.
|
||||
|
||||
<h4><a name="Fl_Overlay_Window.~Fl_Overlay_Window">virtual Fl_Overlay_Window::~Fl_Overlay_Window()</a></h4>
|
||||
|
||||
Destroys the window and all child widgets.
|
||||
|
||||
<h4><a name="Fl_Overlay_Window.">virtual void Fl_Overlay_Window::draw_overlay() = 0</a></h4>
|
||||
|
||||
You must subclass <tt>Fl_Overlay_Window</tt> and provide this method. It is
|
||||
just like a <tt>draw()</tt> method, except it draws the overlay. The overlay
|
||||
will have already been "cleared" when this is called. You can use any
|
||||
of the routines described in <a href="#Drawing"><FL/fl_draw.H></a>.
|
||||
|
||||
<h4><a name="Fl_Overlay_Window.">void Fl_Overlay_Window::redraw_overlay()</a></h4>
|
||||
|
||||
Call this to indicate that the overlay data has changed and needs to
|
||||
be redrawn. The overlay will be clear until the first time this is
|
||||
called, so if you want an initial display you must call this after
|
||||
calling <tt>show()</tt>.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Overlay_Window</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Overlay_Window.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
This window provides double buffering and also the ability to draw the
|
||||
"overlay" which is another picture placed on top of the main image. The
|
||||
overlay is designed to be a rapidly-changing but simple graphic such as
|
||||
a mouse selection box. <TT>Fl_Overlay_Window</TT> uses the overlay
|
||||
planes provided by your graphics hardware if they are available.
|
||||
<P>If no hardware support is found the overlay is simulated by drawing
|
||||
directly into the on-screen copy of the double-buffered window, and
|
||||
"erased" by copying the backbuffer over it again. This means the
|
||||
overlay will blink if you change the image in the window. </P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Overlay_Window.Fl_Overlay_Window>Fl_Overlay_Window</A></LI>
|
||||
<LI><A href=#Fl_Overlay_Window.~Fl_Overlay_Window>~Fl_Overlay_Window</A></LI>
|
||||
<LI><A href=#Fl_Overlay_Window.draw_overlay>draw_overlay</A></LI>
|
||||
<LI><A href=#Fl_Overlay_Window.redraw_overlay>redraw_overlay</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Overlay_Window.Fl_Overlay_Window>
|
||||
Fl_Overlay_Window::Fl_Overlay_Window(int x, int y, int w, int h, const
|
||||
char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Overlay_Window</TT> widget using the given
|
||||
position, size, and label (title) string.
|
||||
<H4><A name=Fl_Overlay_Window.~Fl_Overlay_Window>virtual
|
||||
Fl_Overlay_Window::~Fl_Overlay_Window()</A></H4>
|
||||
Destroys the window and all child widgets.
|
||||
<H4><A name=Fl_Overlay_Window.>virtual void
|
||||
Fl_Overlay_Window::draw_overlay() = 0</A></H4>
|
||||
You must subclass <TT>Fl_Overlay_Window</TT> and provide this method.
|
||||
It is just like a <TT>draw()</TT> method, except it draws the overlay.
|
||||
The overlay will have already been "cleared" when this is called. You
|
||||
can use any of the routines described in <A href=drawing.html#Drawing>
|
||||
<FL/fl_draw.H></A>.
|
||||
<H4><A name=Fl_Overlay_Window.>void Fl_Overlay_Window::redraw_overlay()</A>
|
||||
</H4>
|
||||
Call this to indicate that the overlay data has changed and needs to
|
||||
be redrawn. The overlay will be clear until the first time this is
|
||||
called, so if you want an initial display you must call this after
|
||||
calling <TT>show()</TT>. </BODY></HTML>
|
||||
+79
-102
@@ -1,103 +1,80 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Pack">class Fl_Pack</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Group">Fl_Group</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Pack>class Fl_Pack</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Group.html#Fl_Group>Fl_Group</A>
|
||||
|
|
||||
+----<b>Fl_Pack</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Pack.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
This widget was designed to add the functionality of compressing
|
||||
and aligning widgets.
|
||||
|
||||
<p>If <tt>type()</tt> is <tt>FL_HORIZONTAL</tt> all the children are resized to the
|
||||
height of the <tt>Fl_Pack</tt>, and are moved next to each other horizontally.
|
||||
If <tt>type()</tt> is not <tt>FL_HORIZONTAL</tt> then the children are resized to the
|
||||
width and are stacked below each other. Then the <tt>Fl_Pack</tt> resizes
|
||||
itself to surround the child widgets.
|
||||
|
||||
<p>This widget is needed for the <a href="#Fl_Tab"><tt>Fl_Tab</tt></a>. In
|
||||
addition you may want to put the <tt>Fl_Pack</tt> inside an
|
||||
<a href="#Fl_Scroll"><tt>Fl_Scroll</tt></a>.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<center>
|
||||
<table width=90%>
|
||||
<tr>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Pack.Fl_Pack">Fl_Pack</a>
|
||||
<li><a href="#Fl_Pack.~Fl_Pack">~Fl_Pack</a>
|
||||
<li><a href="#Fl_Pack.add">add</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Pack.add_resizeable">add_resizeable</a>
|
||||
<li><a href="#Fl_Pack.array">array</a>
|
||||
<li><a href="#Fl_Pack.begin">begin</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Pack.child">child</a>
|
||||
<li><a href="#Fl_Pack.children">children</a>
|
||||
<li><a href="#Fl_Pack.current">current</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Pack.end">end</a>
|
||||
<li><a href="#Fl_Pack.find">find</a>
|
||||
<li><a href="#Fl_Pack.insert">insert</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Pack.remove">remove</a>
|
||||
<li><a href="#Fl_Pack.resizeable">resizeable</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<h4><a name="Fl_Pack.Fl_Pack">Fl_Pack::Fl_Pack(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Pack</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_NO_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Pack.~Fl_Pack">virtual Fl_Pack::~Fl_Pack()</a></h4>
|
||||
|
||||
The destructor <i>also deletes all the children</i>. This allows a
|
||||
whole tree to be deleted at once, without having to keep a pointer to all
|
||||
the children in the user code. A kludge has been done so the
|
||||
<tt>Fl_Pack</tt> and all of it's children can be automatic (local)
|
||||
variables, but you must declare the <tt>Fl_Pack</tt> <i>first</i>, so
|
||||
that it is destroyed last.
|
||||
|
||||
<h4><a name="Fl_Pack.spacing">int Fl_Pack::spacing() const<br>
|
||||
void Fl_Pack::spacing(int)</a></h4>
|
||||
|
||||
Gets or sets the number of extra pixels of blank space that are added between
|
||||
the children.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Pack</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Pack.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
This widget was designed to add the functionality of compressing and
|
||||
aligning widgets.
|
||||
<P>If <TT>type()</TT> is <TT>FL_HORIZONTAL</TT> all the children are
|
||||
resized to the height of the <TT>Fl_Pack</TT>, and are moved next to
|
||||
each other horizontally. If <TT>type()</TT> is not <TT>FL_HORIZONTAL</TT>
|
||||
then the children are resized to the width and are stacked below each
|
||||
other. Then the <TT>Fl_Pack</TT> resizes itself to surround the child
|
||||
widgets. </P>
|
||||
<P>This widget is needed for the <A href=#Fl_Tab><TT>Fl_Tab</TT></A>.
|
||||
In addition you may want to put the <TT>Fl_Pack</TT> inside an <A href=Fl_Scroll.html#Fl_Scroll>
|
||||
<TT>Fl_Scroll</TT></A>. </P>
|
||||
<H3>Methods</H3>
|
||||
<CENTER>
|
||||
<TABLE width=90%>
|
||||
<TR><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Pack.Fl_Pack>Fl_Pack</A></LI>
|
||||
<LI><A href=#Fl_Pack.~Fl_Pack>~Fl_Pack</A></LI>
|
||||
<LI><A href=#Fl_Pack.add>add</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Pack.add_resizeable>add_resizeable</A></LI>
|
||||
<LI><A href=#Fl_Pack.array>array</A></LI>
|
||||
<LI><A href=#Fl_Pack.begin>begin</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Pack.child>child</A></LI>
|
||||
<LI><A href=#Fl_Pack.children>children</A></LI>
|
||||
<LI><A href=#Fl_Pack.current>current</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Pack.end>end</A></LI>
|
||||
<LI><A href=#Fl_Pack.find>find</A></LI>
|
||||
<LI><A href=#Fl_Pack.insert>insert</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Pack.remove>remove</A></LI>
|
||||
<LI><A href=#Fl_Pack.resizeable>resizeable</A></LI>
|
||||
</UL>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
<H4><A name=Fl_Pack.Fl_Pack>Fl_Pack::Fl_Pack(int x, int y, int w, int
|
||||
h, const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Pack</TT> widget using the given position, size,
|
||||
and label string. The default boxtype is <TT>FL_NO_BOX</TT>.
|
||||
<H4><A name=Fl_Pack.~Fl_Pack>virtual Fl_Pack::~Fl_Pack()</A></H4>
|
||||
The destructor <I>also deletes all the children</I>. This allows a
|
||||
whole tree to be deleted at once, without having to keep a pointer to
|
||||
all the children in the user code. A kludge has been done so the <TT>
|
||||
Fl_Pack</TT> and all of it's children can be automatic (local)
|
||||
variables, but you must declare the <TT>Fl_Pack</TT><I>first</I>, so
|
||||
that it is destroyed last.
|
||||
<H4><A name=Fl_Pack.spacing>int Fl_Pack::spacing() const
|
||||
<BR> void Fl_Pack::spacing(int)</A></H4>
|
||||
Gets or sets the number of extra pixels of blank space that are added
|
||||
between the children. </BODY></HTML>
|
||||
@@ -1,97 +1,69 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Positioner">class Fl_Positioner</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Widget">Fl_Widget</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Positioner>class Fl_Positioner</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Widget.html#Fl_Widget>Fl_Widget</A>
|
||||
|
|
||||
+----<b>Fl_Positioner</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Positioner.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
This class is provided for Forms compatibility. It provides 2D input.
|
||||
It would be useful if this could be put atop another widget so that the
|
||||
crosshairs are on top, but this is not implemented. The color of the
|
||||
crosshairs is <tt>selection_color()</tt>.
|
||||
|
||||
<p><img src=positioner.gif>
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<center>
|
||||
<table width=90%>
|
||||
<tr>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Positioner.Fl_Positioner">Fl_Positioner</a>
|
||||
<li><a href="#Fl_Positioner.~Fl_Positioner">~Fl_Positioner</a>
|
||||
<li><a href="#Fl_Positioner.value">value</a>
|
||||
<li><a href="#Fl_Positioner.xbounds">xbounds</a>
|
||||
<li><a href="#Fl_Positioner.xstep">xstep</a>
|
||||
<li><a href="#Fl_Positioner.xvalue">xvalue</a>
|
||||
<li><a href="#Fl_Positioner.ybounds">ybounds</a>
|
||||
<li><a href="#Fl_Positioner.ystep">ystep</a>
|
||||
<li><a href="#Fl_Positioner.yvalue">yvalue</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<h4><a name="Fl_Positioner.Fl_Positioner">Fl_Positioner::Fl_Positioner(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Positioner</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_NO_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Positioner.~Fl_Positioner">virtual Fl_Positioner::~Fl_Positioner()</a></h4>
|
||||
|
||||
Deletes the widget.
|
||||
|
||||
<h4><a name="Fl_Positioner.value">void Fl_Positioner::value(float *x, float *y) const</a></h4>
|
||||
|
||||
Returns the current position in <tt>x</tt> and <tt>y</tt>.
|
||||
|
||||
<h4><a name="Fl_Positioner.xbounds">void xbounds(float *xmin, float *xmax)<br>
|
||||
void xbounds(float xmin, float xmax)</a></h4>
|
||||
|
||||
Gets or sets the X axis bounds.
|
||||
|
||||
<h4><a name="Fl_Positioner.xstep">void xstep(float x)</a></h4>
|
||||
|
||||
Sets the stepping value for the X axis.
|
||||
|
||||
<h4><a name="Fl_Positioner.xvalue">float Fl_Positioner::xvalue(void) const<br>
|
||||
void Fl_Positioner::xvalue(float x)</a></h4>
|
||||
|
||||
Gets or sets the X axis coordinate.
|
||||
|
||||
<h4><a name="Fl_Positioner.ybounds">void ybounds(float *ymin, float *ymay)<br>
|
||||
void ybounds(float ymin, float ymay)</a></h4>
|
||||
|
||||
Gets or sets the Y axis bounds.
|
||||
|
||||
<h4><a name="Fl_Positioner.ystep">void ystep(float y)</a></h4>
|
||||
|
||||
Sets the stepping value for the Y axis.
|
||||
|
||||
<h4><a name="Fl_Positioner.yvalue">float Fl_Positioner::yvalue(void) const<br>
|
||||
void Fl_Positioner::yvalue(float y)</a></h4>
|
||||
|
||||
Gets or sets the Y axis coordinate.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Positioner</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Positioner.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
This class is provided for Forms compatibility. It provides 2D input.
|
||||
It would be useful if this could be put atop another widget so that the
|
||||
crosshairs are on top, but this is not implemented. The color of the
|
||||
crosshairs is <TT>selection_color()</TT>.
|
||||
<P><IMG src=./positioner.gif></P>
|
||||
<H3>Methods</H3>
|
||||
<CENTER>
|
||||
<TABLE width=90%>
|
||||
<TR><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Positioner.Fl_Positioner>Fl_Positioner</A></LI>
|
||||
<LI><A href=#Fl_Positioner.~Fl_Positioner>~Fl_Positioner</A></LI>
|
||||
<LI><A href=#Fl_Positioner.value>value</A></LI>
|
||||
<LI><A href=#Fl_Positioner.xbounds>xbounds</A></LI>
|
||||
<LI><A href=#Fl_Positioner.xstep>xstep</A></LI>
|
||||
<LI><A href=#Fl_Positioner.xvalue>xvalue</A></LI>
|
||||
<LI><A href=#Fl_Positioner.ybounds>ybounds</A></LI>
|
||||
<LI><A href=#Fl_Positioner.ystep>ystep</A></LI>
|
||||
<LI><A href=#Fl_Positioner.yvalue>yvalue</A></LI>
|
||||
</UL>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
<H4><A name=Fl_Positioner.Fl_Positioner>
|
||||
Fl_Positioner::Fl_Positioner(int x, int y, int w, int h, const char
|
||||
*label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Positioner</TT> widget using the given position,
|
||||
size, and label string. The default boxtype is <TT>FL_NO_BOX</TT>.
|
||||
<H4><A name=Fl_Positioner.~Fl_Positioner>virtual
|
||||
Fl_Positioner::~Fl_Positioner()</A></H4>
|
||||
Deletes the widget.
|
||||
<H4><A name=Fl_Positioner.value>void Fl_Positioner::value(float *x,
|
||||
float *y) const</A></H4>
|
||||
Returns the current position in <TT>x</TT> and <TT>y</TT>.
|
||||
<H4><A name=Fl_Positioner.xbounds>void xbounds(float *xmin, float *xmax)
|
||||
<BR> void xbounds(float xmin, float xmax)</A></H4>
|
||||
Gets or sets the X axis bounds.
|
||||
<H4><A name=Fl_Positioner.xstep>void xstep(float x)</A></H4>
|
||||
Sets the stepping value for the X axis.
|
||||
<H4><A name=Fl_Positioner.xvalue>float Fl_Positioner::xvalue(void) const
|
||||
<BR> void Fl_Positioner::xvalue(float x)</A></H4>
|
||||
Gets or sets the X axis coordinate.
|
||||
<H4><A name=Fl_Positioner.ybounds>void ybounds(float *ymin, float *ymay)
|
||||
<BR> void ybounds(float ymin, float ymay)</A></H4>
|
||||
Gets or sets the Y axis bounds.
|
||||
<H4><A name=Fl_Positioner.ystep>void ystep(float y)</A></H4>
|
||||
Sets the stepping value for the Y axis.
|
||||
<H4><A name=Fl_Positioner.yvalue>float Fl_Positioner::yvalue(void) const
|
||||
<BR> void Fl_Positioner::yvalue(float y)</A></H4>
|
||||
Gets or sets the Y axis coordinate. </BODY></HTML>
|
||||
@@ -1,45 +1,34 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Repeat_Button">class Fl_Repeat_Button</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre><a href="#Fl_Button">Fl_Button</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Repeat_Button>class Fl_Repeat_Button</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE><A href=Fl_Button.html#Fl_Button>Fl_Button</A>
|
||||
|
|
||||
+----<b>Fl_Repeat_Button</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>#include <FL/Fl_Repeat_Button.H></pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Repeat_Button</tt> is a subclass of <tt>Fl_Button</tt> that
|
||||
generates a callback when it is pressed and then repeatedly generates
|
||||
callbacks as long as it is held down. The speed of the repeat is fixed
|
||||
and depends on the implementation.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Repeat_Button.Fl_Repeat_Button">Fl_Repeat_Button</a>
|
||||
<li><a href="#Fl_Repeat_Button.~Fl_Repeat_Button">~Fl_Repeat_Button</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Repeat_Button.Fl_Repeat_Button">Fl_Repeat_Button::Fl_Repeat_Button(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Repeat_Button</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_UP_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Repeat_Button.~Fl_Repeat_Button">virtual Fl_Repeat_Button::~Fl_Repeat_Button()</a></h4>
|
||||
|
||||
Deletes the button.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Repeat_Button</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>#include <FL/Fl_Repeat_Button.H></PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Repeat_Button</TT> is a subclass of <TT>Fl_Button</TT> that
|
||||
generates a callback when it is pressed and then repeatedly generates
|
||||
callbacks as long as it is held down. The speed of the repeat is fixed
|
||||
and depends on the implementation.
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Repeat_Button.Fl_Repeat_Button>Fl_Repeat_Button</A></LI>
|
||||
<LI><A href=#Fl_Repeat_Button.~Fl_Repeat_Button>~Fl_Repeat_Button</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Repeat_Button.Fl_Repeat_Button>
|
||||
Fl_Repeat_Button::Fl_Repeat_Button(int x, int y, int w, int h, const
|
||||
char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Repeat_Button</TT> widget using the given
|
||||
position, size, and label string. The default boxtype is <TT>FL_UP_BOX</TT>
|
||||
.
|
||||
<H4><A name=Fl_Repeat_Button.~Fl_Repeat_Button>virtual
|
||||
Fl_Repeat_Button::~Fl_Repeat_Button()</A></H4>
|
||||
Deletes the button. </BODY></HTML>
|
||||
@@ -1,44 +1,33 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Return_Button">class Fl_Return_Button</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre><a href="#Fl_Button">Fl_Button</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Return_Button>class Fl_Return_Button</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE><A href=Fl_Button.html#Fl_Button>Fl_Button</A>
|
||||
|
|
||||
+----<b>Fl_Return_Button</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>#include <FL/Fl_Return_Button.H></pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Return_Button</tt> is a subclass of <tt>Fl_Button</tt> that
|
||||
generates a callback when it is pressed or when the user presses the
|
||||
Enter key. A carriage-return symbol is drawn next to the button label.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Return_Button.Fl_Return_Button">Fl_Return_Button</a>
|
||||
<li><a href="#Fl_Return_Button.~Fl_Return_Button">~Fl_Return_Button</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Return_Button.Fl_Return_Button">Fl_Return_Button::Fl_Return_Button(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Return_Button</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_UP_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Return_Button.~Fl_Return_Button">virtual Fl_Return_Button::~Fl_Return_Button()</a></h4>
|
||||
|
||||
Deletes the button.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Return_Button</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>#include <FL/Fl_Return_Button.H></PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Return_Button</TT> is a subclass of <TT>Fl_Button</TT> that
|
||||
generates a callback when it is pressed or when the user presses the
|
||||
Enter key. A carriage-return symbol is drawn next to the button label.
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Return_Button.Fl_Return_Button>Fl_Return_Button</A></LI>
|
||||
<LI><A href=#Fl_Return_Button.~Fl_Return_Button>~Fl_Return_Button</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Return_Button.Fl_Return_Button>
|
||||
Fl_Return_Button::Fl_Return_Button(int x, int y, int w, int h, const
|
||||
char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Return_Button</TT> widget using the given
|
||||
position, size, and label string. The default boxtype is <TT>FL_UP_BOX</TT>
|
||||
.
|
||||
<H4><A name=Fl_Return_Button.~Fl_Return_Button>virtual
|
||||
Fl_Return_Button::~Fl_Return_Button()</A></H4>
|
||||
Deletes the button. </BODY></HTML>
|
||||
@@ -1,46 +1,32 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Roller">class Fl_Roller</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Valuator">Fl_Valuator</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Roller>class Fl_Roller</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Valuator.html#Fl_Valuator>Fl_Valuator</A>
|
||||
|
|
||||
+----<b>Fl_Roller</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Roller.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Roller</tt> widget is a "dolly" control commonly used to
|
||||
move 3D objects.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Roller.Fl_Roller">Fl_Roller</a>
|
||||
<li><a href="#Fl_Roller.~Fl_Roller">~Fl_Roller</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Roller.Fl_Roller">Fl_Roller::Fl_Roller(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Roller</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_NO_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Roller.~Fl_Roller">virtual Fl_Roller::~Fl_Roller()</a></h4>
|
||||
|
||||
Destroys the valuator.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Roller</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Roller.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Roller</TT> widget is a "dolly" control commonly used to
|
||||
move 3D objects.
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Roller.Fl_Roller>Fl_Roller</A></LI>
|
||||
<LI><A href=#Fl_Roller.~Fl_Roller>~Fl_Roller</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Roller.Fl_Roller>Fl_Roller::Fl_Roller(int x, int y, int
|
||||
w, int h, const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Roller</TT> widget using the given position,
|
||||
size, and label string. The default boxtype is <TT>FL_NO_BOX</TT>.
|
||||
<H4><A name=Fl_Roller.~Fl_Roller>virtual Fl_Roller::~Fl_Roller()</A></H4>
|
||||
Destroys the valuator. </BODY></HTML>
|
||||
@@ -1,53 +1,40 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Round_Button">class Fl_Round_Button</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Button">Fl_Button</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Round_Button>class Fl_Round_Button</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Button.html#Fl_Button>Fl_Button</A>
|
||||
|
|
||||
+----<b>Fl_Round_Button</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Round_Button.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
Buttons generate callbacks when they are clicked by the user. You
|
||||
control exactly when and how by changing the values for <tt>type()</tt> and
|
||||
<tt>when()</tt>.
|
||||
|
||||
<P>The <tt>Fl_Round_Button</tt> subclass display the "on" state by
|
||||
turning on a light, rather than drawing pushed in. The shape of the
|
||||
"light" is initially set to FL_ROUND_DOWN_BOX. The color of the
|
||||
light when on is controlled with <tt>selection_color()<tt>, which defaults to
|
||||
FL_RED.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Round_Button.Fl_Round_Button">Fl_Round_Button</a>
|
||||
<li><a href="#Fl_Round_Button.~Fl_Round_Button">~Fl_Round_Button</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Round_Button.Fl_Round_Button">Fl_Round_Button::Fl_Round_Button(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Round_Button</tt> widget using the given position,
|
||||
size, and label string.
|
||||
|
||||
<h4><a name="Fl_Round_Button.~Fl_Round_Button">Fl_Round_Button::~Fl_Round_Button()</a></h4>
|
||||
|
||||
The destructor deletes the check button.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Round_Button</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Round_Button.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
Buttons generate callbacks when they are clicked by the user. You
|
||||
control exactly when and how by changing the values for <TT>type()</TT>
|
||||
and <TT>when()</TT>.
|
||||
<P>The <TT>Fl_Round_Button</TT> subclass display the "on" state by
|
||||
turning on a light, rather than drawing pushed in. The shape of the
|
||||
"light" is initially set to FL_ROUND_DOWN_BOX. The color of the light
|
||||
when on is controlled with <TT>selection_color()<TT>, which defaults to
|
||||
FL_RED. </TT></TT></P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Round_Button.Fl_Round_Button>Fl_Round_Button</A></LI>
|
||||
<LI><A href=#Fl_Round_Button.~Fl_Round_Button>~Fl_Round_Button</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Round_Button.Fl_Round_Button>
|
||||
Fl_Round_Button::Fl_Round_Button(int x, int y, int w, int h, const char
|
||||
*label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Round_Button</TT> widget using the given
|
||||
position, size, and label string.
|
||||
<H4><A name=Fl_Round_Button.~Fl_Round_Button>
|
||||
Fl_Round_Button::~Fl_Round_Button()</A></H4>
|
||||
The destructor deletes the check button. </BODY></HTML>
|
||||
+98
-134
@@ -1,135 +1,99 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Scroll">class Fl_Scroll</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Group">Fl_Group</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Scroll>class Fl_Scroll</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Group.html#Fl_Group>Fl_Group</A>
|
||||
|
|
||||
+----<b>Fl_Scroll</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Scroll.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
This container widget lets you maneuver around a set of widgets
|
||||
much larger than your window. If the child widgets are larger than
|
||||
the size of this object then scrollbars will appear so that you can
|
||||
scroll over to them:
|
||||
|
||||
<p><img src=Fl_Scroll.gif>
|
||||
|
||||
<p>If all of the child widgets are packed together into a solid
|
||||
rectangle then you want to set <tt>box()</tt> to <tt>FL_NO_BOX</tt> or
|
||||
one of the <tt>_FRAME</tt> types. This will result in the best output.
|
||||
However, if the child widgets are a sparse arrangment you must set
|
||||
<tt>box()</tt> to a real <tt>_BOX</tt> type. This can result in some
|
||||
blinking during redrawing, but that can be solved by using a
|
||||
<tt>Fl_Double_Window</tt>.
|
||||
|
||||
<p>This widget can also be used to pan around a single child widget
|
||||
"canvas". This child widget should be of your own class, with a
|
||||
<tt>draw()</tt> method that draws the contents. The scrolling is done
|
||||
by changing the <tt>x()</tt> and <tt>y()</tt> of the widget, so this
|
||||
child must use the <tt>x()</tt> and <tt>y()</tt> to position it's
|
||||
drawing. To speed up drawing it should test <a
|
||||
href=fl_clip><tt>fl_clip()</tt></a>.
|
||||
|
||||
<p>Another very useful child is a single <a
|
||||
href="#Fl_Pack"><tt>Fl_Pack</tt></a>, which is itself a group that
|
||||
packs it's children together and changes size to surround them.
|
||||
Filling the <tt>Fl_Pack</tt> with <a href="#Fl_Tab"><tt>Fl_Tab</tt></a>
|
||||
groups (and then putting normal widgets inside those) gives you a very
|
||||
powerful scrolling list of individually-openable panels.
|
||||
|
||||
<p>Fluid lets you create these, but you can only lay out objects that
|
||||
fit inside the <tt>Fl_Scroll</tt> without scrolling. Be sure to leave
|
||||
space for the scrollbars, as Fluid won't show these either.
|
||||
|
||||
<p><i>You cannot use <tt>Fl_Window</tt> as a child of this since the
|
||||
clipping is not conveyed to it when drawn, and it will draw over the
|
||||
scrollbars and neighboring objects.</i>
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Scroll.Fl_Scroll">Fl_Scroll</a>
|
||||
<li><a href="#Fl_Scroll.~Fl_Scroll">~Fl_Scroll</a>
|
||||
<li><a href="#Fl_Scroll.align">align</a>
|
||||
<li><a href="#Fl_Scroll.position">position</a>
|
||||
<li><a href="#Fl_Scroll.type">type</a>
|
||||
<li><a href="#Fl_Scroll.xposition">xposition</a>
|
||||
<li><a href="#Fl_Scroll.yposition">yposition</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Scroll.Fl_Scroll">Fl_Scroll::Fl_Scroll(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Scroll</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_NO_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Scroll.~Fl_Scroll">virtual Fl_Scroll::~Fl_Scroll()</a></h4>
|
||||
|
||||
The destructor <i>also deletes all the children</i>. This allows a
|
||||
whole tree to be deleted at once, without having to keep a pointer to all
|
||||
the children in the user code. A kludge has been done so the
|
||||
<tt>Fl_Scroll</tt> and all of it's children can be automatic (local)
|
||||
variables, but you must declare the <tt>Fl_Scroll</tt> <i>first</i>, so
|
||||
that it is destroyed last.
|
||||
|
||||
<h4><a name="Fl_Scroll.type">void Fl_Widget::type(int)</a></h4>
|
||||
|
||||
By default you can scroll in both directions, and the scrollbars
|
||||
disappear if the data will fit in the area of the scroll. <tt>type()</tt>
|
||||
can change this:
|
||||
|
||||
<ul>
|
||||
<li><tt>0</tt> - No scrollbars
|
||||
|
||||
<li><tt>Fl_Scroll::HORIZONTAL</tt> - Only a horizontal scrollbar.
|
||||
|
||||
<li><tt>Fl_Scroll::VERTICAL</tt> - Only a vertical scrollbar.
|
||||
|
||||
<li><tt>Fl_Scroll::BOTH</tt> - The default is both scrollbars.
|
||||
|
||||
<li><tt>Fl_Scroll::HORIZONTAL_ALWAYS</tt> - Horizontal scrollbar
|
||||
always on, vertical always off.
|
||||
|
||||
<li><tt>Fl_Scroll::VERTICAL_ALWAYS</tt> - Vertical scrollbar always on,
|
||||
horizontal always off.
|
||||
|
||||
<li><tt>Fl_Scroll::BOTH_ALWAYS</tt> - Both always on.
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Scroll.align">void Fl_Scroll::scrollbar.align(int)<br>
|
||||
void Fl_Scroll::hscrollbar.align(int)</a></h4>
|
||||
|
||||
This is used to change what side the scrollbars are drawn on. If the
|
||||
<tt>FL_ALIGN_LEFT</tt> bit is on, the vertical scrollbar is on the
|
||||
left. If the <tt>FL_ALIGN_TOP</tt> bit is on, the horizontal scrollbar
|
||||
is on the top.
|
||||
|
||||
<h4><a name="Fl_Scroll.xposition">int Fl_Scroll::xposition() const</a></h4>
|
||||
|
||||
Gets the current horizontal scrolling position.
|
||||
|
||||
<h4><a name="Fl_Scroll.yposition">int Fl_Scroll::yposition() const</a></h4>
|
||||
|
||||
Gets the current vertical scrolling position.
|
||||
|
||||
<h4><a name="Fl_Scroll.position">void Fl_Scroll::position(int w, int h)</a></h4>
|
||||
|
||||
Sets the upper-lefthand corner of the scrolling region.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Scroll</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Scroll.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
This container widget lets you maneuver around a set of widgets much
|
||||
larger than your window. If the child widgets are larger than the size
|
||||
of this object then scrollbars will appear so that you can scroll over
|
||||
to them:
|
||||
<P><IMG src=./Fl_Scroll.gif></P>
|
||||
<P>If all of the child widgets are packed together into a solid
|
||||
rectangle then you want to set <TT>box()</TT> to <TT>FL_NO_BOX</TT> or
|
||||
one of the <TT>_FRAME</TT> types. This will result in the best output.
|
||||
However, if the child widgets are a sparse arrangment you must set <TT>
|
||||
box()</TT> to a real <TT>_BOX</TT> type. This can result in some
|
||||
blinking during redrawing, but that can be solved by using a <TT>
|
||||
Fl_Double_Window</TT>. </P>
|
||||
<P>This widget can also be used to pan around a single child widget
|
||||
"canvas". This child widget should be of your own class, with a <TT>
|
||||
draw()</TT> method that draws the contents. The scrolling is done by
|
||||
changing the <TT>x()</TT> and <TT>y()</TT> of the widget, so this child
|
||||
must use the <TT>x()</TT> and <TT>y()</TT> to position it's drawing.
|
||||
To speed up drawing it should test <A href=fl_clip><TT>fl_clip()</TT></A>
|
||||
. </P>
|
||||
<P>Another very useful child is a single <A href=Fl_Pack.html#Fl_Pack><TT>
|
||||
Fl_Pack</TT></A>, which is itself a group that packs it's children
|
||||
together and changes size to surround them. Filling the <TT>Fl_Pack</TT>
|
||||
with <A href=#Fl_Tab><TT>Fl_Tab</TT></A> groups (and then putting
|
||||
normal widgets inside those) gives you a very powerful scrolling list
|
||||
of individually-openable panels. </P>
|
||||
<P>Fluid lets you create these, but you can only lay out objects that
|
||||
fit inside the <TT>Fl_Scroll</TT> without scrolling. Be sure to leave
|
||||
space for the scrollbars, as Fluid won't show these either. </P>
|
||||
<P><I>You cannot use <TT>Fl_Window</TT> as a child of this since the
|
||||
clipping is not conveyed to it when drawn, and it will draw over the
|
||||
scrollbars and neighboring objects.</I></P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Scroll.Fl_Scroll>Fl_Scroll</A></LI>
|
||||
<LI><A href=#Fl_Scroll.~Fl_Scroll>~Fl_Scroll</A></LI>
|
||||
<LI><A href=#Fl_Scroll.align>align</A></LI>
|
||||
<LI><A href=#Fl_Scroll.position>position</A></LI>
|
||||
<LI><A href=#Fl_Scroll.type>type</A></LI>
|
||||
<LI><A href=#Fl_Scroll.xposition>xposition</A></LI>
|
||||
<LI><A href=#Fl_Scroll.yposition>yposition</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Scroll.Fl_Scroll>Fl_Scroll::Fl_Scroll(int x, int y, int
|
||||
w, int h, const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Scroll</TT> widget using the given position,
|
||||
size, and label string. The default boxtype is <TT>FL_NO_BOX</TT>.
|
||||
<H4><A name=Fl_Scroll.~Fl_Scroll>virtual Fl_Scroll::~Fl_Scroll()</A></H4>
|
||||
The destructor <I>also deletes all the children</I>. This allows a
|
||||
whole tree to be deleted at once, without having to keep a pointer to
|
||||
all the children in the user code. A kludge has been done so the <TT>
|
||||
Fl_Scroll</TT> and all of it's children can be automatic (local)
|
||||
variables, but you must declare the <TT>Fl_Scroll</TT><I>first</I>, so
|
||||
that it is destroyed last.
|
||||
<H4><A name=Fl_Scroll.type>void Fl_Widget::type(int)</A></H4>
|
||||
By default you can scroll in both directions, and the scrollbars
|
||||
disappear if the data will fit in the area of the scroll. <TT>type()</TT>
|
||||
can change this:
|
||||
<UL>
|
||||
<LI><TT>0</TT> - No scrollbars </LI>
|
||||
<LI><TT>Fl_Scroll::HORIZONTAL</TT> - Only a horizontal scrollbar. </LI>
|
||||
<LI><TT>Fl_Scroll::VERTICAL</TT> - Only a vertical scrollbar. </LI>
|
||||
<LI><TT>Fl_Scroll::BOTH</TT> - The default is both scrollbars. </LI>
|
||||
<LI><TT>Fl_Scroll::HORIZONTAL_ALWAYS</TT> - Horizontal scrollbar
|
||||
always on, vertical always off. </LI>
|
||||
<LI><TT>Fl_Scroll::VERTICAL_ALWAYS</TT> - Vertical scrollbar always on,
|
||||
horizontal always off. </LI>
|
||||
<LI><TT>Fl_Scroll::BOTH_ALWAYS</TT> - Both always on. </LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Scroll.align>void Fl_Scroll::scrollbar.align(int)
|
||||
<BR> void Fl_Scroll::hscrollbar.align(int)</A></H4>
|
||||
This is used to change what side the scrollbars are drawn on. If the <TT>
|
||||
FL_ALIGN_LEFT</TT> bit is on, the vertical scrollbar is on the left.
|
||||
If the <TT>FL_ALIGN_TOP</TT> bit is on, the horizontal scrollbar is on
|
||||
the top.
|
||||
<H4><A name=Fl_Scroll.xposition>int Fl_Scroll::xposition() const</A></H4>
|
||||
Gets the current horizontal scrolling position.
|
||||
<H4><A name=Fl_Scroll.yposition>int Fl_Scroll::yposition() const</A></H4>
|
||||
Gets the current vertical scrolling position.
|
||||
<H4><A name=Fl_Scroll.position>void Fl_Scroll::position(int w, int h)</A>
|
||||
</H4>
|
||||
Sets the upper-lefthand corner of the scrolling region. </BODY></HTML>
|
||||
@@ -1,78 +1,59 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Scrollbar">class Fl_Scrollbar</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Slider">Fl_Slider</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Scrollbar>class Fl_Scrollbar</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Slider.html#Fl_Slider>Fl_Slider</A>
|
||||
|
|
||||
+----<b>Fl_Scrollbar</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Scrollbar.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Scrollbar</tt> widget displays a slider with arrow buttons
|
||||
at the ends of the scrollbar. Clicking on the arrows move up/left and
|
||||
down/right by <tt>linesize()</tt>. Scrollbars also accept
|
||||
<tt>FL_SHORTCUT</tt> events: the arrows move by <tt>linesize()</tt>,
|
||||
and vertical scrollbars take Page Up/Down (they move by the page size
|
||||
minus <tt>linesize()</tt>) and Home/End (they jump to the top or
|
||||
bottom).
|
||||
|
||||
<p>Scrollbars have <tt>step(1)</tt> preset (they always return
|
||||
integers). If desired you can set the <tt>step()</tt> to non-integer
|
||||
values. You will then have to use casts to get at the floating-point
|
||||
versions of <tt>value()</tt> from <tt>Fl_Slider</tt>.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Scrollbar.Fl_Scrollbar">Fl_Scrollbar</a>
|
||||
<li><a href="#Fl_Scrollbar.~Fl_Scrollbar">~Fl_Scrollbar</a>
|
||||
<li><a href="#Fl_Scrollbar.linesize">linesize</a>
|
||||
<li><a href="#Fl_Scrollbar.value">value</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Scrollbar.Fl_Scrollbar">Fl_Scrollbar::Fl_Scrollbar(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Scrollbar</tt> widget using the given position,
|
||||
size, and label string. You need to do <tt>type(FL_HORIZONTAL)</tt> if
|
||||
you want a horizontal scrollbar.
|
||||
|
||||
<h4><a name="Fl_Scrollbar.~Fl_Scrollbar">virtual Fl_Scrollbar::~Fl_Scrollbar()</a></h4>
|
||||
|
||||
Destroys the valuator.
|
||||
|
||||
<h4><a name="Fl_Scrollbar.linesize">int Fl_Scrollbar::linesize() const<br>
|
||||
void Fl_Scrollbar::linesize(int i)</a></h4>
|
||||
|
||||
This number controls how big the steps are that the arrow keys do. In
|
||||
addition page up/down move by the size last sent to <tt>value()</tt>
|
||||
minus one <tt>linesize()</tt>. The default is 16.
|
||||
|
||||
<h4><a name="Fl_Scrollbar.value">int Fl_Scrollbar::value()<br>
|
||||
int Fl_Scrollbar::value(int position, int size, int top, int total)</a></h4>
|
||||
|
||||
The first form returns the integer value of the scrollbar. You can get
|
||||
the floating point value with <tt>Fl_Slider::value()</tt>.
|
||||
|
||||
The second form sets <tt>value()</tt>, <tt>range()</tt>, and
|
||||
<tt>slider_size()</tt> to make a variable-sized scrollbar. You should
|
||||
call this every time your window changes size, your data changes size,
|
||||
or your scroll position changes (even if in response to a callback from
|
||||
this scrollbar). All necessary calls to <tt>redraw()</tt> are done.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Scrollbar</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Scrollbar.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Scrollbar</TT> widget displays a slider with arrow buttons
|
||||
at the ends of the scrollbar. Clicking on the arrows move up/left and
|
||||
down/right by <TT>linesize()</TT>. Scrollbars also accept <TT>
|
||||
FL_SHORTCUT</TT> events: the arrows move by <TT>linesize()</TT>, and
|
||||
vertical scrollbars take Page Up/Down (they move by the page size minus <TT>
|
||||
linesize()</TT>) and Home/End (they jump to the top or bottom).
|
||||
<P>Scrollbars have <TT>step(1)</TT> preset (they always return
|
||||
integers). If desired you can set the <TT>step()</TT> to non-integer
|
||||
values. You will then have to use casts to get at the floating-point
|
||||
versions of <TT>value()</TT> from <TT>Fl_Slider</TT>. </P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Scrollbar.Fl_Scrollbar>Fl_Scrollbar</A></LI>
|
||||
<LI><A href=#Fl_Scrollbar.~Fl_Scrollbar>~Fl_Scrollbar</A></LI>
|
||||
<LI><A href=#Fl_Scrollbar.linesize>linesize</A></LI>
|
||||
<LI><A href=#Fl_Scrollbar.value>value</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Scrollbar.Fl_Scrollbar>Fl_Scrollbar::Fl_Scrollbar(int x,
|
||||
int y, int w, int h, const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Scrollbar</TT> widget using the given position,
|
||||
size, and label string. You need to do <TT>type(FL_HORIZONTAL)</TT> if
|
||||
you want a horizontal scrollbar.
|
||||
<H4><A name=Fl_Scrollbar.~Fl_Scrollbar>virtual
|
||||
Fl_Scrollbar::~Fl_Scrollbar()</A></H4>
|
||||
Destroys the valuator.
|
||||
<H4><A name=Fl_Scrollbar.linesize>int Fl_Scrollbar::linesize() const
|
||||
<BR> void Fl_Scrollbar::linesize(int i)</A></H4>
|
||||
This number controls how big the steps are that the arrow keys do. In
|
||||
addition page up/down move by the size last sent to <TT>value()</TT>
|
||||
minus one <TT>linesize()</TT>. The default is 16.
|
||||
<H4><A name=Fl_Scrollbar.value>int Fl_Scrollbar::value()
|
||||
<BR> int Fl_Scrollbar::value(int position, int size, int top, int total)</A>
|
||||
</H4>
|
||||
The first form returns the integer value of the scrollbar. You can get
|
||||
the floating point value with <TT>Fl_Slider::value()</TT>. The second
|
||||
form sets <TT>value()</TT>, <TT>range()</TT>, and <TT>slider_size()</TT>
|
||||
to make a variable-sized scrollbar. You should call this every time
|
||||
your window changes size, your data changes size, or your scroll
|
||||
position changes (even if in response to a callback from this
|
||||
scrollbar). All necessary calls to <TT>redraw()</TT> are done. </BODY></HTML>
|
||||
@@ -1,47 +1,36 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Secret_Input">class Fl_Secret_Input</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Input">Fl_Input</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Secret_Input>class Fl_Secret_Input</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=functions.html#Fl_Input>Fl_Input</A>
|
||||
|
|
||||
+----<b>Fl_Secret_Input</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Input.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Secret_Input</tt> class is a subclass of <tt>Fl_Input</tt> that
|
||||
displays its input as a string of asterisks. This subclass is usually used
|
||||
to recieve passwords and other "secret" information.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Secret_Input.Fl_Secret_Input">Fl_Secret_Input</a>
|
||||
<li><a href="#Fl_Secret_Input.~Fl_Secret_Input">~Fl_Secret_Input</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Secret_Input.Fl_Secret_Input">Fl_Secret_Input::Fl_Secret_Input(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Secret_Input</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_DOWN_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Secret_Input.~Fl_Secret_Input">virtual Fl_Secret_Input::~Fl_Secret_Input()</a></h4>
|
||||
|
||||
Destroys the widget and any value associated with it.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Secret_Input</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Input.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Secret_Input</TT> class is a subclass of <TT>Fl_Input</TT>
|
||||
that displays its input as a string of asterisks. This subclass is
|
||||
usually used to recieve passwords and other "secret" information.
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Secret_Input.Fl_Secret_Input>Fl_Secret_Input</A></LI>
|
||||
<LI><A href=#Fl_Secret_Input.~Fl_Secret_Input>~Fl_Secret_Input</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Secret_Input.Fl_Secret_Input>
|
||||
Fl_Secret_Input::Fl_Secret_Input(int x, int y, int w, int h, const char
|
||||
*label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Secret_Input</TT> widget using the given
|
||||
position, size, and label string. The default boxtype is <TT>FL_DOWN_BOX</TT>
|
||||
.
|
||||
<H4><A name=Fl_Secret_Input.~Fl_Secret_Input>virtual
|
||||
Fl_Secret_Input::~Fl_Secret_Input()</A></H4>
|
||||
Destroys the widget and any value associated with it. </BODY></HTML>
|
||||
@@ -1,72 +1,53 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Select_Browser">class Fl_Select_Browser</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Browser">Fl_Browser</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Select_Browser>class Fl_Select_Browser</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Browser.html#Fl_Browser>Fl_Browser</A>
|
||||
|
|
||||
+----<b>Fl_Select_Browser</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Select_Browser.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Select_Browser</tt> class is a subclass of <tt>Fl_Browser</tt>
|
||||
which lets the user select a single item, or no items by clicking on
|
||||
the empty space. As long as the mouse button is held down the item
|
||||
pointed to by it is highlighted. Normally the callback is done when the
|
||||
user presses the mouse, but you can change this with <tt>when()</tt>.
|
||||
|
||||
<p>See <a href="#Fl_Browser"><tt>Fl_Browser</tt></a> for methods to add
|
||||
and remove lines from the browser.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Select_Browser.Fl_Select_Browser">Fl_Select_Browser</a>
|
||||
<li><a href="#Fl_Select_Browser.~Fl_Select_Browser">~Fl_Select_Browser</a>
|
||||
<li><a href="#Fl_Select_Browser.deselect">deselect</a>
|
||||
<li><a href="#Fl_Select_Browser.select">select</a>
|
||||
<li><a href="#Fl_Select_Browser.value">value</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Select_Browser.Fl_Select_Browser">Fl_Select_Browser::Fl_Select_Browser(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Select_Browser</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_DOWN_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Select_Browser.~Fl_Select_Browser">virtual Fl_Select_Browser::~Fl_Select_Browser()</a></h4>
|
||||
|
||||
The destructor <i>also deletes all the items in the list</i>.
|
||||
|
||||
<h4><a name="Fl_Select_Browser.deselect">int Fl_Browser::deselect()</a></h4>
|
||||
|
||||
Same as <tt>value(0)</tt>.
|
||||
|
||||
<h4><a name="Fl_Select_Browser.select">int Fl_Browser::select(int,int=1)<br>
|
||||
int Fl_Browser::selected(int) const</a></h4>
|
||||
|
||||
You can use these for compatibility with
|
||||
<a href="#Fl_Multi_Browser"><tt>Fl_Multi_Browser</tt></a>. If you
|
||||
turn on the selection of more than one line the results are
|
||||
unpredictable.
|
||||
|
||||
<h4><a name="Fl_Select_Browser.value">int Fl_Browser::value() const</a></h4>
|
||||
|
||||
Returns the number of the highlighted item, or zero if none. Notice
|
||||
that this is going to be zero except <i>during</i> a callback!
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Select_Browser</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Select_Browser.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Select_Browser</TT> class is a subclass of <TT>Fl_Browser</TT>
|
||||
which lets the user select a single item, or no items by clicking on
|
||||
the empty space. As long as the mouse button is held down the item
|
||||
pointed to by it is highlighted. Normally the callback is done when the
|
||||
user presses the mouse, but you can change this with <TT>when()</TT>.
|
||||
<P>See <A href=Fl_Browser.html#Fl_Browser><TT>Fl_Browser</TT></A> for
|
||||
methods to add and remove lines from the browser. </P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Select_Browser.Fl_Select_Browser>Fl_Select_Browser</A></LI>
|
||||
<LI><A href=#Fl_Select_Browser.~Fl_Select_Browser>~Fl_Select_Browser</A></LI>
|
||||
<LI><A href=#Fl_Select_Browser.deselect>deselect</A></LI>
|
||||
<LI><A href=#Fl_Select_Browser.select>select</A></LI>
|
||||
<LI><A href=#Fl_Select_Browser.value>value</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Select_Browser.Fl_Select_Browser>
|
||||
Fl_Select_Browser::Fl_Select_Browser(int x, int y, int w, int h, const
|
||||
char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Select_Browser</TT> widget using the given
|
||||
position, size, and label string. The default boxtype is <TT>FL_DOWN_BOX</TT>
|
||||
.
|
||||
<H4><A name=Fl_Select_Browser.~Fl_Select_Browser>virtual
|
||||
Fl_Select_Browser::~Fl_Select_Browser()</A></H4>
|
||||
The destructor <I>also deletes all the items in the list</I>.
|
||||
<H4><A name=Fl_Select_Browser.deselect>int Fl_Browser::deselect()</A></H4>
|
||||
Same as <TT>value(0)</TT>.
|
||||
<H4><A name=Fl_Select_Browser.select>int Fl_Browser::select(int,int=1)
|
||||
<BR> int Fl_Browser::selected(int) const</A></H4>
|
||||
You can use these for compatibility with <A href=Fl_Multi_Browser.html#Fl_Multi_Browser>
|
||||
<TT>Fl_Multi_Browser</TT></A>. If you turn on the selection of more
|
||||
than one line the results are unpredictable.
|
||||
<H4><A name=Fl_Select_Browser.value>int Fl_Browser::value() const</A></H4>
|
||||
Returns the number of the highlighted item, or zero if none. Notice
|
||||
that this is going to be zero except <I>during</I> a callback! </BODY></HTML>
|
||||
@@ -1,49 +1,37 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Single_Window">class Fl_Single_Window</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Window">Fl_Window</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Single_Window>class Fl_Single_Window</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Window.html#Fl_Window>Fl_Window</A>
|
||||
|
|
||||
+----<b>Fl_Single_Window</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Single_Window.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
This is the same as <tt>Fl_Window<tt>. However, it is possible that
|
||||
some implementations will provide double-buffered windows by default.
|
||||
This subclass can be used to force single-buffering. This may be
|
||||
useful for modifying existing programs that use incremental update, or
|
||||
for some types of image data, such as a movie flipbook.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Single_Window.Fl_Single_Window">Fl_Single_Window</a>
|
||||
<li><a href="#Fl_Single_Window.~Fl_Single_Window">~Fl_Single_Window</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Single_Window.Fl_Single_Window">Fl_Single_Window::Fl_Single_Window(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Single_Window</tt> widget using the given position, size, and
|
||||
label (title) string.
|
||||
|
||||
<h4><a name="Fl_Single_Window.~Fl_Single_Window">virtual Fl_Single_Window::~Fl_Single_Window()</a></h4>
|
||||
|
||||
Destroys the window and all child widgets.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Single_Window</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Single_Window.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
This is the same as <TT>Fl_Window<TT>. However, it is possible that
|
||||
some implementations will provide double-buffered windows by default.
|
||||
This subclass can be used to force single-buffering. This may be
|
||||
useful for modifying existing programs that use incremental update, or
|
||||
for some types of image data, such as a movie flipbook.
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Single_Window.Fl_Single_Window>Fl_Single_Window</A></LI>
|
||||
<LI><A href=#Fl_Single_Window.~Fl_Single_Window>~Fl_Single_Window</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Single_Window.Fl_Single_Window>
|
||||
Fl_Single_Window::Fl_Single_Window(int x, int y, int w, int h, const
|
||||
char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Single_Window</TT> widget using the given
|
||||
position, size, and label (title) string.
|
||||
<H4><A name=Fl_Single_Window.~Fl_Single_Window>virtual
|
||||
Fl_Single_Window::~Fl_Single_Window()</A></H4>
|
||||
Destroys the window and all child widgets. </TT></TT></BODY></HTML>
|
||||
@@ -1,101 +1,77 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Slider">class Fl_Slider</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Valuator">Fl_Valuator</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Slider>class Fl_Slider</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Valuator.html#Fl_Valuator>Fl_Valuator</A>
|
||||
|
|
||||
+----<b>Fl_Slider</b>
|
||||
+----<B>Fl_Slider</B>
|
||||
|
|
||||
+----<a href="#Fl_Scrollbar">Fl_Scrollbar</a>, <a href="#Fl_Value_Slider">Fl_Value_Slider</a>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Slider.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Slider</tt> widget contains a sliding knob inside a box. It
|
||||
if often used as a scrollbar. Moving the box all the way to the
|
||||
top/left sets it to the <tt>minimum()</tt>, and to the bottom/right to
|
||||
the <tt>maximum()</tt>. The <tt>minimum()</tt> may be greater than the
|
||||
<tt>maximum()</tt> to reverse the slider direction.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Slider.Fl_Slider">Fl_Slider</a>
|
||||
<li><a href="#Fl_Slider.~Fl_Slider">~Fl_Slider</a>
|
||||
<li><a href="#Fl_Slider.scrollvalue">scrollvalue</a>
|
||||
<li><a href="#Fl_Slider.slider">slider</a>
|
||||
<li><a href="#Fl_Slider.slider_size">slider_size</a>
|
||||
<li><a href="#Fl_Slider.type">type</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Slider.Fl_Slider">Fl_Slider::Fl_Slider(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Slider</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_NO_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Slider.~Fl_Slider">virtual Fl_Slider::~Fl_Slider()</a></h4>
|
||||
|
||||
Destroys the valuator.
|
||||
|
||||
<h4><a name="Fl_Slider.scrollvalue">int Fl_Slider::scrollvalue(int windowtop, int windowsize, int first, int totalsize)</a></h4>
|
||||
|
||||
Returns <a href="#Fl_Scrollbar.value"><tt>Fl_Scrollbar::value()</tt></a>.
|
||||
|
||||
<h4><a name="Fl_Slider.">Fl_Boxtype Fl_Slider::slider() const<br>
|
||||
void Fl_Slider::slider(Fl_Boxtype)</a></h4>
|
||||
|
||||
Set the type of box to draw for the moving part of the slider. The
|
||||
color of the moving part (or of the notch in it for the nice sliders)
|
||||
is controlled by <tt>selection_color()</tt>. The default value of zero
|
||||
causes the slider to figure out what to draw from <tt>box()</tt>.
|
||||
|
||||
<h4><a name="Fl_Slider.slider_size">float Fl_Slider::slider_size() const<br>
|
||||
void Fl_Slider::slider_size(float)</a></h4>
|
||||
|
||||
Get or set the dimensions of the moving piece of slider. This is the
|
||||
fraction of the size of the entire widget. If you set this to 1 then
|
||||
the slider cannot move. The default value is .08.
|
||||
|
||||
<p>For the "fill" sliders this is the size of the area around the end
|
||||
that causes a drag effect rather than causing the slider to jump to
|
||||
the mouse.
|
||||
|
||||
<h4><a name="Fl_Slider.type">uchar Fl_Widget::type() const<br>
|
||||
void Fl_Widget::type(uchar t)</a></h4>
|
||||
|
||||
Setting this changes how the slider is drawn, which can be one of the following:
|
||||
|
||||
<ul>
|
||||
<li><tt>FL_VERTICAL</tt> - Draws a vertical slider (this is the default).
|
||||
|
||||
<li><tt>FL_HORIZONTAL</tt> - Draws a horizontal slider.
|
||||
|
||||
<li><tt>FL_VERT_FILL_SLIDER</tt> - Draws a filled vertical
|
||||
slider, useful as a progress or value meter.
|
||||
|
||||
<li><tt>FL_HOR_FILL_SLIDER</tt> - Draws a filled horizontal
|
||||
slider, useful as a progress or value meter.
|
||||
|
||||
<li><tt>FL_VERT_NICE_SLIDER</tt> - Draws a vertical slider with
|
||||
a nice looking control knob.
|
||||
|
||||
<li><tt>FL_HOR_NICE_SLIDER</tt> - Draws a horizontal slider with
|
||||
a nice looking control knob.
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<A href=Fl_Scrollbar.html#Fl_Scrollbar>Fl_Scrollbar</A>, <A href=Fl_Value_Slider.html#Fl_Value_Slider>Fl_Value_Slider</A>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Slider.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Slider</TT> widget contains a sliding knob inside a box. It
|
||||
if often used as a scrollbar. Moving the box all the way to the
|
||||
top/left sets it to the <TT>minimum()</TT>, and to the bottom/right to
|
||||
the <TT>maximum()</TT>. The <TT>minimum()</TT> may be greater than the <TT>
|
||||
maximum()</TT> to reverse the slider direction.
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Slider.Fl_Slider>Fl_Slider</A></LI>
|
||||
<LI><A href=#Fl_Slider.~Fl_Slider>~Fl_Slider</A></LI>
|
||||
<LI><A href=#Fl_Slider.scrollvalue>scrollvalue</A></LI>
|
||||
<LI><A href=#Fl_Slider.slider>slider</A></LI>
|
||||
<LI><A href=#Fl_Slider.slider_size>slider_size</A></LI>
|
||||
<LI><A href=#Fl_Slider.type>type</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Slider.Fl_Slider>Fl_Slider::Fl_Slider(int x, int y, int
|
||||
w, int h, const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Slider</TT> widget using the given position,
|
||||
size, and label string. The default boxtype is <TT>FL_NO_BOX</TT>.
|
||||
<H4><A name=Fl_Slider.~Fl_Slider>virtual Fl_Slider::~Fl_Slider()</A></H4>
|
||||
Destroys the valuator.
|
||||
<H4><A name=Fl_Slider.scrollvalue>int Fl_Slider::scrollvalue(int
|
||||
windowtop, int windowsize, int first, int totalsize)</A></H4>
|
||||
Returns <A href=Fl_Scrollbar.html#Fl_Scrollbar.value><TT>
|
||||
Fl_Scrollbar::value()</TT></A>.
|
||||
<H4><A name=Fl_Slider.>Fl_Boxtype Fl_Slider::slider() const
|
||||
<BR> void Fl_Slider::slider(Fl_Boxtype)</A></H4>
|
||||
Set the type of box to draw for the moving part of the slider. The
|
||||
color of the moving part (or of the notch in it for the nice sliders)
|
||||
is controlled by <TT>selection_color()</TT>. The default value of zero
|
||||
causes the slider to figure out what to draw from <TT>box()</TT>.
|
||||
<H4><A name=Fl_Slider.slider_size>float Fl_Slider::slider_size() const
|
||||
<BR> void Fl_Slider::slider_size(float)</A></H4>
|
||||
Get or set the dimensions of the moving piece of slider. This is the
|
||||
fraction of the size of the entire widget. If you set this to 1 then
|
||||
the slider cannot move. The default value is .08.
|
||||
<P>For the "fill" sliders this is the size of the area around the end
|
||||
that causes a drag effect rather than causing the slider to jump to the
|
||||
mouse. </P>
|
||||
<H4><A name=Fl_Slider.type>uchar Fl_Widget::type() const
|
||||
<BR> void Fl_Widget::type(uchar t)</A></H4>
|
||||
Setting this changes how the slider is drawn, which can be one of the
|
||||
following:
|
||||
<UL>
|
||||
<LI><TT>FL_VERTICAL</TT> - Draws a vertical slider (this is the
|
||||
default). </LI>
|
||||
<LI><TT>FL_HORIZONTAL</TT> - Draws a horizontal slider. </LI>
|
||||
<LI><TT>FL_VERT_FILL_SLIDER</TT> - Draws a filled vertical slider,
|
||||
useful as a progress or value meter. </LI>
|
||||
<LI><TT>FL_HOR_FILL_SLIDER</TT> - Draws a filled horizontal slider,
|
||||
useful as a progress or value meter. </LI>
|
||||
<LI><TT>FL_VERT_NICE_SLIDER</TT> - Draws a vertical slider with a nice
|
||||
looking control knob. </LI>
|
||||
<LI><TT>FL_HOR_NICE_SLIDER</TT> - Draws a horizontal slider with a
|
||||
nice looking control knob. </LI>
|
||||
</UL>
|
||||
</BODY></HTML>
|
||||
+63
-84
@@ -1,85 +1,64 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Tabs">class Fl_Tabs</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Group">Fl_Group</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Tabs>class Fl_Tabs</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Group.html#Fl_Group>Fl_Group</A>
|
||||
|
|
||||
+----<b>Fl_Tabs</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Tab.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Tabs</tt> widget is the "file card tabs" interface that
|
||||
allows you to put lots and lots of buttons and switches in a panel, as
|
||||
popularized by many toolkits.
|
||||
|
||||
<p><img src=tabs.gif>
|
||||
|
||||
<p>Clicking the tab makes a child <tt>visible()</tt> (by calling
|
||||
<tt>show()</tt> on it) and all other children are invisible (by calling
|
||||
<tt>hide()</tt> on them). Usually the children are <a
|
||||
href="#Fl_Group"><tt>Fl_Group<tt></a> widgets containing several
|
||||
widgets themselves.
|
||||
|
||||
<p>Each child makes a card, and it's <tt>label()</tt> is printed on the
|
||||
card tab (including the label font and style). The color of that child
|
||||
is used to color the card as well. Currently this only draws nicely if
|
||||
you set <a href="#Fl_Widget.box"><tt>box()</tt></a> to the default
|
||||
<tt>FL_THIN_UP_BOX</tt> or to <tt>FL_FLAT_BOX</tt>, which gets rid of
|
||||
the edges drawn on the sides and bottom.
|
||||
|
||||
<p>The size of the tabs is controlled by the bounding box of the
|
||||
children (there should be some space between the children and the edge
|
||||
of the <tt>Fl_Tabs</tt>), and the tabs may be placed "inverted" on the
|
||||
bottom, this is determined by which gap is larger. It is easiest to
|
||||
lay this out in fluid, using the fluid browser to select each child
|
||||
group and resize them until the tabs look the way you want them to.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Tab.Fl_Tab">Fl_Tab</a>
|
||||
<li><a href="#Fl_Tab.~Fl_Tab">~Fl_Tab</a>
|
||||
<li><a href="#Fl_Tab.value">value</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Tab.Fl_Tab">Fl_Tab::Fl_Tab(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Tab</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_THIN_UP_BOX</tt>.
|
||||
|
||||
<p>Use <a href="#Fl_Group.add"><tt>add(Fl_Widget *)</tt></a> to add
|
||||
each child (which is probably itself a <tt>Fl_Group</tt>). The
|
||||
children should be sized to stay away from the top or bottom edge of
|
||||
the <tt>Fl_Tabs</tt>, which is where the tabs are drawn.
|
||||
|
||||
<h4><a name="Fl_Tab.~Fl_Tab">virtual Fl_Tab::~Fl_Tab()</a></h4>
|
||||
|
||||
The destructor <i>also deletes all the children</i>. This allows a
|
||||
whole tree to be deleted at once, without having to keep a pointer to all
|
||||
the children in the user code. A kludge has been done so the
|
||||
<tt>Fl_Tab</tt> and all of it's children can be automatic (local)
|
||||
variables, but you must declare the <tt>Fl_Tab</tt> <i>first</i>, so
|
||||
that it is destroyed last.
|
||||
|
||||
<h4><a name="Fl_Tab.value">Fl_Widget* Fl_Tabs::value() const<br>
|
||||
int Fl_Tabs::value(Fl_Widget*)</a></h4>
|
||||
|
||||
Gets or sets the currently visible widget/tab.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Tabs</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Tab.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Tabs</TT> widget is the "file card tabs" interface that
|
||||
allows you to put lots and lots of buttons and switches in a panel, as
|
||||
popularized by many toolkits.
|
||||
<P><IMG src=./tabs.gif></P>
|
||||
<P>Clicking the tab makes a child <TT>visible()</TT> (by calling <TT>
|
||||
show()</TT> on it) and all other children are invisible (by calling <TT>
|
||||
hide()</TT> on them). Usually the children are <A href=Fl_Group.html#Fl_Group>
|
||||
<TT>Fl_Group<TT></TT></A> widgets containing several widgets
|
||||
themselves. </P>
|
||||
<P>Each child makes a card, and it's <TT>label()</TT> is printed on the
|
||||
card tab (including the label font and style). The color of that child
|
||||
is used to color the card as well. Currently this only draws nicely if
|
||||
you set <A href=Fl_Widget.html#Fl_Widget.box><TT>box()</TT></A> to the
|
||||
default <TT>FL_THIN_UP_BOX</TT> or to <TT>FL_FLAT_BOX</TT>, which gets
|
||||
rid of the edges drawn on the sides and bottom. </P>
|
||||
<P>The size of the tabs is controlled by the bounding box of the
|
||||
children (there should be some space between the children and the edge
|
||||
of the <TT>Fl_Tabs</TT>), and the tabs may be placed "inverted" on the
|
||||
bottom, this is determined by which gap is larger. It is easiest to
|
||||
lay this out in fluid, using the fluid browser to select each child
|
||||
group and resize them until the tabs look the way you want them to. </P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Tab.Fl_Tab>Fl_Tab</A></LI>
|
||||
<LI><A href=#Fl_Tab.~Fl_Tab>~Fl_Tab</A></LI>
|
||||
<LI><A href=#Fl_Tab.value>value</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Tab.Fl_Tab>Fl_Tab::Fl_Tab(int x, int y, int w, int h,
|
||||
const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Tab</TT> widget using the given position, size,
|
||||
and label string. The default boxtype is <TT>FL_THIN_UP_BOX</TT>.
|
||||
<P>Use <A href=Fl_Group.html#Fl_Group.add><TT>add(Fl_Widget *)</TT></A>
|
||||
to add each child (which is probably itself a <TT>Fl_Group</TT>). The
|
||||
children should be sized to stay away from the top or bottom edge of
|
||||
the <TT>Fl_Tabs</TT>, which is where the tabs are drawn. </P>
|
||||
<H4><A name=Fl_Tab.~Fl_Tab>virtual Fl_Tab::~Fl_Tab()</A></H4>
|
||||
The destructor <I>also deletes all the children</I>. This allows a
|
||||
whole tree to be deleted at once, without having to keep a pointer to
|
||||
all the children in the user code. A kludge has been done so the <TT>
|
||||
Fl_Tab</TT> and all of it's children can be automatic (local)
|
||||
variables, but you must declare the <TT>Fl_Tab</TT><I>first</I>, so
|
||||
that it is destroyed last.
|
||||
<H4><A name=Fl_Tab.value>Fl_Widget* Fl_Tabs::value() const
|
||||
<BR> int Fl_Tabs::value(Fl_Widget*)</A></H4>
|
||||
Gets or sets the currently visible widget/tab. </BODY></HTML>
|
||||
+63
-83
@@ -1,85 +1,65 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Tile">class Fl_Tile</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Widget">Fl_Widget</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Tile>class Fl_Tile</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Widget.html#Fl_Widget>Fl_Widget</A>
|
||||
|
|
||||
+----<b>Fl_Tile</b>
|
||||
+----<B>Fl_Tile</B>
|
||||
|
|
||||
+----<a href="#Fl_Pack">Fl_Pack</a>, <a href="#Fl_Scroll">Fl_Scroll</a>, <a href="#Fl_Tabs">Fl_Tabs</a>, <a href="#Fl_Tile">Fl_Tile</a>, <a href="#Fl_Window">Fl_Window</a>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Tile.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Tile</tt> class lets you resize the children by dragging the
|
||||
border between them:
|
||||
|
||||
<p><img src=Fl_Tile.gif>
|
||||
|
||||
<p><tt>Fl_Tile</tt> allows objects to be resized to zero dimensions.
|
||||
To prevent this you can use the <tt>resizable()</tt> to limit where
|
||||
corners can be dragged to.
|
||||
|
||||
<p>Even though objects can be resized to zero sizes, they must
|
||||
initially have non-zero sizes so the <tt>Fl_Tile</tt> can figure out
|
||||
their layout. If desired, call <tt>position()</tt> after creating the
|
||||
children but before displaying the window to set the borders where you
|
||||
want.
|
||||
|
||||
<p>The "borders" are part of the children, an <tt>Fl_Tile<tt> does not
|
||||
draw any graphics of it's own. In the above example all the final
|
||||
children have <tt>FL_DOWN_BOX</tt> types, and the "ridges" you see are
|
||||
two adjacent <tt>FL_DOWN_BOX</tt>'s drawn next to each other.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Tile.Fl_Tile">Fl_Tile</a>
|
||||
<li><a href="#Fl_Tile.~Fl_Tile">~Fl_Tile</a>
|
||||
<li><a href="#Fl_Tile.position">position</a>
|
||||
<li><a href="#Fl_Tile.resizeable">resizeable</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Tile.Fl_Tile">Fl_Tile::Fl_Tile(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Tile</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_NO_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Tile.~Fl_Tile">virtual Fl_Tile::~Fl_Tile()</a></h4>
|
||||
|
||||
The destructor <i>also deletes all the children</i>. This allows a
|
||||
whole tree to be deleted at once, without having to keep a pointer to all
|
||||
the children in the user code. A kludge has been done so the
|
||||
<tt>Fl_Tile</tt> and all of it's children can be automatic (local)
|
||||
variables, but you must declare the <tt>Fl_Tile</tt> <i>first</i>, so
|
||||
that it is destroyed last.
|
||||
|
||||
<h4><a name="Fl_Tile.position">void Fl_Tile::position(from_x, from_y, to_x, to_y)</a></h4>
|
||||
|
||||
Drag the intersection at <tt>from_x,from_y</tt> to <tt>to_x,to_y</tt>.
|
||||
This redraws all the necessary children.
|
||||
|
||||
<h4><a name="Fl_Tile.resizeable">void Fl_Tile::resizable(Fl_Widget&)</a></h4>
|
||||
|
||||
The "resizable" child widget (which should be invisible) limits where
|
||||
the border can be dragged to. If you don't set it, it will be possible
|
||||
to drag the borders right to the edge, and thus resize objects on the
|
||||
edge to zero width or height. The <tt>resizable()</tt> widget is not
|
||||
resized by dragging any borders.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<A href=Fl_Pack.html#Fl_Pack>Fl_Pack</A>, <A href=Fl_Scroll.html#Fl_Scroll>Fl_Scroll</A>, <A href=Fl_Tabs.html#Fl_Tabs>Fl_Tabs</A>, <A href=#Fl_Tile>Fl_Tile</A>, <A href=Fl_Window.html#Fl_Window>Fl_Window</A>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Tile.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Tile</TT> class lets you resize the children by dragging
|
||||
the border between them:
|
||||
<P><IMG src=./Fl_Tile.gif></P>
|
||||
<P><TT>Fl_Tile</TT> allows objects to be resized to zero dimensions.
|
||||
To prevent this you can use the <TT>resizable()</TT> to limit where
|
||||
corners can be dragged to. </P>
|
||||
<P>Even though objects can be resized to zero sizes, they must
|
||||
initially have non-zero sizes so the <TT>Fl_Tile</TT> can figure out
|
||||
their layout. If desired, call <TT>position()</TT> after creating the
|
||||
children but before displaying the window to set the borders where you
|
||||
want. </P>
|
||||
<P>The "borders" are part of the children, an <TT>Fl_Tile<TT>does not
|
||||
draw any graphics of it's own. In the above example all the final
|
||||
children have <TT>FL_DOWN_BOX</TT> types, and the "ridges" you see are
|
||||
two adjacent <TT>FL_DOWN_BOX</TT>'s drawn next to each other. </TT></TT></P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Tile.Fl_Tile>Fl_Tile</A></LI>
|
||||
<LI><A href=#Fl_Tile.~Fl_Tile>~Fl_Tile</A></LI>
|
||||
<LI><A href=#Fl_Tile.position>position</A></LI>
|
||||
<LI><A href=#Fl_Tile.resizeable>resizeable</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Tile.Fl_Tile>Fl_Tile::Fl_Tile(int x, int y, int w, int
|
||||
h, const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Tile</TT> widget using the given position, size,
|
||||
and label string. The default boxtype is <TT>FL_NO_BOX</TT>.
|
||||
<H4><A name=Fl_Tile.~Fl_Tile>virtual Fl_Tile::~Fl_Tile()</A></H4>
|
||||
The destructor <I>also deletes all the children</I>. This allows a
|
||||
whole tree to be deleted at once, without having to keep a pointer to
|
||||
all the children in the user code. A kludge has been done so the <TT>
|
||||
Fl_Tile</TT> and all of it's children can be automatic (local)
|
||||
variables, but you must declare the <TT>Fl_Tile</TT><I>first</I>, so
|
||||
that it is destroyed last.
|
||||
<H4><A name=Fl_Tile.position>void Fl_Tile::position(from_x, from_y,
|
||||
to_x, to_y)</A></H4>
|
||||
Drag the intersection at <TT>from_x,from_y</TT> to <TT>to_x,to_y</TT>.
|
||||
This redraws all the necessary children.
|
||||
<H4><A name=Fl_Tile.resizeable>void Fl_Tile::resizable(Fl_Widget The
|
||||
"resizable" child widget (which should be invisible) limits where the
|
||||
border can be dragged to. If you don't set it, it will be possible to
|
||||
drag the borders right to the edge, and thus resize objects on the edge
|
||||
to zero width or height. The <TT>resizable()</TT> widget is not
|
||||
resized by dragging any borders. </A></H4>
|
||||
</BODY></HTML>
|
||||
+57
-80
@@ -1,81 +1,58 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Timer">class Fl_Timer</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Widget">Fl_Widget</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Timer>class Fl_Timer</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Widget.html#Fl_Widget>Fl_Widget</A>
|
||||
|
|
||||
+----<b>Fl_Timer</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Timer.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
This is provided only to emulate the Forms Timer widget. It works by
|
||||
making a timeout callback every 1/5 second. This is wasteful and
|
||||
inaccurate if you just want something to happen a fixed time in the
|
||||
future. You should directly call <a
|
||||
href="#add_timeout"><tt>Fl::add_timeout()</tt></a> instead.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Timer.Fl_Timer">Fl_Timer</a>
|
||||
<li><a href="#Fl_Timer.~Fl_Timer">~Fl_Timer</a>
|
||||
<li><a href="#Fl_Timer.direction">direction</a>
|
||||
<li><a href="#Fl_Timer.suspended">suspended</a>
|
||||
<li><a href="#Fl_Timer.value">value</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Timer.Fl_Timer">Fl_Timer::Fl_Timer(uchar type, int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Timer</tt> widget using the given type, position, size, and
|
||||
label string. The <tt>type</tt> parameter can be any of the following symbolic
|
||||
constants:
|
||||
|
||||
<ul>
|
||||
<li><tt>FL_NORMAL_TIMER</tt> - The timer just does the callback
|
||||
and displays the string "Timer" in the widget.
|
||||
|
||||
<li><tt>FL_VALUE_TIMER</tt> - The timer does the callback and
|
||||
displays the current timer value in the widget.
|
||||
|
||||
<li><tt>FL_HIDDEN_TIMER</tt> - The timer just does the callback
|
||||
and does not display anything.
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Timer.~Fl_Timer">virtual Fl_Timer::~Fl_Timer()</a></h4>
|
||||
|
||||
Destroys the timer and removes the timeout.
|
||||
|
||||
<h4><a name="Fl_Timer.direction">char direction() const<br>
|
||||
void direction(char d)</a></h4>
|
||||
|
||||
Gets or sets the direction of the timer. If the direction is zero then
|
||||
the timer will count up, otherwise it will count down from the initial
|
||||
<tt>value()</tt>.
|
||||
|
||||
<h4><a name="Fl_Timer.suspended">char suspended() const<br>
|
||||
void suspended(char d)</a></h4>
|
||||
|
||||
Gets or sets whether the timer is suspended.
|
||||
|
||||
<h4><a name="Fl_Timer.value">float value() const<br>
|
||||
void value(float)</a></h4>
|
||||
|
||||
Gets or sets the current timer value.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Timer</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Timer.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
This is provided only to emulate the Forms Timer widget. It works by
|
||||
making a timeout callback every 1/5 second. This is wasteful and
|
||||
inaccurate if you just want something to happen a fixed time in the
|
||||
future. You should directly call <A href=functions.html#add_timeout><TT>
|
||||
Fl::add_timeout()</TT></A> instead.
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Timer.Fl_Timer>Fl_Timer</A></LI>
|
||||
<LI><A href=#Fl_Timer.~Fl_Timer>~Fl_Timer</A></LI>
|
||||
<LI><A href=#Fl_Timer.direction>direction</A></LI>
|
||||
<LI><A href=#Fl_Timer.suspended>suspended</A></LI>
|
||||
<LI><A href=#Fl_Timer.value>value</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Timer.Fl_Timer>Fl_Timer::Fl_Timer(uchar type, int x, int
|
||||
y, int w, int h, const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Timer</TT> widget using the given type, position,
|
||||
size, and label string. The <TT>type</TT> parameter can be any of the
|
||||
following symbolic constants:
|
||||
<UL>
|
||||
<LI><TT>FL_NORMAL_TIMER</TT> - The timer just does the callback and
|
||||
displays the string "Timer" in the widget. </LI>
|
||||
<LI><TT>FL_VALUE_TIMER</TT> - The timer does the callback and displays
|
||||
the current timer value in the widget. </LI>
|
||||
<LI><TT>FL_HIDDEN_TIMER</TT> - The timer just does the callback and
|
||||
does not display anything. </LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Timer.~Fl_Timer>virtual Fl_Timer::~Fl_Timer()</A></H4>
|
||||
Destroys the timer and removes the timeout.
|
||||
<H4><A name=Fl_Timer.direction>char direction() const
|
||||
<BR> void direction(char d)</A></H4>
|
||||
Gets or sets the direction of the timer. If the direction is zero
|
||||
then the timer will count up, otherwise it will count down from the
|
||||
initial <TT>value()</TT>.
|
||||
<H4><A name=Fl_Timer.suspended>char suspended() const
|
||||
<BR> void suspended(char d)</A></H4>
|
||||
Gets or sets whether the timer is suspended.
|
||||
<H4><A name=Fl_Timer.value>float value() const
|
||||
<BR> void value(float)</A></H4>
|
||||
Gets or sets the current timer value. </BODY></HTML>
|
||||
+134
-180
@@ -1,182 +1,136 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Valuator">class Fl_Valuator</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Widget">Fl_Widget</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Valuator>class Fl_Valuator</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Widget.html#Fl_Widget>Fl_Widget</A>
|
||||
|
|
||||
+----<b>Fl_Valuator</b>
|
||||
+----<B>Fl_Valuator</B>
|
||||
|
|
||||
+----<a href="#Fl_Adjuster">Fl_Adjuster</a>, <a href="#Fl_Counter">Fl_Counter</a>, <a href="#Fl_Dial">Fl_Dial</a>, <a href="#Fl_Roller">Fl_Roller</a>,
|
||||
<a href="#Fl_Slider">Fl_Slider</a>, <a href="#Fl_Value_Input">Fl_Value_Input</a>, <a href="#Fl_Value_Output">Fl_Value_Output</a>,
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Valuator.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Valuator</tt> class controls a single floating-point value
|
||||
and provides a consistent interface to set the value, range, and step,
|
||||
and insures that callbacks are done the same for every object.
|
||||
|
||||
<p>There are probably more of these classes in fltk than any others:
|
||||
|
||||
<p><img src=valuators.gif>
|
||||
|
||||
<p>In the above diagram each box surrounds an actual subclass. These
|
||||
are further differentiated by setting the <a
|
||||
href=#Fl_Widget.type"><tt>type()</tt></a> of the widget to the symbolic
|
||||
value labeling the widget. The ones labelled "0" are the default
|
||||
versions with a <tt>type(0)<tt>. For consistency the symbol
|
||||
<tt>FL_VERTICAL</tt> is defined as zero.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<center>
|
||||
<table width=90%>
|
||||
<tr>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Valuator.Fl_Valuator">Fl_Valuator</a>
|
||||
<li><a href="#Fl_Valuator.~Fl_Valuator">~Fl_Valuator</a>
|
||||
<li><a href="#Fl_Valuator.changed">changed</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Valuator.clamp">clamp</a>
|
||||
<li><a href="#Fl_Valuator.clear_changed">clear_changed</a>
|
||||
<li><a href="#Fl_Valuator.format">format</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Valuator.increment">increment</a>
|
||||
<li><a href="#Fl_Valuator.maximum">maximum</a>
|
||||
<li><a href="#Fl_Valuator.minimum">minimum</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Valuator.range">range</a>
|
||||
<li><a href="#Fl_Valuator.round">round</a>
|
||||
<li><a href="#Fl_Valuator.set_changed">set_changed</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Valuator.step">step</a>
|
||||
<li><a href="#Fl_Valuator.value">value</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<h4><a name="Fl_Valuator.Fl_Valuator">Fl_Valuator::Fl_Valuator(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Valuator</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_NO_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Valuator.~Fl_Valuator">virtual Fl_Valuator::~Fl_Valuator()</a></h4>
|
||||
|
||||
Destroys the valuator.
|
||||
|
||||
<h4><a name="Fl_Valuator.value">double Fl_Valuator::value() const<br>
|
||||
int Fl_Valuator::value(double)</a></h4>
|
||||
|
||||
Get or set the current value. The new value is <i>not</i> clamped or
|
||||
otherwise changed before storing it. Use <tt>clamp()</tt> or
|
||||
<tt>round()</tt> to modify the value before calling this if you want.
|
||||
If the new value is different than the current one the object is
|
||||
redrawn. The initial value is zero.
|
||||
|
||||
<h4><a name="Fl_Valuator.minimum">double Fl_Valuator::minimum() const<br>
|
||||
void Fl_Valuator::minimum(double)</a></h4>
|
||||
|
||||
Gets or sets the minimum value for the valuator.
|
||||
|
||||
<h4><a name="Fl_Valuator.maximum">double Fl_Valuator::maximum() const<br>
|
||||
void Fl_Valuator::maximum(double)</a></h4>
|
||||
|
||||
Gets or sets the maximum value for the valuator.
|
||||
|
||||
<h4><a name="Fl_Valuator.range">void Fl_Valuator::range(double min, double max);</a></h4>
|
||||
|
||||
Sets the minimum and maximum values for the valuator. When the user
|
||||
manipulates the widget, the value is limited to this range. This
|
||||
clamping is done <i>after</i> rounding to the step value (this makes a
|
||||
difference if the range is not a multiple of the step).
|
||||
|
||||
<p>The minimum may be greater than the maximum. This has the effect
|
||||
of "reversing" the object so the larger values are in the opposite
|
||||
direction. This also switches which end of the filled sliders is
|
||||
filled.
|
||||
|
||||
<p>Some widgets consider this a "soft" range. This means they will
|
||||
stop at the range, but if the user releases and grabs the control
|
||||
again and tries to move it further, it is allowed.
|
||||
|
||||
<p>The range may affect the display. You must <tt>redraw()</tt> the
|
||||
widget after changing the range.
|
||||
|
||||
<h4><a name="Fl_Valuator.step">double Fl_Valuator::step() const<br>
|
||||
void Fl_Valuator::step(double)<br>
|
||||
void Fl_Valuator::step(int A, int B)</a></h4>
|
||||
|
||||
Get or set the step value. As the user moves the mouse the value is
|
||||
rounded to the nearest multiple of the step value. This is done
|
||||
<i>before</i> clamping it to the range. For most
|
||||
objects the default step is zero.
|
||||
|
||||
<p>For precision the step is stored as the ratio of two integers,
|
||||
A/B. You can set these integers directly. Currently setting a
|
||||
floating point value sets the nearest A/1 or 1/B value possible.
|
||||
|
||||
<h4><a name="Fl_Valuator.format">int Fl_Valuator::format(char*, double)</a></h4>
|
||||
|
||||
Format the passed value to show enough digits so that for the current
|
||||
step value. If the step has been set to zero then it does a
|
||||
<tt>%g</tt> format. The characters are written into the passed buffer.
|
||||
|
||||
<h4><a name="Fl_Valuator.round">double Fl_Valuator::round(double)</a></h4>
|
||||
|
||||
Round the passed value to the nearest step increment. Does nothing if
|
||||
step is zero.
|
||||
|
||||
<h4><a name="Fl_Valuator.clamp">double Fl_Valuator::clamp(double)</a></h4>
|
||||
|
||||
Clamp the passed value to the valuator range.
|
||||
|
||||
<h4><a name="Fl_Valuator.increment">double Fl_Valuator::increment(double,int n)</a></h4>
|
||||
|
||||
Adds <tt>n</tt> times the step value to the passed value. If step was set to
|
||||
zero it uses <tt>fabs(maximum() - minimum()) / 100</tt>.
|
||||
|
||||
<h4><a name="Fl_Valuator.changed">int Fl_Widget::changed() const</a></h4>
|
||||
|
||||
This value is true if the user has moved the slider. It is turned
|
||||
off by <tt>value(x)</tt> and just before doing a callback (the callback can
|
||||
turn it back on if desired).
|
||||
|
||||
<h4><a name="Fl_Valuator.set_changed">void Fl_Widget::set_changed()</a><h4>
|
||||
|
||||
Sets the <tt>changed()</tt> flag.
|
||||
|
||||
<h4><a name="Fl_Valuator.clear_changed">void Fl_Widget::clear_changed()</a></h4>
|
||||
|
||||
Clears the <tt>changed()</tt> flag.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<A href=Fl_Adjuster.html#Fl_Adjuster>Fl_Adjuster</A>, <A href=Fl_Counter.html#Fl_Counter>Fl_Counter</A>, <A href=Fl_Dial.html#Fl_Dial>Fl_Dial</A>, <A href=Fl_Roller.html#Fl_Roller>Fl_Roller</A>,
|
||||
<A href=Fl_Slider.html#Fl_Slider>Fl_Slider</A>, <A href=Fl_Value_Input.html#Fl_Value_Input>Fl_Value_Input</A>, <A href=Fl_Value_Output.html#Fl_Value_Output>Fl_Value_Output</A>,
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Valuator.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Valuator</TT> class controls a single floating-point value
|
||||
and provides a consistent interface to set the value, range, and step,
|
||||
and insures that callbacks are done the same for every object.
|
||||
<P>There are probably more of these classes in fltk than any others: </P>
|
||||
<P><IMG src=./valuators.gif></P>
|
||||
<P>In the above diagram each box surrounds an actual subclass. These
|
||||
are further differentiated by setting the <A href=#Fl_Widget.type"><TT>
|
||||
type()</TT></A> of the widget to the symbolic value labeling the
|
||||
widget. The ones labelled "0" are the default versions with a <TT>
|
||||
type(0)<TT>. For consistency the symbol <TT>FL_VERTICAL</TT> is
|
||||
defined as zero. </TT></TT></P>
|
||||
<H3>Methods</H3>
|
||||
<CENTER>
|
||||
<TABLE width=90%>
|
||||
<TR><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Valuator.Fl_Valuator>Fl_Valuator</A></LI>
|
||||
<LI><A href=#Fl_Valuator.~Fl_Valuator>~Fl_Valuator</A></LI>
|
||||
<LI><A href=#Fl_Valuator.changed>changed</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Valuator.clamp>clamp</A></LI>
|
||||
<LI><A href=#Fl_Valuator.clear_changed>clear_changed</A></LI>
|
||||
<LI><A href=#Fl_Valuator.format>format</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Valuator.increment>increment</A></LI>
|
||||
<LI><A href=#Fl_Valuator.maximum>maximum</A></LI>
|
||||
<LI><A href=#Fl_Valuator.minimum>minimum</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Valuator.range>range</A></LI>
|
||||
<LI><A href=#Fl_Valuator.round>round</A></LI>
|
||||
<LI><A href=#Fl_Valuator.set_changed>set_changed</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Valuator.step>step</A></LI>
|
||||
<LI><A href=#Fl_Valuator.value>value</A></LI>
|
||||
</UL>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
<H4><A name=Fl_Valuator.Fl_Valuator>Fl_Valuator::Fl_Valuator(int x, int
|
||||
y, int w, int h, const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Valuator</TT> widget using the given position,
|
||||
size, and label string. The default boxtype is <TT>FL_NO_BOX</TT>.
|
||||
<H4><A name=Fl_Valuator.~Fl_Valuator>virtual Fl_Valuator::~Fl_Valuator()</A>
|
||||
</H4>
|
||||
Destroys the valuator.
|
||||
<H4><A name=Fl_Valuator.value>double Fl_Valuator::value() const
|
||||
<BR> int Fl_Valuator::value(double)</A></H4>
|
||||
Get or set the current value. The new value is <I>not</I> clamped or
|
||||
otherwise changed before storing it. Use <TT>clamp()</TT> or <TT>round()</TT>
|
||||
to modify the value before calling this if you want. If the new value
|
||||
is different than the current one the object is redrawn. The initial
|
||||
value is zero.
|
||||
<H4><A name=Fl_Valuator.minimum>double Fl_Valuator::minimum() const
|
||||
<BR> void Fl_Valuator::minimum(double)</A></H4>
|
||||
Gets or sets the minimum value for the valuator.
|
||||
<H4><A name=Fl_Valuator.maximum>double Fl_Valuator::maximum() const
|
||||
<BR> void Fl_Valuator::maximum(double)</A></H4>
|
||||
Gets or sets the maximum value for the valuator.
|
||||
<H4><A name=Fl_Valuator.range>void Fl_Valuator::range(double min,
|
||||
double max);</A></H4>
|
||||
Sets the minimum and maximum values for the valuator. When the user
|
||||
manipulates the widget, the value is limited to this range. This
|
||||
clamping is done <I>after</I> rounding to the step value (this makes a
|
||||
difference if the range is not a multiple of the step).
|
||||
<P>The minimum may be greater than the maximum. This has the effect of
|
||||
"reversing" the object so the larger values are in the opposite
|
||||
direction. This also switches which end of the filled sliders is
|
||||
filled. </P>
|
||||
<P>Some widgets consider this a "soft" range. This means they will
|
||||
stop at the range, but if the user releases and grabs the control again
|
||||
and tries to move it further, it is allowed. </P>
|
||||
<P>The range may affect the display. You must <TT>redraw()</TT> the
|
||||
widget after changing the range. </P>
|
||||
<H4><A name=Fl_Valuator.step>double Fl_Valuator::step() const
|
||||
<BR> void Fl_Valuator::step(double)
|
||||
<BR> void Fl_Valuator::step(int A, int B)</A></H4>
|
||||
Get or set the step value. As the user moves the mouse the value is
|
||||
rounded to the nearest multiple of the step value. This is done <I>
|
||||
before</I> clamping it to the range. For most objects the default step
|
||||
is zero.
|
||||
<P>For precision the step is stored as the ratio of two integers, A/B.
|
||||
You can set these integers directly. Currently setting a floating
|
||||
point value sets the nearest A/1 or 1/B value possible. </P>
|
||||
<H4><A name=Fl_Valuator.format>int Fl_Valuator::format(char*, double)</A>
|
||||
</H4>
|
||||
Format the passed value to show enough digits so that for the current
|
||||
step value. If the step has been set to zero then it does a <TT>%g</TT>
|
||||
format. The characters are written into the passed buffer.
|
||||
<H4><A name=Fl_Valuator.round>double Fl_Valuator::round(double)</A></H4>
|
||||
Round the passed value to the nearest step increment. Does nothing if
|
||||
step is zero.
|
||||
<H4><A name=Fl_Valuator.clamp>double Fl_Valuator::clamp(double)</A></H4>
|
||||
Clamp the passed value to the valuator range.
|
||||
<H4><A name=Fl_Valuator.increment>double
|
||||
Fl_Valuator::increment(double,int n)</A></H4>
|
||||
Adds <TT>n</TT> times the step value to the passed value. If step was
|
||||
set to zero it uses <TT>fabs(maximum() - minimum()) / 100</TT>.
|
||||
<H4><A name=Fl_Valuator.changed>int Fl_Widget::changed() const</A></H4>
|
||||
This value is true if the user has moved the slider. It is turned off
|
||||
by <TT>value(x)</TT> and just before doing a callback (the callback can
|
||||
turn it back on if desired).
|
||||
<H4><A name=Fl_Valuator.set_changed>void Fl_Widget::set_changed()</A></H4>
|
||||
<H4>Sets the <TT>changed()</TT> flag. </H4>
|
||||
<H4><A name=Fl_Valuator.clear_changed>void Fl_Widget::clear_changed()</A>
|
||||
</H4>
|
||||
Clears the <TT>changed()</TT> flag. </BODY></HTML>
|
||||
@@ -1,89 +1,71 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Value_Input">class Fl_Value_Input</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Valuator">Fl_Valuator</a>
|
||||
<HTML><BODY>
|
||||
<HR break>
|
||||
<H2><A name=Fl_Value_Input>class Fl_Value_Input</A></H2>
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Valuator.html#Fl_Valuator>Fl_Valuator</A>
|
||||
|
|
||||
+----<b>Fl_Value_Input</b>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Value_Input.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Value_Input</tt> widget displays a floating point value.
|
||||
The user can click in the text field and edit it (there is in fact
|
||||
a hidden <a href="#Fl_Value_Input"><tt>Fl_Value_Input</tt></a> widget with
|
||||
<tt>type(FL_FLOAT_INPUT)</tt> in there), and when they hit return
|
||||
or tab the value updates to what they typed and the callback is done.
|
||||
|
||||
<p>If <tt>step()</tt> is not zero, the user can also drag the mouse
|
||||
across the object and thus slide the value. The left button moves one
|
||||
<tt>step()</tt> per pixel, the middle by <tt>10 * step()</tt>, and the
|
||||
left button by <tt>100 * step()</tt>. It is then impossible to select
|
||||
text by dragging across it, although clicking can still move the
|
||||
insertion cursor.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Value_Input.Fl_Value_Input">Fl_Value_Input</a>
|
||||
<li><a href="#Fl_Value_Input.~Fl_Value_Input">~Fl_Value_Input</a>
|
||||
<li><a href="#Fl_Value_Input.cursor_color">cursor_color</a>
|
||||
<li><a href="#Fl_Value_Input.soft">soft</a>
|
||||
<li><a href="#Fl_Value_Input.textcolor">textcolor</a>
|
||||
<li><a href="#Fl_Value_Input.textfont">textfont</a>
|
||||
<li><a href="#Fl_Value_Input.textsize">textsize</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Value_Input.Fl_Value_Input">Fl_Value_Input::Fl_Value_Input(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Value_Input</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_NO_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Value_Input.~Fl_Value_Input">virtual Fl_Value_Input::~Fl_Value_Input()</a></h4>
|
||||
|
||||
Destroys the valuator.
|
||||
|
||||
<h4><a name="Fl_Value_Input.cursor_color">Fl_Color Fl_Value_Input::cursor_color() const<br>
|
||||
void Fl_Value_Input::cursor_color(Fl_Color)</a></h4>
|
||||
|
||||
Get or set the color of the cursor. This is black by default.
|
||||
|
||||
<h4><a name="Fl_Value_Input.soft">uchar Fl_Value_Input::soft() const<br>
|
||||
void Fl_Value_Input::soft(uchar)</a></h4>
|
||||
|
||||
If "soft" is turned on, the user is allowed to drag the value outside
|
||||
the range. If they drag the value to one of the ends, let go, then
|
||||
grab again and continue to drag, they can get to any value. Default
|
||||
is one.
|
||||
|
||||
<h4><a name="Fl_Value_Input.textcolor">Fl_Color Fl_Value_Input::textcolor() const<br>
|
||||
void Fl_Value_Input::textcolor(Fl_Color)</a></h4>
|
||||
|
||||
Gets or sets the color of the text in the value box.
|
||||
|
||||
<h4><a name="Fl_Value_Input.textfont">Fl_Font Fl_Value_Input::textfont() const<br>
|
||||
<br>void Fl_Value_Input::textfont(Fl_Font)</a></h4>
|
||||
|
||||
Gets or sets the typeface of the text in the value box.
|
||||
|
||||
<h4><a name="Fl_Value_Input.textsize">uchar Fl_Value_Input::textsize() const<br>
|
||||
void Fl_Value_Input::textsize(uchar)</a></h4>
|
||||
|
||||
Gets or sets the size of the text in the value box.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+----<B>Fl_Value_Input</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
#include <FL/Fl_Value_Input.H>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Value_Input</TT> widget displays a floating point value.
|
||||
The user can click in the text field and edit it (there is in fact a
|
||||
hidden <A href=#Fl_Value_Input><TT>Fl_Value_Input</TT></A> widget with <TT>
|
||||
type(FL_FLOAT_INPUT)</TT> in there), and when they hit return or tab
|
||||
the value updates to what they typed and the callback is done.
|
||||
<P>If <TT>step()</TT> is not zero, the user can also drag the mouse
|
||||
across the object and thus slide the value. The left button moves one <TT>
|
||||
step()</TT> per pixel, the middle by <TT>10 * step()</TT>, and the left
|
||||
button by <TT>100 * step()</TT>. It is then impossible to select text
|
||||
by dragging across it, although clicking can still move the insertion
|
||||
cursor. </P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Value_Input.Fl_Value_Input>Fl_Value_Input</A></LI>
|
||||
<LI><A href=#Fl_Value_Input.~Fl_Value_Input>~Fl_Value_Input</A></LI>
|
||||
<LI><A href=#Fl_Value_Input.cursor_color>cursor_color</A></LI>
|
||||
<LI><A href=#Fl_Value_Input.soft>soft</A></LI>
|
||||
<LI><A href=#Fl_Value_Input.textcolor>textcolor</A></LI>
|
||||
<LI><A href=#Fl_Value_Input.textfont>textfont</A></LI>
|
||||
<LI><A href=#Fl_Value_Input.textsize>textsize</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Value_Input.Fl_Value_Input>
|
||||
Fl_Value_Input::Fl_Value_Input(int x, int y, int w, int h, const char
|
||||
*label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Value_Input</TT> widget using the given position,
|
||||
size, and label string. The default boxtype is <TT>FL_NO_BOX</TT>.
|
||||
<H4><A name=Fl_Value_Input.~Fl_Value_Input>virtual
|
||||
Fl_Value_Input::~Fl_Value_Input()</A></H4>
|
||||
Destroys the valuator.
|
||||
<H4><A name=Fl_Value_Input.cursor_color>Fl_Color
|
||||
Fl_Value_Input::cursor_color() const
|
||||
<BR> void Fl_Value_Input::cursor_color(Fl_Color)</A></H4>
|
||||
Get or set the color of the cursor. This is black by default.
|
||||
<H4><A name=Fl_Value_Input.soft>uchar Fl_Value_Input::soft() const
|
||||
<BR> void Fl_Value_Input::soft(uchar)</A></H4>
|
||||
If "soft" is turned on, the user is allowed to drag the value outside
|
||||
the range. If they drag the value to one of the ends, let go, then
|
||||
grab again and continue to drag, they can get to any value. Default is
|
||||
one.
|
||||
<H4><A name=Fl_Value_Input.textcolor>Fl_Color
|
||||
Fl_Value_Input::textcolor() const
|
||||
<BR> void Fl_Value_Input::textcolor(Fl_Color)</A></H4>
|
||||
Gets or sets the color of the text in the value box.
|
||||
<H4><A name=Fl_Value_Input.textfont>Fl_Font Fl_Value_Input::textfont()
|
||||
const
|
||||
<BR>
|
||||
<BR>void Fl_Value_Input::textfont(Fl_Font)</A></H4>
|
||||
Gets or sets the typeface of the text in the value box.
|
||||
<H4><A name=Fl_Value_Input.textsize>uchar Fl_Value_Input::textsize()
|
||||
const
|
||||
<BR> void Fl_Value_Input::textsize(uchar)</A></H4>
|
||||
Gets or sets the size of the text in the value box. </BODY></HTML>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user