mirror of
https://github.com/fltk/fltk.git
synced 2026-05-27 10:57:58 +08:00
Revised documentation files.
git-svn-id: file:///fltk/svn/fltk/trunk@177 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,61 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,52 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,276 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,171 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,176 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,162 @@
|
||||
<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>
|
||||
|
|
||||
+----<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:
|
||||
|
||||
<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>
|
||||
</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>
|
||||
@@ -0,0 +1,53 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,110 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,78 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,103 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,66 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,65 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,66 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
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>
|
||||
|
||||
Returns the off-screen pixmap or back buffer. This value is zero until
|
||||
the first time <tt>flush()</tt> is called.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,51 @@
|
||||
<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 {
|
||||
Fl_Group group;
|
||||
Fl_Button button_in_group;
|
||||
Fl_End end;
|
||||
Fl_Button button_outside_group;
|
||||
MyClass();
|
||||
};
|
||||
MyClass::MyClass() :
|
||||
group(10,10,100,100),
|
||||
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>
|
||||
@@ -0,0 +1,47 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,87 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
#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>
|
||||
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>
|
||||
// old event names for compatability:
|
||||
#define FL_MOUSE FL_DRAG
|
||||
#define FL_DRAW 0
|
||||
#define FL_STEP 9
|
||||
#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>
|
||||
@@ -0,0 +1,265 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
void mywindow::draw() {
|
||||
if (!valid()) {
|
||||
glViewport(0,0,w(),h());
|
||||
glFrustum(...);
|
||||
glLight(...);
|
||||
...other initialization...
|
||||
}
|
||||
... draw your geometry here ...
|
||||
}
|
||||
|
||||
<br>void Fl_Gl_Window::invalidate();
|
||||
<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 and by the window resizing, and is turned
|
||||
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() {
|
||||
if (!valid()) {
|
||||
glViewport(0,0,w(),h());
|
||||
glFrustum(...);
|
||||
glLight(...);
|
||||
...other initilization...
|
||||
}
|
||||
... 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>
|
||||
@@ -0,0 +1,178 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,74 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,256 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,220 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
#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
|
||||
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>
|
||||
@@ -0,0 +1,47 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,53 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,220 @@
|
||||
<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>
|
||||
|
|
||||
+----<b>Fl_Menu_</b>----<a href="#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>
|
||||
@@ -0,0 +1,85 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,101 @@
|
||||
<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>
|
||||
|
|
||||
+----<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
|
||||
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>
|
||||
@@ -0,0 +1,366 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Menu_Item">struct Fl_Menu_Item</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Widget">Fl_Widget</a>
|
||||
|
|
||||
+----<b>Fl_Menu_Item</b>----<a href="#Fl_Menu_">Fl_Menu_</a>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Menu_Item.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Menu_Item</tt> structure defines a single menu item that is
|
||||
used by the <tt>Fl_Menu_</tt> class. This structure is defined in
|
||||
<tt><FL/Fl_Menu_Item.H></tt>
|
||||
|
||||
<ul><pre>
|
||||
struct Fl_Menu_Item {
|
||||
const char* text; // label()
|
||||
ulong shortcut_;
|
||||
Fl_Callback* callback_;
|
||||
void* user_data_;
|
||||
int flags;
|
||||
uchar labeltype_;
|
||||
uchar labelfont_;
|
||||
uchar labelsize_;
|
||||
uchar labelcolor_;
|
||||
};
|
||||
|
||||
enum { // values for flags:
|
||||
FL_MENU_INACTIVE = 1,
|
||||
FL_MENU_TOGGLE = 2,
|
||||
FL_MENU_VALUE = 4,
|
||||
FL_MENU_RADIO = 8,
|
||||
FL_MENU_INVISIBLE = 0x10,
|
||||
FL_SUBMENU_POINTER = 0x20,
|
||||
FL_SUBMENU = 0x40,
|
||||
FL_MENU_DIVIDER = 0x80,
|
||||
FL_MENU_HORIZONTAL = 0x100
|
||||
};
|
||||
</pre></ul>
|
||||
|
||||
Typically menu items are statically defined; for example:
|
||||
|
||||
<table>
|
||||
<tr valign=top>
|
||||
<td><img align=left src=menu.gif></td>
|
||||
<td><pre>
|
||||
Fl_Menu_Item popup[] = {
|
||||
{"&alpha", FL_ALT+'a', the_cb, (void*)1},
|
||||
{"&beta", FL_ALT+'b', the_cb, (void*)2},
|
||||
{"gamma", FL_ALT+'c', the_cb, (void*)3, FL_MENU_DIVIDER},
|
||||
{"&strange", 0, strange_cb},
|
||||
{"&charm", 0, charm_cb},
|
||||
{"&truth", 0, truth_cb},
|
||||
{"b&eauty", 0, beauty_cb},
|
||||
{"sub&menu", 0, 0, 0, FL_SUBMENU},
|
||||
{"one"},
|
||||
{"two"},
|
||||
{"three"},
|
||||
{0},
|
||||
{"inactive", FL_ALT+'i', 0, 0, FL_MENU_INACTIVE|FL_MENU_DIVIDER},
|
||||
{"invisible",FL_ALT+'i', 0, 0, FL_MENU_INVISIBLE},
|
||||
{"check", FL_ALT+'i', 0, 0, FL_MENU_TOGGLE|FL_MENU_VALUE},
|
||||
{"box", FL_ALT+'i', 0, 0, FL_MENU_TOGGLE},
|
||||
{0}};
|
||||
</pre></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
A submenu title is identified by the bit <tt>FL_SUBMENU</tt> in the
|
||||
<tt>flags</tt> field, and ends with a <tt>label()</tt> that is
|
||||
<tt>NULL</tt>. You can nest menus to any depth. A pointer to the
|
||||
first item in the submenu can be treated as an <tt>Fl_Menu</tt> array
|
||||
itself. It is also possible to make seperate submenu arrays with
|
||||
<tt>FL_SUBMENU_POINTER</tt> flags.
|
||||
|
||||
<p>You should use the method functions to access structure members and
|
||||
not access them directly to avoid compatibility problems with future
|
||||
releases of FLTK.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<center>
|
||||
<table width=90%>
|
||||
<tr>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Menu_Item.label">label</a>
|
||||
<li><a href="#Fl_Menu_Item.labeltype">labeltype</a>
|
||||
<li><a href="#Fl_Menu_Item.labelcolor">labelcolor</a>
|
||||
<li><a href="#Fl_Menu_Item.labelfont">labelfont</a>
|
||||
<li><a href="#Fl_Menu_Item.labelsize">labelsize</a>
|
||||
<li><a href="#Fl_Menu_Item.callback">callback</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Menu_Item.user_data">user_data</a>
|
||||
<li><a href="#Fl_Menu_Item.argument">argument</a>
|
||||
<li><a href="#Fl_Menu_Item.do_callback">do_callback</a>
|
||||
<li><a href="#Fl_Menu_Item.shortcut">shortcut</a>
|
||||
<li><a href="#Fl_Menu_Item.submenu">submenu</a>
|
||||
<li><a href="#Fl_Menu_Item.checkbox">checkbox</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Menu_Item.radio">radio</a>
|
||||
<li><a href="#Fl_Menu_Item.value">value</a>
|
||||
<li><a href="#Fl_Menu_Item.set">set</a>
|
||||
<li><a href="#Fl_Menu_Item.setonly">setonly</a>
|
||||
<li><a href="#Fl_Menu_Item.clear">clear</a>
|
||||
<li><a href="#Fl_Menu_Item.visible">visible</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Menu_Item.show">show</a>
|
||||
<li><a href="#Fl_Menu_Item.hide">hide</a>
|
||||
<li><a href="#Fl_Menu_Item.active">active</a>
|
||||
<li><a href="#Fl_Menu_Item.activate">activate</a>
|
||||
<li><a href="#Fl_Menu_Item.deactivate">deactivate</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td align=left valign=top>
|
||||
<ul>
|
||||
<li><a href="#Fl_Menu_Item.popup">popup</a>
|
||||
<li><a href="#Fl_Menu_Item.pulldown">pulldown</a>
|
||||
<li><a href="#Fl_Menu_Item.test_shortcut">test_shortcut</a>
|
||||
<li><a href="#Fl_Menu_Item.size">size</a>
|
||||
<li><a href="#Fl_Menu_Item.next">next</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<h4><a name="Fl_Menu_Item.label">const char* Fl_Menu_Item::label() const<br>
|
||||
void Fl_Menu_Item::label(const char*)<br>
|
||||
void Fl_Menu_Item::label(Fl_Labeltype, const char*)</a></h4>
|
||||
|
||||
This is the title of the item. A <tt>NULL</tt> here indicates the end of the
|
||||
menu (or of a submenu). A '&' in the item will print an underscore
|
||||
under the next letter, and if the menu is popped up that letter will
|
||||
be a "shortcut" to pick that item. To get a real '&' put two in a
|
||||
row.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.labeltype">Fl_Labeltype Fl_Menu_Item::labeltype() const<br>
|
||||
void Fl_Menu_Item::labeltype(Fl_Labeltype)</a></h4>
|
||||
|
||||
A <tt>labeltype</tt> identifies a routine that draws the label of the
|
||||
widget. This can be used for special effects such as emboss, or to use
|
||||
the <tt>label()</tt> pointer as another form of data such as a bitmap.
|
||||
The value <tt>FL_NORMAL_LABEL</tt> prints the label as text.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.labelcolor">Fl_Color Fl_Menu_Item::labelcolor() const<br>
|
||||
void Fl_Menu_Item::labelcolor(Fl_Color)</a></h4>
|
||||
|
||||
This color is passed to the labeltype routine, and is typically the
|
||||
color of the label text. This defaults to <tt>FL_BLACK</tt>. If this
|
||||
color is not black fltk will <i>not</i> use overlay bitplanes to draw
|
||||
the menu - this is so that images put in the menu draw correctly.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.labelfont">Fl_Font Fl_Menu_Item::labelfont() const<br>
|
||||
void Fl_Menu_Item::labelfont(Fl_Font)</a></h4>
|
||||
|
||||
Fonts are identified by small 8-bit indexes into a table. See the <a
|
||||
href="#Enumerations">enumeration list</a> for predefined fonts. The
|
||||
default value is a Helvetica font. The function <a
|
||||
href="#set_font"><tt>Fl::set_font()</tt></a> can define new fonts.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.labelsize">uchar Fl_Menu_Item::labelsize() const<br>
|
||||
void Fl_Menu_Item::labelsize(uchar)</a></h4>
|
||||
|
||||
Gets or sets the label font pixel size/height.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.callback">typedef void (Fl_Callback)(Fl_Widget*, void*)<br>
|
||||
Fl_Callback* Fl_Menu_Item::callback() const<br>
|
||||
void Fl_Menu_Item::callback(Fl_Callback*, void* = 0)<br>
|
||||
void Fl_Menu_Item::callback(void (*)(Fl_Widget*))</a></h4>
|
||||
|
||||
Each item has space for a callback function and an argument for that
|
||||
function. Due to back compatability, the <tt>Fl_Menu_Item</tt> itself
|
||||
is not passed to the callback, instead you have to get it by calling
|
||||
<tt>((Fl_Menu_*)w)->mvalue()</tt> where <tt>w</tt> is the widget
|
||||
argument.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.user_data">void* Fl_Menu_Item::user_data() const<br>
|
||||
void Fl_Menu_Item::user_data(void*)</a></h4>
|
||||
|
||||
Get or set the <tt>user_data</tt> argument that is sent to the callback
|
||||
function.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.argument">void Fl_Menu_Item::callback(void (*)(Fl_Widget*, long), long = 0)<br>
|
||||
long Fl_Menu_Item::argument() const<br>
|
||||
void Fl_Menu_Item::argument(long)</a></h4>
|
||||
|
||||
For convenience you can also define the callback as taking a
|
||||
<tt>long</tt> argument. This is implemented by casting this to a
|
||||
<tt>Fl_Callback</tt> and casting the <tt>long</tt> to a <tt>void*</tt>
|
||||
and may not be portable to some machines.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.do_callback">void Fl_Menu_Item::do_callback(Fl_Widget*)<br>
|
||||
void Fl_Menu_Item::do_callback(Fl_Widget*, void*)<br>
|
||||
void Fl_Menu_Item::do_callback(Fl_Widget*, long)</a></h4>
|
||||
|
||||
Call the <tt>Fl_Menu_Item</tt> item's callback, and provide the
|
||||
<tt>Fl_Widget</tt> argument (and optionally override the user_data()
|
||||
argument). You must first check that <tt>callback()</tt> is non-zero before
|
||||
calling this.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.shortcut">ulong Fl_Menu_Item::shortcut() const<br>
|
||||
void Fl_Menu_Item::shortcut(ulong)</a></h4>
|
||||
|
||||
Sets exactly what key combination will trigger the menu item. The
|
||||
value is a logical 'or' of a key and a set of shift flags, for
|
||||
instance <tt>FL_ALT+'a'</tt> or <tt>FL_ALT+FL_F+10</tt> or
|
||||
just 'a'. A value of zero 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_Menu_Item.submenu">int Fl_Menu_Item::submenu() const</a></h4>
|
||||
|
||||
Returns true if either <tt>FL_SUBMENU</tt> or
|
||||
<tt>FL_SUBMENU_POINTER</tt> is on in the flags. <tt>FL_SUBMENU</tt>
|
||||
indicates an embedded submenu that goes from the next item through the
|
||||
next one with a <tt>NULL</tt> <tt>label()</tt>.
|
||||
<tt>FL_SUBMENU_POINTER</tt> indicates that <tt>user_data()</tt> is a
|
||||
pointer to another menu array.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.checkbox">int Fl_Menu_Item::checkbox() const</a></h4>
|
||||
|
||||
Returns true if a checkbox will be drawn next to this item. This is
|
||||
true if <tt>FL_MENU_TOGGLE</tt> or <tt>FL_MENU_RADIO</tt> is set in the flags.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.radio">int Fl_Menu_Item::radio() const</a></h4>
|
||||
|
||||
Returns true if this item is a radio item. When a radio button is
|
||||
selected all "adjacent" radio buttons are turned off. A set of radio
|
||||
items is delimited by an item that has <tt>radio()</tt> false, or by an item
|
||||
with <tt>FL_MENU_DIVIDER</tt> turned on.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.value">int Fl_Menu_Item::value() const</a></h4>
|
||||
|
||||
Returns the current value of the check or radio item.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.set">void Fl_Menu_Item::set()</a></h4>
|
||||
|
||||
Turns the check or radio item "on" for the menu item. Note that this does not
|
||||
turn off any adjacent radio items like <tt>set_only()</tt> does.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.setonly">void Fl_Menu_Item::setonly()</a></h4>
|
||||
|
||||
Turns the radio item "on" for the menu item and turns off adjacent radio
|
||||
item.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.clear">void Fl_Menu_Item::clear()</a></h4>
|
||||
|
||||
Turns the check or radio item "off" for the menu item.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.visible">int Fl_Menu_Item::visible() const</a></h4>
|
||||
|
||||
Gets the visibility of an item.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.show">void Fl_Menu_Item::show()</a></h4>
|
||||
|
||||
Makes an item visible in the menu.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.hide">void Fl_Menu_Item::hide()</a></h4>
|
||||
|
||||
Hides an item in the menu.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.active">int Fl_Menu_Item::active() const</a></h4>
|
||||
|
||||
Get whether or not the item can be picked.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.activate">void Fl_Menu_Item::activate()</a></h4>
|
||||
|
||||
Allows a menu item to be picked.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.deactivate">void Fl_Menu_Item::deactivate()</a></h4>
|
||||
|
||||
Prevents a menu item from being picked. Note that this will also cause the
|
||||
menu item to appear grayed-out.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.popup">const Fl_Menu_Item *Fl_Menu_Item::popup(int X, int Y, const char* title = 0, const Fl_Menu_Item* picked = 0, const Fl_Menu_* button = 0) const</a></h4>
|
||||
|
||||
This method is called by widgets that want to display menus. The menu
|
||||
stays up until the user picks an item or dismisses it. The selected
|
||||
item (or <tt>NULL</tt> if none) is returned. <i>This does not do the
|
||||
callbacks or change the state of check or radio items.</i>
|
||||
|
||||
<p><tt>X,Y</tt> is the position of the mouse cursor, relative to the
|
||||
window that got the most recent event (usually you can pass
|
||||
<tt>Fl::event_x()</tt> and <tt>Fl::event_y()</tt> unchanged here).
|
||||
|
||||
<p><tt>title</tt> is a character string title for the menu. If non-zero
|
||||
a small box appears above the menu with the title in it.
|
||||
|
||||
<p>The menu is positioned so the cursor is centered over the item
|
||||
<tt>picked</tt>. This will work even if <tt>picked</tt> is in a submenu.
|
||||
If <tt>picked</tt> is zero or not in the menu item table the menu is
|
||||
positioned with the cursor in the top-left corner.
|
||||
|
||||
<p><tt>button</tt> is a pointer to an <a href="#Fl_Menu_"><tt>Fl_Menu_</tt></a>
|
||||
from which the color and boxtypes for the menu are pulled. If <tt>NULL</tt>
|
||||
then defaults are used.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.pulldown">const Fl_Menu_Item *Fl_Menu_Item::pulldown(int X, int Y, int W, int H, const Fl_Menu_Item* picked = 0, const Fl_Menu_* button = 0, const Fl_Menu_Item* title = 0, int menubar=0) const</a></h4>
|
||||
|
||||
<tt>pulldown()</tt> is similar to <tt>popup()</tt>, but a rectangle is
|
||||
provided to position the menu. The menu is made at least <tt>W</tt>
|
||||
wide, and the <tt>picked</tt> item is centered over the rectangle (like
|
||||
<tt>Fl_Choice</tt> uses). If <tt>picked</tt> is zero or not found, the
|
||||
menu is aligned just below the rectangle (like a pulldown menu).
|
||||
|
||||
<p>The <tt>title</tt> and <tt>menubar</tt> arguments are used internally by
|
||||
the <tt>Fl_Menu_</tt> widget.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.test_shortcut">const Fl_Menu_Item* Fl_Menu_Item::test_shortcut() const</a></h4>
|
||||
|
||||
This is designed to be called by a widgets <tt>handle()</tt> method in
|
||||
response to a <tt>FL_SHORTCUT</tt> event. If the current event matches
|
||||
one of the items shortcut, that item is returned. If the keystroke
|
||||
does not match any shortcuts then <tt>NULL</tt> is returned. This only
|
||||
matches the <tt>shortcut()</tt> fields, not the letters in the title
|
||||
preceeded by '&'.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.size">int Fl_Menu_Item::size()</a></h4>
|
||||
|
||||
Return the offset of the <tt>NULL</tt> terminator that ends this menu,
|
||||
correctly skipping over submenus. To copy a menu you should copy
|
||||
<tt>size() + 1</tt> structures.
|
||||
|
||||
<h4><a name="Fl_Menu_Item.next">const Fl_Menu_Item* Fl_Menu_Item::next(int n=1) const<br>
|
||||
Fl_Menu_Item* Fl_Menu_Item::next(int n=1);</a></h4>
|
||||
|
||||
Advance a pointer by <tt>n</tt> items through a menu array, skipping the
|
||||
contents of submenus and invisible items. There are two calls so that
|
||||
you can advance through const and non-const data.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,59 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,73 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,53 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,46 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,108 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,70 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,103 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,97 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,45 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,44 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,46 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,53 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.0 KiB |
@@ -0,0 +1,135 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,78 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,47 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,72 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,49 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,101 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
@@ -0,0 +1,85 @@
|
||||
<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>
|
||||
|
|
||||
+----<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>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user