Documentation updates galore (up to chapter 7, still need to do chapter

8 and 9, tweek the appendices, and recapture the screenshots...)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1786 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet
2001-11-29 19:24:00 +00:00
parent b105ab8b7f
commit 09daf20b81
73 changed files with 3996 additions and 3542 deletions
+24 -1
View File
@@ -361,8 +361,31 @@ FLTK).
<H4><A NAME="Fl.compose">int compose(int &amp;del);</A></H4>
<p>Use of this function is very simple. Any text editing widget should
call this for each <tt>FL_KEYBOARD</tt> event.
<p>If <i>true</i> is returned, then it has modified the
Fl::event_text() and Fl::event_length() to a set of <i>bytes</i> to
insert (it may be of zero length!). In will also set the "del"
parameter to the number of <i>bytes</i> to the left of the cursor to
delete, this is used to delete the results of the previous call to
Fl::compose().
<p>If <i>false</i> is returned, the keys should be treated as function
keys, and del is set to zero. You could insert the text anyways, if
you don't know what else to do.
<p>Though the current implementation returns immediately, future
versions may take quite awhile, as they may pop up a window or do
other user-interface things to allow characters to be selected.
<H4><A NAME="Fl.compose_reset">void compose_reset();</A></H4>
<p>If the user moves the cursor, be sure to call Fl::compose_reset().
The next call to Fl::compose() will start out in an initial state. In
particular it will not set "del" to non-zero. This call is very fast
so it is ok to call it many times and in many places.
<H4><A NAME="Fl.damage">int damage();<BR>
void damage(int x);</A></H4>
@@ -597,7 +620,7 @@ between this and <tt>FL_WHITE</tt>.
<H4><A NAME="Fl.free_color">void free_color(Fl_Color c, int overlay = 0);</A></H4>
<P>Frees the specified color from the colormap, if applicable.
<P>Frees the specified color from the colormap, if applicable.
If <tt>overlay</tt> is non-zero then the color is freed from the
overlay colormap.
+10 -10
View File
@@ -17,7 +17,7 @@
</PRE>
</UL>
<H3>Description</H3>
The <TT>Fl_Adjuster</TT> widget was stolen from Prisms, and has proven
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.
<P ALIGN=CENTER><IMG SRC="adjuster1.gif" ALT="Fl_Adjuster widget."></P>
<P>When you press a button and drag to the right the value increases.
@@ -25,25 +25,25 @@ 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.
click decrements by 10 times the amount.
<H3>Methods</H3>
<UL>
<LI><A href=#Fl_Adjuster.Fl_Adjuster>Fl_Adjuster</A></LI>
<LI><A href=#Fl_Adjuster.~Fl_Adjuster>~Fl_Adjuster</A></LI>
<LI><A href=#Fl_Adjuster.soft>soft</A></LI>
</UL>
<H4><A name=Fl_Adjuster.Fl_Adjuster>Fl_Adjuster::Fl_Adjuster(int x, int
<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.
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.
Destroys the valuator.
<H4><A name=Fl_Adjuster.soft>uchar Fl_Adjuster::soft() const
<BR> void Fl_Adjuster::soft(uchar)</A></H4>
If &quot;soft&quot; 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
If &quot;soft&quot; 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>
+9 -9
View File
@@ -17,23 +17,23 @@
</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.
This widget simply draws its box, and possibly it's label. Putting it
before some other widgets and making it big enough to surround them
will let you draw a frame around them.
<H3>Methods</H3>
<UL>
<LI><A href=#Fl_Box.Fl_Box>Fl_Box</A></LI>
<LI><A href=#Fl_Box.~Fl_Box>~Fl_Box</A></LI>
</UL>
<H4><A name=Fl_Box.Fl_Box>Fl_Box::Fl_Box(int x, int y, int w, int h,
<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
<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
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.html#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
values. To change the box to something visible, use <TT>box(n)</TT>.
<P>The second form of the constructor sets the box to the specified box
type. </P>
<H4><A name=Fl_Box.~Fl_Box>Fl_Box::~Fl_Box(void)</A></H4>
The destructor removes the box.
+68 -68
View File
@@ -19,32 +19,32 @@
</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 &quot;no line&quot; 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
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 &quot;no line&quot; 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 &lt;= <TT>size()</TT>.</I></P>
<P>Each line contains a null-terminated string of text and a <TT>void *</TT>
data pointer. The text string is displayed, the <TT>void *</TT>
pointer can be used by the callbacks to reference the object the text
pointer can be used by the callbacks to reference the object the text
describes. </P>
<P>The base class does nothing when the user clicks on it. The
<P>The base class does nothing when the user clicks on it. The
subclasses <A href=Fl_Select_Browser.html#Fl_Select_Browser><TT>
Fl_Select_Browser</TT></A>, <A href=Fl_Hold_Browser.html#Fl_Hold_Browser>
<TT>Fl_Hold_Browser</TT></A>, and <A href=Fl_Multi_Browser.html#Fl_Multi_Browser>
<TT>Fl_Multi_Browser</TT></A> react to user clicks to select lines in
<TT>Fl_Multi_Browser</TT></A> react to user clicks to select lines in
the browser and do callbacks. </P>
<P>The base class called <A href=Fl_Browser_.html#Fl_Browser_><TT>
Fl_Browser_</TT></A> provides the scrolling and selection mechanisms of
this and all the subclasses, but the dimensions and appearance of each
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
to display information other than text, or text that is dynamically
produced from your own data structures. If you find that loading the
browser is a lot of work or is inefficient, you may want to make a
subclass of <TT>Fl_Browser_</TT>. </P>
<H3>Methods</H3>
<CENTER>
@@ -88,51 +88,51 @@ subclass of <TT>Fl_Browser_</TT>. </P>
</TD></TR>
</TABLE>
</CENTER>
<H4><A name=Fl_Browser.Fl_Browser>Fl_Browser::Fl_Browser(int, int, int,
<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.
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 * =
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
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.
of the new item.
<H4><A name=Fl_Browser.bottomline>void Fl_Browser::bottomline(int n)</A></H4>
Scrolls the browser so the bottom line in the browser is <TT>n</TT>.
<H4><A name=Fl_Browser.clear>void Fl_Browser::clear()</A></H4>
Remove all the lines in the browser.
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
The first form gets the current column separator character. By default
this is <TT>'\t'</TT> (tab).
<P>The second form sets the column separator to <TT>c</TT>. This will
only have an effect if you also set <TT>column_widths()</TT>. </P>
<H4><A name=Fl_Browser.column_widths>const int
<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 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
. The default value is a one-element array of just a zero, which makes
there are no columns.
<P>The second form sets the current array to <TT>w</TT>. Make sure the
last entry is zero. </P>
<H4><A name=Fl_Browser.data>void *Fl_Browser::data(int n) const
<BR> void Fl_Browser::data(int n, void *)</A></H4>
The first form returns the data for line <TT>n</TT>. If <TT>n</TT> is
out of range this returns <TT>NULL</TT>.
The first form returns the data for line <TT>n</TT>. If <TT>n</TT> is
out of range this returns <TT>NULL</TT>.
<P>The second form sets the data for line <TT>n</TT>. </P>
<H4><A name=Fl_Browser.format_char>uchar Fl_Browser::format_char() const
<BR> void Fl_Browser::format_char(char c)</A></H4>
The first form gets the current format code prefix character, which by
default is <TT>@</TT>. A string of formatting codes at the start of
each column are stripped off and used to modify how the rest of the
line is printed:
The first form gets the current format code prefix character, which by
default is <TT>@</TT>. A string of formatting codes at the start of
each column are stripped off and used to modify how the rest of the
line is printed:
<UL>
<LI><CODE>@.</CODE> Print rest of line, don't look for more '@' signs </LI>
<LI><CODE>@@</CODE> Print rest of line starting with '@' </LI>
@@ -145,7 +145,7 @@ line is printed:
font (sets font to FL_COURIER) </LI>
<LI><CODE>@c</CODE> Center the line horizontally </LI>
<LI><CODE>@r</CODE> Right-justify the text </LI>
<LI><CODE>@B0, @B1, ... @B255</CODE> Fill the backgound with
<LI><CODE>@B0, @B1, ... @B255</CODE> Fill the backgound with
fl_color(n) </LI>
<LI><CODE>@C0, @C1, ... @C255</CODE> Use fl_color(n) to draw the text </LI>
<LI><CODE>@F0, @F1, ... </CODE> Use fl_font(n) to draw the text </LI>
@@ -153,54 +153,54 @@ fl_color(n) </LI>
<LI><CODE>@u</CODE> or <CODE>@_</CODE> Underline the text. </LI>
<LI><CODE>@-</CODE> draw an engraved line through the middle. </LI>
</UL>
Notice that the <CODE>@.</CODE> command can be used to reliably
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(&quot;@C%d@.%s&quot;, 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
sprintf(&quot;@C%d@.%s&quot;, color, string)</TT> and it will work even if the
string starts with a digit or has the format character in it.
<P>The second form sets the current prefix to <TT>c</TT>. Set the
prefix to 0 to disable formatting. </P>
<H4><A name=Fl_Browser.hide>void Fl_Browser::hide(int n)</A></H4>
Makes line <TT>n</TT> invisible, preventing selection by the user.
The line can still be selected under program control.
<H4><A name=Fl_Browser.insert>void Fl_Browser::insert(int n, const char
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> &gt; <TT>
size()</TT> then the line is added to the end.
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
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>.
is set to the system error. The <TT>data()</TT> of each line is set
to <TT>NULL</TT>.
<H4><A name=Fl_Browser.middleline>void Fl_Browser::middleline(int n)</A></H4>
Scrolls the browser so the middle line in the browser is <TT>n</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.
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.
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.
<P>The second form sets the vertical scrollbar position to <TT>p</TT>. </P>
<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.
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.
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.
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>.
The first form returns the text for line <TT>n</TT>. If <TT>n</TT> is
out of range it returns <TT>NULL</TT>.
<P>The second form sets the text for line <TT>n</TT>. </P>
<H4><A name=Fl_Browser.topline>int Fl_Browser::topline() const
<BR> void Fl_Browser::topline(int n)</A></H4>
The first form returns the current top line in the browser. If there
is no vertical scrollbar then this will always return 1.
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 scrolls the browser so the top line in the browser is <TT>n</TT>.</P>
<H4><A name=Fl_Browser.visible>int Fl_Browser::visible(int n) const</A></H4>
Returns a non-zero value if line <TT>n</TT> is visible. </BODY></HTML>
+25 -25
View File
@@ -19,18 +19,18 @@
</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
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
prev()</TT> functions are used to index, it works best as a linked list
or as a large block of characters in which the line breaks must be
searched for. </P>
<P>A great deal of work has been done so that the &quot;height&quot; 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
<P>A great deal of work has been done so that the &quot;height&quot; of a data
object does not need to be determined until it is drawn. This is
useful if actually figuring out the size of an object requires
accessing image data or doing <TT>stat()</TT> on a file or doing some
other slow operation. </P>
<H3>Methods</H3>
<CENTER>
@@ -95,15 +95,15 @@ other slow operation. </P>
</TABLE>
</CENTER>
<H4><A name="Fl_Browser_.Fl_Browser_">Fl_Browser::Fl_Browser(int, int,
<H4><A name="Fl_Browser_.Fl_Browser_">Fl_Browser::Fl_Browser(int, int,
int, int, const char * = 0)</A></H4>
<P>The constructor makes an empty browser.
<P>The constructor makes an empty browser.
<H4><A name="Fl_Browser_.~Fl_Browser_">Fl_Browser::~Fl_Browser(void)</A></H4>
<P>The destructor deletes all list items and destroys the browser.
<P>The destructor deletes all list items and destroys the browser.
<H4><A NAME="Fl_Browser_.bbox">Fl_Browser_::bbox(int &amp;x, int &amp;y, int &amp;w, int &amp;h) const</A></H4>
@@ -176,12 +176,12 @@ width from the item widths.
<P>The second form handles an event within the specified bounding box.
<H4><A name="Fl_Browser_.has_scrollbar">void
<H4><A name="Fl_Browser_.has_scrollbar">void
Fl_Browser_::has_scrollbar(int h)</A></H4>
<P>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>:
<P>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>
@@ -196,10 +196,10 @@ this based on the value of <TT>h</TT>:
<LI><CODE>Fl_Browser_::BOTH</CODE> - The default is both
scrollbars.
<LI><CODE>Fl_Browser_::HORIZONTAL_ALWAYS</CODE> - Horizontal
<LI><CODE>Fl_Browser_::HORIZONTAL_ALWAYS</CODE> - Horizontal
scrollbar always on, vertical always off.
<LI><CODE>Fl_Browser_::VERTICAL_ALWAYS</CODE> - Vertical
<LI><CODE>Fl_Browser_::VERTICAL_ALWAYS</CODE> - Vertical
scrollbar always on, horizontal always off.
<LI><CODE>Fl_Browser_::BOTH_ALWAYS</CODE> - Both always on.
@@ -368,8 +368,8 @@ selected.
<H4><A name="Fl_Browser_.textcolor">Fl_Color Fl_Browser_::textcolor() const
<BR>void Fl_Browser_::textcolor(Fl_Color color)</A></H4>
<P>The first form gets the default text color for the lines in the
browser.
<P>The first form gets the default text color for the lines in the
browser.
<P>The second form sets the default text color to <TT>color</TT></P>
@@ -377,8 +377,8 @@ browser.
<H4><A name="Fl_Browser_.textfont">Fl_Font Fl_Browser_::textfont() const
<BR>void Fl_Browser_::textfont(Fl_Font font)</A></H4>
<P>The first form gets the default text font for the lines in the
browser.
<P>The first form gets the default text font for the lines in the
browser.
<P>The second form sets the default text font to <TT>font</TT></P>
@@ -386,8 +386,8 @@ browser.
<H4><A name="Fl_Browser_.textsize">uchar Fl_Browser_::textsize() const
<BR>void Fl_Browser_::textsize(uchar size)</A></H4>
<P>The first form gets the default text size for the lines in the
browser.
<P>The first form gets the default text size for the lines in the
browser.
<P>The second form sets the default text size to <TT>size</TT></P>
+34 -34
View File
@@ -20,14 +20,14 @@
</PRE>
</UL>
<H3>Description</H3>
<P>Buttons generate callbacks when they are clicked by the user. You
<P>Buttons generate callbacks when they are clicked by the user. You
control exactly when and how by changing the values for <TT>type()</TT>
and <TT>when()</TT>. </P>
<P>Buttons can also generate callbacks in response to <TT>FL_SHORTCUT</TT>
events. The button can either have an explicit <A href=#Fl_Button.shortcut>
<TT>shortcut()</TT></A> value or a letter shortcut can be indicated in
the <TT>label()</TT> with an '&amp;' character before it. For the label
shortcut it does not matter if <I>Alt</I> is held down, but if you have
<TT>shortcut()</TT></A> value or a letter shortcut can be indicated in
the <TT>label()</TT> with an '&amp;' character before it. For the label
shortcut it does not matter if <I>Alt</I> is held down, but if you have
an input field in the same window, the user will have to hold down the <I>
Alt</I> key so that the input field does not eat the event first as an <TT>
FL_KEYBOARD</TT> event. </P>
@@ -62,69 +62,69 @@ FL_KEYBOARD</TT> event. </P>
</TD></TR>
</TABLE>
</CENTER>
<H4><A name=Fl_Button.Fl_Button>Fl_Button::Fl_Button(int x, int y, int
<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.
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.
The destructor removed the button.
<H4><A name=Fl_Button.clear>int Fl_Button::clear()</A></H4>
Same as <TT>value(0)</TT>.
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
value()</TT> is non-zero.
<P>The second form sets the down box type. The default value of 0
causes FLTK to figure out the correct matching down version of <TT>box()</TT>
. </P>
<H4><A name=Fl_Button.set>int Fl_Button::set()</A></H4>
Same as <TT>value(1)</TT>.
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).
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 '&amp;' in the <TT>label()</TT>. The value is a bitwise
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 '&amp;' 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
, <CODE>FL_ALT | (FL_F + 10)</CODE>, or just <CODE>'a'</CODE>. A value
of 0 disables the shortcut. </P>
<P>The key can be any value returned by <A href=functions.html#event_key>
<TT>Fl::event_key()</TT></A>, but will usually be an ASCII letter. Use
<TT>Fl::event_key()</TT></A>, but will usually be an ASCII letter. Use
a lower-case letter unless you require the shift key to be held down. </P>
<P>The shift flags can be any set of values accepted by <A href=events.html#event_state>
<TT>Fl::event_state()</TT></A>. If the bit is on that shift key must
be pushed. Meta, Alt, Ctrl, and Shift must be off if they are not in
the shift flags (zero for the other bits indicates a &quot;don't care&quot;
<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 &quot;don't care&quot;
setting). </P>
<H4><A name=Fl_Button.type>uchar Fl_Button::type() const
<BR> void Fl_Button::type(uchar t)</A></H4>
The first form of <TT>type()</TT> returns the current button type,
which can be one of:
The first form of <TT>type()</TT> returns the current button type,
which can be one of:
<UL>
<LI><CODE>0</CODE>: The value is unchanged. </LI>
<LI><CODE>FL_TOGGLE_BUTTON</CODE>: The value is inverted. </LI>
<LI><CODE>FL_RADIO_BUTTON</CODE>: The value is set to 1, and all other
<LI><CODE>FL_RADIO_BUTTON</CODE>: The value is set to 1, and all other
buttons in the current group with <CODE>type() == FL_RADIO_BUTTON</CODE>
are set to zero. </LI>
</UL>
The second form sets the button type to <TT>t</TT>.
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.
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>:
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
<LI><CODE>0</CODE>: The callback is not done, instead changed() is
turned on. </LI>
<LI><CODE>FL_WHEN_RELEASE</CODE>: The callback is done after the user
<LI><CODE>FL_WHEN_RELEASE</CODE>: The callback is done after the user
successfully clicks the button, or when a shortcut is typed. </LI>
<LI><CODE>FL_WHEN_CHANGED </CODE>: The callback is done each time the
value() changes (when the user pushes and releases the button, and as
<LI><CODE>FL_WHEN_CHANGED </CODE>: The callback is done each time the
value() changes (when the user pushes and releases the button, and as
the mouse is dragged around in and out of the button). </LI>
</UL>
</BODY></HTML>
+28 -28
View File
@@ -51,69 +51,69 @@ This widget displays simple charts and is provided for Forms compatibility.
</TD></TR>
</TABLE>
</CENTER>
<H4><A name=Fl_Chart.Fl_Chart>Fl_Chart::Fl_Chart(int x, int y, int w,
<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>.
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 =
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.
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
The <TT>autosize</TT> method controls whether or not the chart will
automatically adjust the bounds of the chart. The first form returns a
boolean value that is non-zero if auto-sizing is enabled and zero is
auto-sizing is disabled.
<P>The second form of <TT>autosize</TT> sets the auto-sizing property
to <TT>onoff</TT>. </P>
<H4><A name=Fl_Chart.bounds>void bounds(double *a, double *b)
<BR> void bounds(double a, double b)</A></H4>
The <TT>bounds</TT> method gets or sets the lower and upper bounds of
the chart values to <TT>a</TT> and <TT>b</TT> respectively.
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
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.
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
The <TT>maxsize</TT> method gets or sets the maximum number of data
values for a chart. If you do not call this method then the chart will
be allowed to grow to any size depending on available memory.
<H4><A name=Fl_Chart.replace>void replace(int pos, double value, const
<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.
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.
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:
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
<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
<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
<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>.
The second form of <TT>type()</TT> sets the chart type to <TT>t</TT>.
</BODY></HTML>
+8 -8
View File
@@ -17,14 +17,14 @@
</PRE>
</UL>
<H3>Description</H3>
Buttons generate callbacks when they are clicked by the user. You
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 ALIGN=CENTER><IMG SRC="Fl_Check_Button.gif" ALT="Fl_Check_Button widget"></P>
<P>The <TT>Fl_Check_Button</TT> subclass display the &quot;on&quot; state by
turning on a light, rather than drawing pushed in. The shape of the
&quot;light&quot; is initially set to FL_DIAMOND_DOWN_BOX. The color of the
light when on is controlled with <TT>selection_color()</TT>, which
<P>The <TT>Fl_Check_Button</TT> subclass display the &quot;on&quot; state by
turning on a light, rather than drawing pushed in. The shape of the
&quot;light&quot; 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.</P>
<H3>Methods</H3>
<UL>
@@ -32,10 +32,10 @@ defaults to FL_RED.</P>
<LI><A href=#Fl_Check_Button.~Fl_Check_Button>~Fl_Check_Button</A></LI>
</UL>
<H4><A name=Fl_Check_Button.Fl_Check_Button>
Fl_Check_Button::Fl_Check_Button(int x, int y, int w, int h, const char
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.
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>
+29 -29
View File
@@ -17,26 +17,26 @@
</PRE>
</UL>
<H3>Description</H3>
This is a button that when pushed pops up a menu (or hierarchy of
This is a button that when pushed pops up a menu (or hierarchy of
menus) defined by an array of <A href=Fl_Menu_Item.html#Fl_Menu_Item><TT>
Fl_Menu_Item</TT></A> objects. Motif calls this an OptionButton.
Fl_Menu_Item</TT></A> objects. Motif calls this an OptionButton.
<P>The only difference between this and a <A href=Fl_Menu_Button.html#Fl_Menu_Button>
<TT>Fl_Menu_Button</TT></A> is that the name of the most recent chosen
menu item is displayed inside the box, while the label is displayed
outside the box. However, since the use of this is most often to
control a single variable rather than do individual callbacks, some of
the <TT>Fl_Menu_Button</TT> methods are redescribed here in those
<TT>Fl_Menu_Button</TT></A> is that the name of the most recent chosen
menu item is displayed inside the box, while the label is displayed
outside the box. However, since the use of this is most often to
control a single variable rather than do individual callbacks, some of
the <TT>Fl_Menu_Button</TT> methods are redescribed here in those
terms. </P>
<P>When the user picks an item off the menu the <TT>value()</TT> is set
<P>When the user picks an item off the menu the <TT>value()</TT> is set
to that item and then the callback is done. </P>
<P>All three mouse buttons pop up the menu. The Forms behavior of the
first two buttons to increment/decrement the choice is not implemented.
<P>All three mouse buttons pop up the menu. The Forms behavior of the
first two buttons to increment/decrement the choice is not implemented.
This could be added with a subclass, however. </P>
<P>The menu will also pop up in response to shortcuts indicated by
<P>The menu will also pop up in response to shortcuts indicated by
putting a '&amp;' character in the <TT>label()</TT>. See <A href=Fl_Button.html#Fl_Button>
<TT>Fl_Button</TT></A> for a description of this. </P>
<P>Typing the <TT>shortcut()</TT> of any of the items will do exactly
the same as when you pick the item with the mouse. The '&amp;' character in
<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 '&amp;' character in
item names are only looked at when the menu is popped up, however. </P>
<P ALIGN=CENTER><IMG src="choice.gif" ALT="Fl_Choice widget."></P>
<H3>Methods</H3>
@@ -49,33 +49,33 @@ item names are only looked at when the menu is popped up, however. </P>
<LI><A href=#Fl_Choice.set_changed>set_changed</A></LI>
<LI><A href=#Fl_Choice.value>value</A></LI>
</UL>
<H4><A name=Fl_Choice.Fl_Choice>Fl_Choice::Fl_Choice(int x, int y, int
<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>.
Creates a new <TT>Fl_Choice</TT> widget using the given position,
size, and label string. The default boxtype is <TT>FL_UP_BOX</TT>.
<P>The constructor sets <TT>menu()</TT> to <TT>NULL</TT>. See <A href=Fl_Menu_.html#Fl_Menu_>
<TT>Fl_Menu_</TT></A> for the methods to set or change the menu. </P>
<H4><A name=Fl_Choice.~Fl_Choice>virtual Fl_Choice::~Fl_Choice()</A></H4>
The destructor removes the <TT>Fl_Choice</TT> widget and all of its
menu items.
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>.
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
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.
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.
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
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>
+16 -16
View File
@@ -17,9 +17,9 @@
</PRE>
</UL>
<H3>Description</H3>
This widget provides a round analog clock display and is provided for
This widget provides a round analog clock display and is provided for
Forms compatibility. It installs a 1-second timeout callback using <A href=functions.html#add_timeout>
<TT>Fl::add_timeout()</TT></A>.
<TT>Fl::add_timeout()</TT></A>.
<P ALIGN=CENTER><IMG src="clock.gif" ALT="Fl_Clock widget."> <IMG src="round_clock.gif" ALT="Fl_Clock widget."></P>
<H3>Methods</H3>
<UL>
@@ -30,28 +30,28 @@ Forms compatibility. It installs a 1-second timeout callback using <A href=func
<LI><A href=#Fl_Clock.second>second</A></LI>
<LI><A href=#Fl_Clock.value>value</A></LI>
</UL>
<H4><A name=Fl_Clock.Fl_Clock>Fl_Clock::Fl_Clock(int x, int y, int w,
<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>.
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
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.
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).
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).
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).
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
The first two forms of <TT>value</TT> set the displayed time to the
given UNIX time value or specific hours, minutes, and seconds.
<P>The third form of <TT>value</TT> returns the displayed time in
seconds since the UNIX epoch (January 1, 1970). </P>
</BODY></HTML>
+36 -36
View File
@@ -17,14 +17,14 @@
</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.
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>
@@ -41,47 +41,47 @@ or value is zero.
<LI><A href=#Fl_Color_Chooser.value>value</A></LI>
</UL>
<H4><A name=Fl_Color_Chooser.Fl_Color_Chooser>
Fl_Color_Chooser::Fl_Color_Chooser(int x, int y, int w, int h, const
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
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.
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 &lt;= hue &lt; 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,
Return the current hue. 0 &lt;= hue &lt; 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
<H4><A name=Fl_Color_Chooser.saturation>double
Fl_Color_Chooser::saturation() const</A></H4>
Returns the saturation. 0 &lt;= saturation &lt;= 1.
<H4><A name=Fl_Color_Chooser.value>double Fl_Color_Chooser::value()
Returns the saturation. 0 &lt;= saturation &lt;= 1.
<H4><A name=Fl_Color_Chooser.value>double Fl_Color_Chooser::value()
const</A></H4>
Returns the value/brightness. 0 &lt;= value &lt;= 1.
Returns the value/brightness. 0 &lt;= value &lt;= 1.
<H4><A name=Fl_Color_Chooser.r>double Fl_Color_Chooser::r() const</A></H4>
Returns the current red value. 0 &lt;= r &lt;= 1.
Returns the current red value. 0 &lt;= r &lt;= 1.
<H4><A name=Fl_Color_Chooser.g>double Fl_Color_Chooser::g() const</A></H4>
Returns the current green value. 0 &lt;= g &lt;= 1.
Returns the current green value. 0 &lt;= g &lt;= 1.
<H4><A name=Fl_Color_Chooser.b>double Fl_Color_Chooser::b() const</A></H4>
Returns the current blue value. 0 &lt;= b &lt;= 1.
<H4><A name=Fl_Color_Chooser.rgb>int Fl_Color_Chooser::rgb(double,
Returns the current blue value. 0 &lt;= b &lt;= 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
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&amp;, double&amp;,
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&amp;, double&amp;,
double&amp;)</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&amp;, double&amp;,
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&amp;, double&amp;,
double&amp;)</A></H4>
This <I>static</I> method converts RGB colors to HSV colorspace. </BODY>
</HTML>
+11 -11
View File
@@ -17,8 +17,8 @@
</PRE>
</UL>
<H3>Description</H3>
The <TT>Fl_Counter</TT> widget is provided for forms compatibility.
It controls a single floating point value.
The <TT>Fl_Counter</TT> widget is provided for forms compatibility.
It controls a single floating point value.
<P ALIGN=CENTER><IMG src="counter.gif" ALT="Fl_Counter widget."></P>
<H3>Methods</H3>
<UL>
@@ -27,21 +27,21 @@
<LI><A href=#Fl_Counter.lstep>lstep</A></LI>
<LI><A href=#Fl_Counter.type>type</A></LI>
</UL>
<H4><A name=Fl_Counter.Fl_Counter>Fl_Counter::Fl_Counter(int x, int y,
<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>.
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.
Destroys the valuator.
<H4><A name=Fl_Counter.lstep>double Fl_Counter::lstep() const</A></H4>
Set the increment for the double-arrow buttons. The default
value is 1.0.
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:
Sets the type of counter:
<UL>
<LI><TT>FL_NORMAL_COUNTER</TT> - Displays a counter with 4 arrow
<LI><TT>FL_NORMAL_COUNTER</TT> - Displays a counter with 4 arrow
buttons. </LI>
<LI><TT>FL_SIMPLE_COUNTER</TT> - Displays a counter with only 2 arrow
<LI><TT>FL_SIMPLE_COUNTER</TT> - Displays a counter with only 2 arrow
buttons. </LI>
</UL>
</BODY></HTML>
+7 -7
View File
@@ -17,8 +17,8 @@
</PRE>
</UL>
<H3>Description</H3>
The <TT>Fl_Dial</TT> widget provides a circular dial to control a
single floating point value.
The <TT>Fl_Dial</TT> widget provides a circular dial to control a
single floating point value.
<P ALIGN=CENTER><IMG src="dial.gif" ALT="Fl_Dial widget."></P>
<H3>Methods</H3>
<UL>
@@ -29,12 +29,12 @@ single floating point value.
<LI><A href=#Fl_Dial.angles>angles</A></LI>
<LI><A href=#Fl_Dial.type>type</A></LI>
</UL>
<H4><A name=Fl_Dial.Fl_Dial>Fl_Dial::Fl_Dial(int x, int y, int w, int
<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>.
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.
Destroys the valuator.
<H4>
<A name=Fl_Dial.angles>
@@ -52,7 +52,7 @@ progress clockwise). Normally angle1 is less than angle2, but if you
reverse them the dial moves counter-clockwise.
<H4><A name=Fl_Dial.type>type(uchar)</A></H4>
Sets the type of the dial to:
Sets the type of the dial to:
<UL>
<LI><TT>FL_NORMAL_DIAL</TT> - Draws a normal dial with a knob. </LI>
<LI><TT>FL_LINE_DIAL</TT> - Draws a dial with a line. </LI>
+14 -14
View File
@@ -17,19 +17,19 @@
</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
The <TT>Fl_Double_Window</TT> class provides a double-buffered window.
If possible this will use the X double buffering extension (Xdbe). If
not, it will draw the window data into an off-screen pixmap, and then
copy it to the on-screen window.
<P>It is highly recommended that you put the following code before the
first <TT>show()</TT> of <I>any</I> window in your program: </P>
<UL>
<PRE>
Fl::visual(FL_DOUBLE|FL_INDEX)
</PRE>
</UL>
This makes sure you can use Xdbe on servers where double buffering
does not exist for every visual.
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>
@@ -37,15 +37,15 @@ does not exist for every visual.
<LI><A href=#Fl_Double_Window.pixmap>pixmap</A></LI>
</UL>
<H4><A name=Fl_Double_Window.Fl_Double_Window>
Fl_Double_Window::Fl_Double_Window(int x, int y, int w, int h, const
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
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.
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
+4 -4
View File
@@ -26,10 +26,10 @@
<LI><A href=#Fl_Float_Input.~Fl_Float_Input>~Fl_Float_Input</A></LI>
</UL>
<H4><A name=Fl_Float_Input.Fl_Float_Input>
Fl_Float_Input::Fl_Float_Input(int x, int y, int w, int h, const char
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
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>
+13 -13
View File
@@ -17,11 +17,11 @@
</PRE>
</UL>
<H3>Description</H3>
Emulation of the Forms &quot;free&quot; 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
Emulation of the Forms &quot;free&quot; widget. This emulation allows the free
demo to run, and appears to be useful for porting programs written in
Forms which use the free widget or make subclasses of the Forms
widgets.
<P>There are five types of free, which determine when the handle
function is called: </P>
<UL>
<PRE>
@@ -32,19 +32,19 @@ function is called: </P>
#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.
<P>An FL_INPUT_FREE accepts FL_FOCUS events. A FL_CONTINUOUS_FREE sets
a timeout callback 100 times a second and provides a FL_STEP event,
this has obvious detrimental effects on machine performance.
FL_ALL_FREE does both. FL_SLEEPING_FREE are deactivated. </P>
<H3>Methods</H3>
<UL>
<LI><A href=#Fl_Free.Fl_Free>Fl_Free</A></LI>
<LI><A href=#Fl_Free.~Fl_Free>~Fl_Free</A></LI>
</UL>
<H4><A name=Fl_Free.Fl_Free>Fl_Free(uchar type, int, int, int, int,
<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:
function. The handle function should be declared as follows:
<UL>
<PRE>
int
@@ -55,9 +55,9 @@ handle_function(Fl_Widget *w,
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:
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:
+71 -71
View File
@@ -17,15 +17,15 @@
</PRE>
</UL>
<H3>Description</H3>
The <TT>Fl_Gl_Window</TT> widget sets things up so OpenGL works, and
also keeps an OpenGL &quot;context&quot; for that window, so that changes to the
The <TT>Fl_Gl_Window</TT> widget sets things up so OpenGL works, and
also keeps an OpenGL &quot;context&quot; for that window, so that changes to the
lighting and projection may be reused between redraws. Fl_Gl_Window
also flushes the OpenGL streams and swaps buffers after <TT>draw()</TT>
returns.
<P>OpenGL hardware typically provides some overlay bit planes, which
are very useful for drawing UI controls atop your 3D graphics. If the
overlay hardware is not provided, FLTK tries to simulate the overlay,
This works pretty well if your graphics are double buffered, but not
returns.
<P>OpenGL hardware typically provides some overlay bit planes, which
are very useful for drawing UI controls atop your 3D graphics. If the
overlay hardware is not provided, FLTK tries to simulate the overlay,
This works pretty well if your graphics are double buffered, but not
very well for single-buffered. </P>
<H3>Methods</H3>
<CENTER>
@@ -64,32 +64,32 @@ very well for single-buffered. </P>
</TD></TR>
</TABLE>
</CENTER>
<H4><A name=Fl_Gl_Window.Fl_Gl_Window>Fl_Gl_Window::Fl_Gl_Window(int x,
<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
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.
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
<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
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
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 &lt;FL/fl_draw.H&gt;, or <TT>glX</TT>
directly. Do not call <TT>gl_start()</TT> or <TT>gl_finish()</TT>. </P>
<P>If double-buffering is enabled in the window, the back and front
<P>If double-buffering is enabled in the window, the back and front
buffers are swapped after this function is completed. </P>
<H4><A name=Fl_Gl_Window.mode>const int Fl_Gl_Window::mode() const
<BR> int Fl_Gl_Window::mode(int m)</A></H4>
Set or change the OpenGL capabilites of the window. The value can be
any of the following OR'd together:
Set or change the OpenGL capabilites of the window. The value can be
any of the following OR'd together:
<UL>
<LI><TT>FL_RGB</TT> - RGB color (not indexed) </LI>
<LI><TT>FL_RGB8</TT> - RGB color with at least 8 bits of each color </LI>
@@ -102,22 +102,22 @@ any of the following OR'd together:
<LI><TT>FL_STENCIL</TT> - stencil buffer </LI>
<LI><TT>FL_MULTISAMPLE</TT> - multisample antialiasing </LI>
</UL>
<TT>FL_RGB</TT> and <TT>FL_SINGLE</TT> have a value of zero, so they
are &quot;on&quot; unless you give <TT>FL_INDEX</TT> or <TT>FL_DOUBLE</TT>.
<TT>FL_RGB</TT> and <TT>FL_SINGLE</TT> have a value of zero, so they
are &quot;on&quot; unless you give <TT>FL_INDEX</TT> or <TT>FL_DOUBLE</TT>.
<P>If the desired combination cannot be done, FLTK will try turning off <TT>
FL_MULTISAMPLE</TT>. If this also fails the <TT>show()</TT> will call <TT>
Fl::error()</TT> and not show the window. </P>
<P>You can change the mode while the window is displayed. This is most
useful for turning double-buffering on and off. Under X this will
cause the old X window to be destroyed and a new one to be created. If
this is a top-level window this will unfortunately also cause the
<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
will change, possibly breaking other code. It is best to make the GL
window a child of another window if you wish to do this! </P>
<H4><A name=Fl_Gl_Window.can_do>static int Fl_Gl_Window::can_do(int)
<BR> int Fl_Gl_Window::can_do() const</A></H4>
Returns non-zero if the hardware supports the given or current OpenGL
mode.
Returns non-zero if the hardware supports the given or current OpenGL
mode.
<h4><a name=Fl_Gl_Window.context>void* Fl_Gl_Window::context() const;
<br>void Fl_Gl_Window::context(void*, int destroy_flag = false);</a></h4>
@@ -136,11 +136,11 @@ href=#Fl_Gl_Window.mode><tt>mode()</tt></a> is changed, or the next time
<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
<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:
draw()</TT> method to avoid unneccessarily initializing the OpenGL
context. Just do this:
<UL><PRE>
void mywindow::draw() {
if (!valid()) {
@@ -153,59 +153,59 @@ void mywindow::draw() {
}
</PRE></UL>
You can turn <TT>valid()</TT> on by calling <TT>valid(1)</TT>. You
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.
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>.
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
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.
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
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
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
draw_overlay()</TT> method being called and can also be used to
implement feedback and/or selection within the <TT>handle()</TT>
method.
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.
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
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
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
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
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.
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
Fl_Gl_Window::valid()</TT> and set the same transformation. If you
don't your code may not work on other systems. Depending on the OS,
and on whether overlays are real or simulated, the OpenGL context may
be the same or different between the overlay and main window. </P>
</BODY></HTML>
+36 -36
View File
@@ -19,12 +19,12 @@
</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
The <TT>Fl_Group</TT> class is the FLTK container widget. It maintains
an array of child widgets. These children can themselves be any widget
including <TT>Fl_Group</TT>. The most important subclass of <TT>Fl_Group</TT>
is <A href=Fl_Window.html#Fl_Window><TT>Fl_Window</TT></A>, however
groups can also be used to control radio buttons or to enforce resize
behavior.
is <A href=Fl_Window.html#Fl_Window><TT>Fl_Window</TT></A>, however
groups can also be used to control radio buttons or to enforce resize
behavior.
<H3>Methods</H3>
<CENTER>
<TABLE width=90% summary="Fl_Group methods.">
@@ -61,17 +61,17 @@ behavior.
</TD></TR>
</TABLE>
</CENTER>
<H4><A name=Fl_Group.Fl_Group>Fl_Group::Fl_Group(int x, int y, int w,
<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>.
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
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.
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 &amp;w)
<BR> void Fl_Group::add(Fl_Widget *w)</A></H4>
@@ -99,8 +99,8 @@ This does <tt>insert(w, find(beforethis))</tt>. This will append the
widget if <tt>beforethis</tt> is not in the group.
<H4><A name=Fl_Group.remove>void Fl_Group::remove(Fl_Widget &amp;w)</A></H4>
Removes a widget from the group. This does nothing if the widget is
not currently a child of this group.
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.current>static Fl_Group *Fl_Group::current()
<BR> static void Fl_Group::current(Fl_Group *w)</A></H4>
@@ -108,48 +108,48 @@ not currently a child of this group.
constructor automatically does <tt>current()->add(widget)</tt> if this is not null.
To prevent new widgets from being added to a group, call <TT>Fl_Group::current(0)</TT>.
<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> <i>is exactly the same as</i> <TT>current(this)</TT>.
<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> <i>is exactly the same as</i> <TT>current(this)</TT>.
<P><I>Don't forget to <TT>end()</TT> the group or window!</I></P>
<H4><A name=Fl_Group.end>void Fl_Group::end()</A></H4>
<TT>end()</TT> <i>is exactly the same as</i> <TT>current(this-&gt;parent())</TT>. Any new widgets
added to the widget tree will be added to the parent of the group.
<TT>end()</TT> <i>is exactly the same as</i> <TT>current(this-&gt;parent())</TT>. Any new widgets
added to the widget tree will be added to the parent of the group.
<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 is only
valid until the next time a child is added or removed.</I>
<H4><A name=Fl_Group.child>Fl_Widget *Fl_Group::child(int n) const</A></H4>
Returns <tt>array()[n]</tt>. <i>No range checking is done!</i>
<H4><A name=Fl_Group.children>int Fl_Group::children() const</A></H4>
Returns how many child widgets the group has.
Returns how many child widgets the group has.
<H4><A name=Fl_Group.find>int Fl_Group::find(const Fl_Widget *w) const
<BR> int Fl_Group::find(const Fl_Widget &amp;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.
NULL</TT> or not found.
<H4><A name=Fl_Group.resizable>void Fl_Group::resizable(Fl_Widget *box)
<BR> void Fl_Group::resizable(Fl_Widget &amp;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.
The resizable widget defines the resizing box for the group. When the
group is resized it calculates a new size and position for all of its
children. Widgets that are horizontally or vertically inside the
dimensions of the box are scaled to the new size. Widgets outside the
box are moved.
<P>In these examples the gray area is the resizable:
<BR></P>
<P align=center><IMG align=TOP SRC="resizebox1.gif" ALT="Resizeable groups">&nbsp;&nbsp;
<IMG align=TOP SRC="resizebox2.gif" ALT="Resizeable groups"></P>
<P>The resizable may be set to the group itself (this is the default
value for an <TT>Fl_Group</TT>, although <TT>NULL</TT> is the default
for an <TT>Fl_Window</TT>), in which case all the contents are resized.
If the resizable is <TT>NULL</TT> then all widgets remain a fixed size
<P>The resizable may be set to the group itself (this is the default
value for an <TT>Fl_Group</TT>, although <TT>NULL</TT> is the default
for an <TT>Fl_Window</TT>), in which case all the contents are resized.
If the resizable is <TT>NULL</TT> then all widgets remain a fixed size
and distance from the top-left corner. </P>
<P>It is possible to achieve any type of resize behavior by using an
invisible <TT>Fl_Box</TT> as the resizable and/or by using a hierarchy
<P>It is possible to achieve any type of resize behavior by using an
invisible <TT>Fl_Box</TT> as the resizable and/or by using a hierarchy
of child <TT>Fl_Group</TT>'s. </P>
<H4><A name=Fl_Group.add_resizable>Fl_Group
<H4><A name=Fl_Group.add_resizable>Fl_Group
&amp;Fl_Group::add_resizable(Fl_Widget &amp;box)</A></H4>
Adds a widget to the group and makes it the resizable widget.
Adds a widget to the group and makes it the resizable widget.
</BODY></HTML>
+15 -15
View File
@@ -18,12 +18,12 @@
</UL>
<H3>Description</H3>
The <TT>Fl_Hold_Browser</TT> class is a subclass of <TT>Fl_Browser</TT>
which lets the user select a single item, or no items by clicking on
the empty space. As long as the mouse button is held down the item
pointed to by it is highlighted, and this highlighting remains on when
the mouse button is released. Normally the callback is done when the
user releases the mouse, but you can change this with <TT>when()</TT>.
<P>See <A href=Fl_Browser.html#Fl_Browser><TT>Fl_Browser</TT></A> for
which lets the user select a single item, or no items by clicking on
the empty space. As long as the mouse button is held down the item
pointed to by it is highlighted, and this highlighting remains on when
the mouse button is released. Normally the callback is done when the
user releases the mouse, but you can change this with <TT>when()</TT>.
<P>See <A href=Fl_Browser.html#Fl_Browser><TT>Fl_Browser</TT></A> for
methods to add and remove lines from the browser. </P>
<H3>Methods</H3>
<UL>
@@ -34,22 +34,22 @@ methods to add and remove lines from the browser. </P>
<LI><A href=#Fl_Hold_Browser.value>value</A></LI>
</UL>
<H4><A name=Fl_Hold_Browser.Fl_Hold_Browser>
Fl_Hold_Browser::Fl_Hold_Browser(int x, int y, int w, int h, const char
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
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
.
<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>.
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>.
Same as <TT>value(0)</TT>.
<H4><A name=Fl_Hold_Browser.select>int Fl_Browser::select(int,int=1)
<BR> int Fl_Browser::selected(int) const</A></H4>
You can use these for compatibility with <A href=Fl_Multi_Browser.html#Fl_Multi_Browser>
<TT>Fl_Multi_Browser</TT></A>. If you turn on the selection of more
than one line the results are unpredictable.
<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
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>
+61 -61
View File
@@ -20,13 +20,13 @@
</PRE>
</UL>
<H3>Description</H3>
<P>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 assumes the font can draw any characters in the
ISO-8859-1 character set.
<P>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 assumes the font can draw any characters in the
ISO-8859-1 character set.
<CENTER><TABLE border=1 WIDTH=90% summary="Fl_Input keyboard and mouse bindings.">
@@ -43,32 +43,32 @@ clipboard by selecting the region with mouse button 2.
<TR><TD><B>Mouse button 3</B></TD><TD>Currently acts like button 1.</TD></TR>
<TR><TD><B>Backspace</B></TD><TD>Deletes one character to the left, or
<TR><TD><B>Backspace</B></TD><TD>Deletes one character to the left, or
deletes the selected region.</TD></TR>
<TR><TD><B>Enter</B></TD><TD>May cause the callback, see when().</TD></TR>
<TR><TD><B>^A or Home</B></TD><TD>Go to start of line.</TD></TR>
<TR><TD><B>^B or Left</B></TD><TD>Move left</TD></TR>
<TR><TD><B>^C</B></TD><TD>Copy the selection to the clipboard</TD></TR>
<TR><TD><B>^D or Delete</B></TD><TD>Deletes one character to the right
<TR><TD><B>^D or Delete</B></TD><TD>Deletes one character to the right
or deletes the selected region.</TD></TR>
<TR><TD><B>^E or End</B></TD><TD>Go to the end of line.</TD></TR>
<TR><TD><B>^F or Right</B></TD><TD>Move right</TD></TR>
<TR><TD><B>^K</B></TD><TD>Delete to the end of line (next \n character)
or deletes a single \n character. These deletions are all concatenated
<TR><TD><B>^K</B></TD><TD>Delete to the end of line (next \n character)
or deletes a single \n character. These deletions are all concatenated
into the clipboard.</TD></TR>
<TR><TD><B>^N or Down</B></TD><TD>Move down (for Fl_Multiline_Input
<TR><TD><B>^N or Down</B></TD><TD>Move down (for Fl_Multiline_Input
only, otherwise it moves to the next input field).</TD></TR>
<TR><TD><B>^P or Up</B></TD><TD>Move up (for Fl_Multiline_Input only,
<TR><TD><B>^P or Up</B></TD><TD>Move up (for Fl_Multiline_Input only,
otherwise it moves to the previous input field).</TD></TR>
<TR><TD><B>^U</B></TD><TD>Delete everything.</TD></TR>
<TR><TD><B>^V or ^Y</B></TD><TD>Paste the clipboard</TD></TR>
<TR><TD><B>^X or ^W</B></TD><TD>Copy the region to the clipboard and
<TR><TD><B>^X or ^W</B></TD><TD>Copy the region to the clipboard and
delete it.</TD></TR>
<TR><TD><B>^Z or ^_</B></TD><TD>Undo. This is a single-level undo
mechanism, but all adjacent deletions and insertions are concatenated
into a single &quot;undo&quot;. Often this will undo a lot more than you
<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 &quot;undo&quot;. Often this will undo a lot more than you
expected.</TD></TR>
<TR><TD><B>Shift+move</B></TD><TD>Move the cursor but also extend the
<TR><TD><B>Shift+move</B></TD><TD>Move the cursor but also extend the
selection.</TD></TR>
<TR><TD><B>RightCtrl or
@@ -259,76 +259,76 @@ inserted.
</TD></TR>
</TABLE>
</CENTER>
<H4><A name=Fl_Input.Fl_Input>Fl_Input::Fl_Input(int x, int y, int w,
<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>.
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.
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
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 &quot;&quot;. 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
NULL</TT> is the same as &quot;&quot;. This returns non-zero if the new value is
different than the current one. You can use the second version to
directly set the length if you know it already or want to put nul's in
the text. </P>
<H4><A name=Fl_Input.static_value>int Fl_Input::static_value(const
<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.
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.
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.
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>:
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
<LI><TT>0</TT>: The callback is not done, but <TT>changed()</TT> is
turned on. </LI>
<LI><TT>FL_WHEN_CHANGED</TT>: The callback is done each time the text
<LI><TT>FL_WHEN_CHANGED</TT>: The callback is done each time the text
is changed by the user. </LI>
<LI><TT>FL_WHEN_RELEASE</TT>: The callback will be done when this
widget loses the focus, including when the window is unmapped. This
is a useful value for text fields in a panel where doing the callback
on every change is wasteful. However the callback will also happen if
the mouse is moved out of the window, which means it should not do
anything visible (like pop up an error message). You might do better
<LI><TT>FL_WHEN_RELEASE</TT>: The callback will be done when this
widget loses the focus, including when the window is unmapped. This
is a useful value for text fields in a panel where doing the callback
on every change is wasteful. However the callback will also happen if
the mouse is moved out of the window, which means it should not do
anything visible (like pop up an error message). You might do better
setting this to zero, and scanning all the items for <TT>changed()</TT>
when the OK button on a panel is pressed. </LI>
<LI><TT>FL_WHEN_ENTER_KEY</TT>: If the user types the Enter key, the
entire text is selected, and the callback is done if the text has
changed. Normally the Enter key will navigate to the next field (or
insert a newline for a <TT>Fl_Mulitline_Input</TT>), this changes the
<LI><TT>FL_WHEN_ENTER_KEY</TT>: If the user types the Enter key, the
entire text is selected, and the callback is done if the text has
changed. Normally the Enter key will navigate to the next field (or
insert a newline for a <TT>Fl_Mulitline_Input</TT>), this changes the
behavior. </LI>
<LI><TT>FL_WHEN_ENTER_KEY|FL_WHEN_NOT_CHANGED</TT>: The Enter key will
do the callback even if the text has not changed. Useful for command
<LI><TT>FL_WHEN_ENTER_KEY|FL_WHEN_NOT_CHANGED</TT>: The Enter key will
do the callback even if the text has not changed. Useful for command
fields. </LI>
</UL>
<H4><A name=Fl_Input.textcolor>Fl_Color Fl_Input::textcolor() const
<BR> void Fl_Input::textcolor(Fl_Color)</A></H4>
Gets or sets the color of the text in the input field.
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.
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()
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.
+59 -59
View File
@@ -21,9 +21,9 @@
<H3>Description</H3>
This is a virtual base class below <A href=Fl_Input.html#Fl_Input><TT>
Fl_Input</TT></A>. It has all the same interfaces, but lacks the <TT>
handle()</TT> and <TT>draw()</TT> method. You may want to subclass it
if you are one of those people who likes to change how the editing keys
work.
handle()</TT> and <TT>draw()</TT> method. You may want to subclass it
if you are one of those people who likes to change how the editing keys
work.
<P>This can act like any of the subclasses of Fl_Input, by setting <TT>
type()</TT> to one of the following values: </P>
<UL>
@@ -73,78 +73,78 @@ type()</TT> to one of the following values: </P>
</TD></TR>
</TABLE>
</CENTER>
<H4><A name=Fl_Input_.Fl_Input_>Fl_Input_::Fl_Input_(int x, int y, int
<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>.
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)
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)
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.
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
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
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
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.
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_.maximum_size">void Fl_Input_::maximum_size(int m)<BR>
int Fl_Input_::maximum_size() const</A></H4>
<P>Sets or returns the maximum length of the input field.
<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
&quot;position&quot; is where the cursor is. The &quot;mark&quot; 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
The input widget maintains two pointers into the string. The
&quot;position&quot; is where the cursor is. The &quot;mark&quot; is the other end of the
selected text. If they are equal then there is no selection. Changing
this does not affect the clipboard (use <TT>copy()</TT> to do that).
<P>Changing these values causes a <TT>redraw()</TT>. The new values
are bounds checked. The return value is non-zero if the new position
is different than the old one. <TT>position(n)</TT> is the same as <TT>
position(n,n)</TT>. <TT>mark(n)</TT> is the same as <TT>
position(position(),n)</TT>. </P>
<H4><A name=Fl_Input_.mark>int Fl_Input_::mark() const
<BR> int Fl_Input_::mark(int new_mark)</A></H4>
Gets or sets the current selection mark. <TT>mark(n)</TT> is the same
as <TT>position(position(),n)</TT>.
<H4><A name=Fl_Input_.replace>int Fl_Input_::replace(int a, int b,
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.
a</TT> and <TT>b</TT> (either one may be less or equal to the other),
and then inserts the string <TT>insert</TT> at that point and leaves
the <TT>mark()</TT> and <TT>position()</TT> after the insertion. Does
the callback if <TT>when() FL_WHEN_CHANGED</TT> and there is a change.
<P>Set <TT>start</TT> and <TT>end</TT> equal to not delete anything.
Set <TT>insert</TT> to <TT>NULL</TT> to not insert anything. </P>
<P><TT>length</TT> must be zero or <TT>strlen(insert)</TT>, this saves
a tiny bit of time if you happen to already know the length of the
insertion, or can be used to insert a portion of a string or a string
<P><TT>length</TT> must be zero or <TT>strlen(insert)</TT>, this saves
a tiny bit of time if you happen to already know the length of the
insertion, or can be used to insert a portion of a string or a string
containing nul's. </P>
<P><TT>a</TT> and <TT>b</TT> are clamped to the 0..<TT>size()</TT>
range, so it is safe to pass any values. </P>
<P><TT>cut()</TT> and <TT>insert()</TT> are just inline functions that
<P><TT>cut()</TT> and <TT>insert()</TT> are just inline functions that
call <TT>replace()</TT>. </P>
<H4><A name=Fl_Input_.cut>int Fl_Input_::cut()
<BR> int Fl_Input_::cut(int n)
@@ -153,24 +153,24 @@ call <TT>replace()</TT>. </P>
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.
and <TT>b</TT>. <TT>A</TT>, <TT>b</TT>, and <TT>n</TT> are all clamped
to the size of the string. The mark and point are left where the
deleted text was.
<P>If you want the data to go into the clipboard, do <TT>
Fl_Input_::copy()</TT> before calling <TT>Fl_Input_::cut()</TT>, or do <TT>
Fl_Input_::copy_cuts()</TT> afterwards. </P>
<H4><A name=Fl_Input_.insert>int Fl_Input_::insert(const char *t,int
<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>.
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.
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.
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
Copy all the previous contiguous cuts from the undo information to the
clipboard. This is used to make ^K work. </BODY></HTML>
+4 -4
View File
@@ -25,10 +25,10 @@
<LI><A href=#Fl_Int_Input.Fl_Int_Input>Fl_Int_Input</A></LI>
<LI><A href=#Fl_Int_Input.~Fl_Int_Input>~Fl_Int_Input</A></LI>
</UL>
<H4><A name=Fl_Int_Input.Fl_Int_Input>Fl_Int_Input::Fl_Int_Input(int x,
<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
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>
+9 -9
View File
@@ -17,14 +17,14 @@
</PRE>
</UL>
<H3>Description</H3>
Buttons generate callbacks when they are clicked by the user. You
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>.
and <TT>when()</TT>.
<P ALIGN=CENTER><IMG SRC="Fl_Light_Button.gif" ALT="Fl_Light_Button widget."></P>
<P>The <TT>Fl_Light_Button</TT> subclass display the &quot;on&quot; state by
turning on a light, rather than drawing pushed in. The shape of the
&quot;light&quot; is initially set to FL_DOWN_BOX. The color of the light when
on is controlled with <TT>selection_color()</TT>, which defaults to
<P>The <TT>Fl_Light_Button</TT> subclass display the &quot;on&quot; state by
turning on a light, rather than drawing pushed in. The shape of the
&quot;light&quot; 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.</P>
<H3>Methods</H3>
<UL>
@@ -32,10 +32,10 @@ FL_YELLOW.</P>
<LI><A href=#Fl_Light_Button.~Fl_Light_Button>~Fl_Light_Button</A></LI>
</UL>
<H4><A name=Fl_Light_Button.Fl_Light_Button>
Fl_Light_Button::Fl_Light_Button(int x, int y, int w, int h, const char
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.
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>
+25 -25
View File
@@ -19,11 +19,11 @@
</PRE>
</UL>
<H3>Description</H3>
All widgets that have a menu in FLTK are subclassed off of this class.
All widgets that have a menu in FLTK are subclassed off of this class.
Currently FLTK provides you with <A href=Fl_Menu_Button.html#Fl_Menu_Button>
<TT>Fl_Menu_Button</TT></A>, <A href=Fl_Menu_Bar.html#Fl_Menu_Bar><TT>
Fl_Menu_Bar</TT></A>, and <A href=Fl_Choice.html#Fl_Choice><TT>Fl_Choice</TT>
</A>.
</A>.
<P>The class contains a pointer to an array of structures of type <A
href=Fl_Menu_Item.html#Fl_Menu_Item> <TT>Fl_Menu_Item</TT></A>. The
@@ -71,7 +71,7 @@ be "private": a dynamically allocated array managed by the Fl_Menu_.
</TABLE>
</CENTER>
<H4><A name=Fl_Menu_.Fl_Menu_>Fl_Menu_::Fl_Menu_(int x, int y, int w,
<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,
@@ -124,9 +124,9 @@ will result in a submenu called &quot;foo&quot; and one in that called
copied to new memory and can be freed. The other arguments (including
the shortcut) are copied into the menu item unchanged. </P>
<P>If an item exists already with that name then it is replaced with
this new one. Otherwise this new one is added to the end of the
correct menu or submenu. The return value is the offset into the array
<P>If an item exists already with that name then it is replaced with
this new one. Otherwise this new one is added to the end of the
correct menu or submenu. The return value is the offset into the array
that the new entry was placed at.</P>
<P>The return value is the index into the array that the entry was put. </P>
@@ -163,42 +163,42 @@ href=Fl_Menu_Item.html>Fl_Menu_Item</a>.
<BR> int Fl_Menu_::value(int)
<BR> const Fl_Menu_Item* mvalue() const
<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.
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*
<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.
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
Make the shortcuts for this menu work no matter what window has the
focus when you type it. This is done by using <A href=osissues.html#add_handler>
<TT>Fl::add_handler()</TT></A>. This <TT>Fl_Menu_</TT> widget does not
have to be visible (ie the window it is in can be hidden, or it does
not have to be put in a window at all).
<P>Currently there can be only one <TT>global()</TT>menu. Setting a new
<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 (so don't destroy the widget!)</P>
<H4><A name=Fl_Menu_.text>const char* Fl_Menu_::text() const
<BR> const char* Fl_Menu_::text(int i) const</A></H4>
Returns the title of the last item chosen, or of item <TT>i</TT>.
Returns the title of the last item chosen, or 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.
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.
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.
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
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>
+23 -23
View File
@@ -17,47 +17,47 @@
</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
This widget provides a standard menubar interface. Usually you will
put this widget along the top edge of your window. The height of the
widget should be 30 for the menu titles to draw correctly with the
default font.
<P>The items on the bar and the menus they bring up are defined by a
single <A href=Fl_Menu_Item.html#Fl_Menu_Item><TT>Fl_Menu_Item</TT></A>
array. Because a <TT>Fl_Menu_Item</TT> array defines a hierarchy, the
top level menu defines the items in the menubar, while the submenus
define the pull-down menus. Sub-sub menus and lower pop up to the right
array. Because a <TT>Fl_Menu_Item</TT> array defines a hierarchy, the
top level menu defines the items in the menubar, while the submenus
define the pull-down menus. Sub-sub menus and lower pop up to the right
of the submenus. </P>
<P ALIGN=CENTER><IMG src="menubar.gif" ALT="Fl_Menu_Bar widget."></P>
<P>If there is an item in the top menu that is not a title of a
submenu, then it acts like a &quot;button&quot; in the menubar. Clicking on it
<P>If there is an item in the top menu that is not a title of a
submenu, then it acts like a &quot;button&quot; in the menubar. Clicking on it
will pick it. </P>
<P>When the user picks an item off the menu, the item's callback is
done with the menubar as the <TT>Fl_Widget*</TT> argument. If the item
<P>When the user picks an item off the menu, the item's callback is
done with the menubar as the <TT>Fl_Widget*</TT> argument. If the item
does not have a callback the menubar's callback is done instead. </P>
<P>Submenus will also pop up in response to shortcuts indicated by
putting a '&amp;' character in the name field of the menu item. If you put a
'&amp;' character in a top-level &quot;button&quot; then the shortcut picks it. The
<P>Submenus will also pop up in response to shortcuts indicated by
putting a '&amp;' character in the name field of the menu item. If you put a
'&amp;' character in a top-level &quot;button&quot; then the shortcut picks it. The
'&amp;' character in submenus is ignored until the menu is popped up. </P>
<P>Typing the <TT>shortcut()</TT> of any of the menu items will cause
<P>Typing the <TT>shortcut()</TT> of any of the menu items will cause
callbacks exactly the same as when you pick the item with the mouse. </P>
<H3>Methods</H3>
<UL>
<LI><A href=#Fl_Menu_Bar.Fl_Menu_Bar>Fl_Menu_Bar</A></LI>
<LI><A href=#Fl_Menu_Bar.~Fl_Menu_Bar>~Fl_Menu_Bar</A></LI>
</UL>
<H4><A name=Fl_Menu_Bar.Fl_Menu_Bar>Fl_Menu_Bar::Fl_Menu_Bar(int x, int
<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>.
Creates a new <TT>Fl_Menu_Bar</TT> widget using the given position,
size, and label string. The default boxtype is <TT>FL_UP_BOX</TT>.
<P>The constructor sets <TT>menu()</TT> to <TT>NULL</TT>. See <A href=Fl_Menu_.html#Fl_Menu_>
<TT>Fl_Menu_</TT></A> for the methods to set or change the menu. </P>
<P><TT>labelsize()</TT>, <TT>labelfont()</TT>, and <TT>labelcolor()</TT>
are used to control how the menubar items are drawn. They are
initialized from the <TT>Fl_Menu</TT> static variables, but you can
are used to control how the menubar items are drawn. They are
initialized from the <TT>Fl_Menu</TT> static variables, but you can
change them if desired. </P>
<P><TT>label()</TT> is ignored unless you change <TT>align()</TT> to
<P><TT>label()</TT> is ignored unless you change <TT>align()</TT> to
put it outside the menubar. </P>
<H4><A name=Fl_Menu_Bar.~Fl_Menu_Bar>virtual Fl_Menu_Bar::~Fl_Menu_Bar()</A>
</H4>
The destructor removes the <TT>Fl_Menu_Bar</TT> widget and all of its
The destructor removes the <TT>Fl_Menu_Bar</TT> widget and all of its
menu items. </BODY></HTML>
+31 -31
View File
@@ -17,23 +17,23 @@
</PRE>
</UL>
<H3>Description</H3>
This is a button that when pushed pops up a menu (or hierarchy of
This is a button that when pushed pops up a menu (or hierarchy of
menus) defined by an array of <A href=Fl_Menu_Item.html#Fl_Menu_Item><TT>
Fl_Menu_Item</TT></A> objects.
Fl_Menu_Item</TT></A> objects.
<P ALIGN=CENTER><IMG src="menu_button.gif" ALT="Fl_Menu_Button widget."></P>
<P>Normally any mouse button will pop up a menu and it is lined up
<P>Normally any mouse button will pop up a menu and it is lined up
below the button as shown in the picture. However an <TT>Fl_Menu_Button</TT>
may also control a pop-up menu. This is done by setting the <TT>type()</TT>
, see below. </P>
<P>The menu will also pop up in response to shortcuts indicated by
<P>The menu will also pop up in response to shortcuts indicated by
putting a '&amp;' character in the <TT>label()</TT>. </P>
<P>Typing the <TT>shortcut()</TT> of any of the menu items will cause
callbacks exactly the same as when you pick the item with the mouse.
The '&amp;' character in menu item names are only looked at when the menu is
<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 '&amp;' character in menu item names are only looked at when the menu is
popped up, however. </P>
<P>When the user picks an item off the menu, the item's callback is
done with the menu_button as the <TT>Fl_Widget*</TT> argument. If the
item does not have a callback the menu_button's callback is done
<P>When the user picks an item off the menu, the item's callback is
done with the menu_button as the <TT>Fl_Widget*</TT> argument. If the
item does not have a callback the menu_button's callback is done
instead. </P>
<H3>Methods</H3>
<UL>
@@ -43,37 +43,37 @@ instead. </P>
<LI><A href=#Fl_Menu_Button.type>type</A></LI>
</UL>
<H4><A name=Fl_Menu_Button.Fl_Menu_Button>
Fl_Menu_Button::Fl_Menu_Button(int x, int y, int w, int h, const char
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>.
Creates a new <TT>Fl_Menu_Button</TT> widget using the given position,
size, and label string. The default boxtype is <TT>FL_UP_BOX</TT>.
<P>The constructor sets <TT>menu()</TT> to <TT>NULL</TT>. See <A href=Fl_Menu_.html#Fl_Menu_>
<TT>Fl_Menu_</TT></A> for the methods to set or change the menu. </P>
<H4><A name=Fl_Menu_Button.~Fl_Menu_Button>virtual
<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.
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.
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_Menu_Button::type(uchar)</A></H4>
If <TT>type()</TT> is zero a normal menu button is produced. If it is
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,
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 &quot;on top&quot;. You can also make several
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 &quot;on top&quot;. You can also make several
widgets covering different areas for context-sensitive popup menus. </P>
<P>The popup menus appear with the cursor pointing at the previously
<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
value(0)</TT> after the menu items are picked to forget the current
item. </P>
</BODY></HTML>
+96 -96
View File
@@ -47,7 +47,7 @@ enum { // values for flags:
};
</PRE>
</UL>
Typically menu items are statically defined; for example:
Typically menu items are statically defined; for example:
<UL><PRE>
Fl_Menu_Item popup[] = {
{&quot;&amp;alpha&quot;, FL_ALT+'a', the_cb, (void*)1},
@@ -73,12 +73,12 @@ produces:
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
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
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. </P>
<H3>Methods</H3>
<CENTER>
@@ -132,165 +132,165 @@ releases of FLTK. </P>
<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 '&amp;' in the item will print an
underscore under the next letter, and if the menu is popped up that
This is the title of the item. A <TT>NULL</TT> here indicates the end
of the menu (or of a submenu). A '&amp;' in the item will print an
underscore under the next letter, and if the menu is popped up that
letter will be a &quot;shortcut&quot; to pick that item. To get a
real '&amp;' put two
in a row.
<H4><A name=Fl_Menu_Item.labeltype>Fl_Labeltype
real '&amp;' 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()
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()
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.html#Enumerations>
enumeration list</A> for predefined fonts. The default value is a
enumeration list</A> for predefined fonts. The default value is a
Helvetica font. The function <A href=functions.html#set_font><TT>
Fl::set_font()</TT></A> can define new fonts.
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
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
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)-&gt;mvalue()</TT> where <TT>w</TT> is the widget argument.
((Fl_Menu_*)w)-&gt;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
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
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.
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
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.
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=functions.html#event_key>
<TT>Fl::event_key()</TT></A>, but will usually be an ASCII letter. Use
<TT>Fl::event_key()</TT></A>, but will usually be an ASCII letter. Use
a lower-case letter unless you require the shift key to be held down. </P>
<P>The shift flags can be any set of values accepted by <A href=functions.html#event_state>
<TT>Fl::event_state()</TT></A>. If the bit is on that shift key must
be pushed. Meta, Alt, Ctrl, and Shift must be off if they are not in
the shift flags (zero for the other bits indicates a &quot;don't care&quot;
<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 &quot;don't care&quot;
setting). </P>
<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
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.
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.
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 &quot;adjacent&quot; 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.
Returns true if this item is a radio item. When a radio button is
selected all &quot;adjacent&quot; 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.
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 &quot;on&quot; for the menu item. Note that this
Turns the check or radio item &quot;on&quot; for the menu item. Note that this
does not turn off any adjacent radio items like <TT>set_only()</TT>
does.
does.
<H4><A name=Fl_Menu_Item.setonly>void Fl_Menu_Item::setonly()</A></H4>
Turns the radio item &quot;on&quot; for the menu item and turns off adjacent
radio item.
Turns the radio item &quot;on&quot; 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 &quot;off&quot; for the menu item.
Turns the check or radio item &quot;off&quot; 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.
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.
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.
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.
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.
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
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
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
<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>
<P><TT>title</TT> is a character string title for the menu. If
<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>
<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
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>
<P><TT>button</TT> is a pointer to an <A href=Fl_Menu_.html#Fl_Menu_><TT>
Fl_Menu_</TT></A> from which the color and boxtypes for the menu are
Fl_Menu_</TT></A> from which the color and boxtypes for the menu are
pulled. If <TT>NULL</TT> then defaults are used. </P>
<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,
<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
<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
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_Bar</TT> widget. </P>
<H4><A name=Fl_Menu_Item.test_shortcut>const Fl_Menu_Item*
<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 '
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>
Returns the number of Fl_Menu_Item structures that make up this menu,
correctly counting submenus. This includes the "terminator" item at
the end. So to copy a menu you need to copy
<tt>size()*sizeof(Fl_Menu_Item)</tt> bytes.
<H4><A name=Fl_Menu_Item.next>const Fl_Menu_Item*
<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
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>
+11 -11
View File
@@ -17,10 +17,10 @@
</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.
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>
@@ -29,17 +29,17 @@ redraw.
<LI><A href=#Fl_Menu_Window.set_overlay>set_overlay</A></LI>
</UL>
<H4><A name=Fl_Menu_Window.Fl_Menu_Window>
Fl_Menu_Window::Fl_Menu_Window(int x, int y, int w, int h, const char
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
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.
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.
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>
+17 -17
View File
@@ -18,13 +18,13 @@
</UL>
<H3>Description</H3>
The <TT>Fl_Multi_Browser</TT> class is a subclass of <TT>Fl_Browser</TT>
which lets the user select any set of the lines. The user interface
is Macintosh style: clicking an item turns off all the others and
selects that one, dragging selects all the items the mouse moves over,
and shift + click toggles the items. This is different then how forms
did it. Normally the callback is done when the user releases the
mouse, but you can change this with <TT>when()</TT>.
<P>See <A href=Fl_Browser.html#Fl_Browser><TT>Fl_Browser</TT></A> for
which lets the user select any set of the lines. The user interface
is Macintosh style: clicking an item turns off all the others and
selects that one, dragging selects all the items the mouse moves over,
and shift + click toggles the items. This is different then how forms
did it. Normally the callback is done when the user releases the
mouse, but you can change this with <TT>when()</TT>.
<P>See <A href=Fl_Browser.html#Fl_Browser><TT>Fl_Browser</TT></A> for
methods to add and remove lines from the browser. </P>
<H3>Methods</H3>
<UL>
@@ -35,22 +35,22 @@ methods to add and remove lines from the browser. </P>
<LI><A href=#Fl_Multi_Browser.value>value</A></LI>
</UL>
<H4><A name=Fl_Multi_Browser.Fl_Multi_Browser>
Fl_Multi_Browser::Fl_Multi_Browser(int x, int y, int w, int h, const
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
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
.
<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>.
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.
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.
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
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>
+11 -11
View File
@@ -17,13 +17,13 @@
</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
This input field displays '\n' characters as new lines rather than ^J,
and accepts the Return, Tab, and up and down arrow keys. This is for
editing multiline text.
<P>This is far from the nirvana of text editors, and is probably only
good for small bits of text, 10 lines at most. I think FLTK can be
used to write a powerful text editor, but it is not going to be a
built-in feature. Powerful text editors in a toolkit are a big source
of bloat. </P>
<H3>Methods</H3>
<UL>
@@ -33,11 +33,11 @@ of bloat. </P>
</LI>
</UL>
<H4><A name=Fl_Multiline_Input.Fl_Multiline_Input>
Fl_Multiline_Input::Fl_Multiline_Input(int x, int y, int w, int h,
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
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
.
<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>
+7 -7
View File
@@ -17,9 +17,9 @@
</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.
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>
@@ -28,11 +28,11 @@ next column.
~Fl_Multiline_Output</A></LI>
</UL>
<H4><A name=Fl_Multiline_Output.Fl_Multiline_Output>
Fl_Multiline_Output::Fl_Multiline_Output(int x, int y, int w, int h,
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
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
.
<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>
+26 -26
View File
@@ -20,18 +20,18 @@
</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.
, <TT>Fl_Output</TT> does a <TT>strcpy()</TT> to it's own storage,
which is useful for program-generated values. The user may select
portions of the text using the mouse and paste the contents into other
fields or programs.
<CENTER><IMG src="text.gif" ALT="Fl_Output widget."></CENTER>
<P>There is a single subclass, <A href=Fl_Multiline_Output.html#Fl_Multiline_Output>
Fl_Multiline_Output</A>, which allows you to display multiple lines of
Fl_Multiline_Output</A>, which allows you to display multiple lines of
text. </P>
<P>The text may contain any characters except \0, and will correctly
display anything, using ^X notation for unprintable control characters
and \nnn notation for unprintable characters with the high bit set. It
assummes the font can draw any characters in the ISO-Latin1 character
<P>The text may contain any characters except \0, and will correctly
display anything, using ^X notation for unprintable control characters
and \nnn notation for unprintable characters with the high bit set. It
assummes the font can draw any characters in the ISO-Latin1 character
set. </P>
<H3>Methods</H3>
<UL>
@@ -44,36 +44,36 @@ set. </P>
<LI><A href=#Fl_Output.textsize>textsize</A></LI>
<LI><A href=#Fl_Output.value>value</A></LI>
</UL>
<H4><A name=Fl_Output.Fl_Output>Fl_Output::Fl_Output(int x, int y, int
<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>.
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.
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
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 &quot;&quot;. 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
NULL</TT> is the same as &quot;&quot;. This returns non-zero if the new value is
different than the current one. You can use the second version to
directly set the length if you know it already or want to put nul's in
the text. </P>
<H4><A name=Fl_Output.size>int Fl_Output::size() const</A></H4>
Returns the number of characters in <TT>value()</TT>. This may be
greater than <TT>strlen(value())</TT> if there are nul characters in
it.
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.
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.
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.
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>
+21 -21
View File
@@ -17,14 +17,14 @@
</PRE>
</UL>
<H3>Description</H3>
This window provides double buffering and also the ability to draw the
&quot;overlay&quot; 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
&quot;erased&quot; by copying the backbuffer over it again. This means the
This window provides double buffering and also the ability to draw the
&quot;overlay&quot; 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
&quot;erased&quot; by copying the backbuffer over it again. This means the
overlay will blink if you change the image in the window. </P>
<H3>Methods</H3>
<UL>
@@ -34,23 +34,23 @@ overlay will blink if you change the image in the window. </P>
<LI><A href=#Fl_Overlay_Window.redraw_overlay>redraw_overlay</A></LI>
</UL>
<H4><A name=Fl_Overlay_Window.Fl_Overlay_Window>
Fl_Overlay_Window::Fl_Overlay_Window(int x, int y, int w, int h, const
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
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.draw_overlay>virtual void
Destroys the window and all child widgets.
<H4><A name=Fl_Overlay_Window.draw_overlay>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 &quot;cleared&quot; when this is called. You
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 &quot;cleared&quot; when this is called. You
can use any of the routines described in <A href=drawing.html#Drawing>
&lt;FL/fl_draw.H&gt;</A>.
&lt;FL/fl_draw.H&gt;</A>.
<H4><A name=Fl_Overlay_Window.redraw_overlay>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
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>
+16 -16
View File
@@ -17,15 +17,15 @@
</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
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
then the children are resized to the width and are stacked below each
other. Then the <TT>Fl_Pack</TT> resizes itself to surround the child
widgets. </P>
<P>This widget is needed for the <A href=Fl_Tabs.html#Fl_Tabs><TT>Fl_Tabs</TT></A>.
<P>This widget is needed for the <A href=Fl_Tabs.html#Fl_Tabs><TT>Fl_Tabs</TT></A>.
In addition you may want to put the <TT>Fl_Pack</TT> inside an <A href=Fl_Scroll.html#Fl_Scroll>
<TT>Fl_Scroll</TT></A>. </P>
<H3>Methods</H3>
@@ -34,18 +34,18 @@ widgets. </P>
<LI><A href=#Fl_Pack.~Fl_Pack>~Fl_Pack</A></LI>
<LI><A href=#Fl_Pack.spacing>spacing</A></LI>
</UL>
<H4><A name=Fl_Pack.Fl_Pack>Fl_Pack::Fl_Pack(int x, int y, int w, int
<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>.
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
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.
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
Gets or sets the number of extra pixels of blank space that are added
between the children. </BODY></HTML>
+16 -16
View File
@@ -17,10 +17,10 @@
</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>.
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 ALIGN=CENTER><IMG src="positioner.gif" ALT="Fl_Positioner widget."></P>
<H3>Methods</H3>
<CENTER>
@@ -41,29 +41,29 @@ crosshairs is <TT>selection_color()</TT>.
</TABLE>
</CENTER>
<H4><A name=Fl_Positioner.Fl_Positioner>
Fl_Positioner::Fl_Positioner(int x, int y, int w, int h, const char
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
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,
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>.
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.
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.
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.
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.
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.
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>
+8 -8
View File
@@ -14,21 +14,21 @@
<PRE>#include &lt;FL/Fl_Repeat_Button.H&gt;</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.
The <TT>Fl_Repeat_Button</TT> is a subclass of <TT>Fl_Button</TT> that
generates a callback when it is pressed and then repeatedly generates
callbacks as long as it is held down. The speed of the repeat is fixed
and depends on the implementation.
<H3>Methods</H3>
<UL>
<LI><A href=#Fl_Repeat_Button.Fl_Repeat_Button>Fl_Repeat_Button</A></LI>
<LI><A href=#Fl_Repeat_Button.~Fl_Repeat_Button>~Fl_Repeat_Button</A></LI>
</UL>
<H4><A name=Fl_Repeat_Button.Fl_Repeat_Button>
Fl_Repeat_Button::Fl_Repeat_Button(int x, int y, int w, int h, const
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
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
.
<H4><A name=Fl_Repeat_Button.~Fl_Repeat_Button>virtual
Fl_Repeat_Button::~Fl_Repeat_Button()</A></H4>
Deletes the button. </BODY></HTML>
+7 -7
View File
@@ -14,9 +14,9 @@
<PRE>#include &lt;FL/Fl_Return_Button.H&gt;</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.
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.
<P ALIGN=CENTER><IMG SRC="Fl_Return_Button.gif" ALT="Fl_Return_Button widget."></P>
<H3>Methods</H3>
<UL>
@@ -24,11 +24,11 @@ Enter key. A carriage-return symbol is drawn next to the button label.
<LI><A href=#Fl_Return_Button.~Fl_Return_Button>~Fl_Return_Button</A></LI>
</UL>
<H4><A name=Fl_Return_Button.Fl_Return_Button>
Fl_Return_Button::Fl_Return_Button(int x, int y, int w, int h, const
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
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
.
<H4><A name=Fl_Return_Button.~Fl_Return_Button>virtual
Fl_Return_Button::~Fl_Return_Button()</A></H4>
Deletes the button. </BODY></HTML>
+5 -5
View File
@@ -17,17 +17,17 @@
</PRE>
</UL>
<H3>Description</H3>
The <TT>Fl_Roller</TT> widget is a &quot;dolly&quot; control commonly used to
move 3D objects.
The <TT>Fl_Roller</TT> widget is a &quot;dolly&quot; control commonly used to
move 3D objects.
<P ALIGN=CENTER><IMG src="Fl_Roller.gif" ALT="Fl_Roller widget."></P>
<H3>Methods</H3>
<UL>
<LI><A href=#Fl_Roller.Fl_Roller>Fl_Roller</A></LI>
<LI><A href=#Fl_Roller.~Fl_Roller>~Fl_Roller</A></LI>
</UL>
<H4><A name=Fl_Roller.Fl_Roller>Fl_Roller::Fl_Roller(int x, int y, int
<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>.
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>
+9 -9
View File
@@ -17,14 +17,14 @@
</PRE>
</UL>
<H3>Description</H3>
Buttons generate callbacks when they are clicked by the user. You
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>.
and <TT>when()</TT>.
<P ALIGN=CENTER><IMG SRC="Fl_Round_Button.gif" ALT="Fl_Round_Button widget."></P>
<P>The <TT>Fl_Round_Button</TT> subclass display the &quot;on&quot; state by
turning on a light, rather than drawing pushed in. The shape of the
&quot;light&quot; 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
<P>The <TT>Fl_Round_Button</TT> subclass display the &quot;on&quot; state by
turning on a light, rather than drawing pushed in. The shape of the
&quot;light&quot; 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.</P>
<H3>Methods</H3>
<UL>
@@ -32,10 +32,10 @@ FL_RED.</P>
<LI><A href=#Fl_Round_Button.~Fl_Round_Button>~Fl_Round_Button</A></LI>
</UL>
<H4><A name=Fl_Round_Button.Fl_Round_Button>
Fl_Round_Button::Fl_Round_Button(int x, int y, int w, int h, const char
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.
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>
+36 -36
View File
@@ -17,36 +17,36 @@
</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:
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 ALIGN=CENTER><IMG src="Fl_Scroll.gif" ALT="Fl_Scroll widget."></P>
<P>If all of the child widgets are packed together into a solid
rectangle then you want to set <TT>box()</TT> to <TT>FL_NO_BOX</TT> or
one of the <TT>_FRAME</TT> types. This will result in the best output.
<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
box()</TT> to a real <TT>_BOX</TT> type. This can result in some
blinking during redrawing, but that can be solved by using a <TT>
Fl_Double_Window</TT>. </P>
<P>This widget can also be used to pan around a single child widget
<P>This widget can also be used to pan around a single child widget
&quot;canvas&quot;. 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.
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=drawing.html#fl_clip><TT>fl_clip()</TT></A>
. </P>
<P>Another very useful child is a single <A href=Fl_Pack.html#Fl_Pack><TT>
Fl_Pack</TT></A>, which is itself a group that packs it's children
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_Tabs.html#Fl_Tabs><TT>Fl_Tabs</TT></A> groups (and then putting
normal widgets inside those) gives you a very powerful scrolling list
with <A href=Fl_Tabs.html#Fl_Tabs><TT>Fl_Tabs</TT></A> groups (and then putting
normal widgets inside those) gives you a very powerful scrolling list
of individually-openable panels. </P>
<P>Fluid lets you create these, but you can only lay out objects that
fit inside the <TT>Fl_Scroll</TT> without scrolling. Be sure to leave
<P>Fluid lets you create these, but you can only lay out objects that
fit inside the <TT>Fl_Scroll</TT> without scrolling. Be sure to leave
space for the scrollbars, as Fluid won't show these either. </P>
<P><I>You cannot use <TT>Fl_Window</TT> as a child of this since the
clipping is not conveyed to it when drawn, and it will draw over the
<P><I>You cannot use <TT>Fl_Window</TT> as a child of this since the
clipping is not conveyed to it when drawn, and it will draw over the
scrollbars and neighboring objects.</I></P>
<H3>Methods</H3>
<UL>
@@ -58,42 +58,42 @@ scrollbars and neighboring objects.</I></P>
<LI><A href=#Fl_Scroll.xposition>xposition</A></LI>
<LI><A href=#Fl_Scroll.yposition>yposition</A></LI>
</UL>
<H4><A name=Fl_Scroll.Fl_Scroll>Fl_Scroll::Fl_Scroll(int x, int y, int
<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>.
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
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.
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
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:
can change this:
<UL>
<LI><TT>0</TT> - No scrollbars </LI>
<LI><TT>Fl_Scroll::HORIZONTAL</TT> - Only a horizontal scrollbar. </LI>
<LI><TT>Fl_Scroll::VERTICAL</TT> - Only a vertical scrollbar. </LI>
<LI><TT>Fl_Scroll::BOTH</TT> - The default is both scrollbars. </LI>
<LI><TT>Fl_Scroll::HORIZONTAL_ALWAYS</TT> - Horizontal scrollbar
<LI><TT>Fl_Scroll::HORIZONTAL_ALWAYS</TT> - Horizontal scrollbar
always on, vertical always off. </LI>
<LI><TT>Fl_Scroll::VERTICAL_ALWAYS</TT> - Vertical scrollbar always on,
<LI><TT>Fl_Scroll::VERTICAL_ALWAYS</TT> - Vertical scrollbar always on,
horizontal always off. </LI>
<LI><TT>Fl_Scroll::BOTH_ALWAYS</TT> - Both always on. </LI>
</UL>
<H4><A name=Fl_Scroll.align>void Fl_Scroll::scrollbar.align(int)
<BR> void Fl_Scroll::hscrollbar.align(int)</A></H4>
This is used to change what side the scrollbars are drawn on. If the <TT>
FL_ALIGN_LEFT</TT> bit is on, the vertical scrollbar is on the left.
If the <TT>FL_ALIGN_TOP</TT> bit is on, the horizontal scrollbar is on
the top.
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.
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.
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>
+20 -20
View File
@@ -17,15 +17,15 @@
</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
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
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
linesize()</TT>) and Home/End (they jump to the top or bottom).
<P>Scrollbars have <TT>step(1)</TT> preset (they always return
integers). If desired you can set the <TT>step()</TT> to non-integer
values. You will then have to use casts to get at the floating-point
versions of <TT>value()</TT> from <TT>Fl_Slider</TT>. </P>
<P ALIGN=CENTER><IMG src="scrollbar.gif" ALT="Fl_Scrollbar widget."></P>
<H3>Methods</H3>
@@ -35,26 +35,26 @@ versions of <TT>value()</TT> from <TT>Fl_Slider</TT>. </P>
<LI><A href=#Fl_Scrollbar.linesize>linesize</A></LI>
<LI><A href=#Fl_Scrollbar.value>value</A></LI>
</UL>
<H4><A name=Fl_Scrollbar.Fl_Scrollbar>Fl_Scrollbar::Fl_Scrollbar(int x,
<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
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.
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
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.
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
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
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>
+6 -6
View File
@@ -18,19 +18,19 @@
</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 receive passwords and other &quot;secret&quot; information.
that displays its input as a string of asterisks. This subclass is
usually used to receive passwords and other &quot;secret&quot; information.
<H3>Methods</H3>
<UL>
<LI><A href=#Fl_Secret_Input.Fl_Secret_Input>Fl_Secret_Input</A></LI>
<LI><A href=#Fl_Secret_Input.~Fl_Secret_Input>~Fl_Secret_Input</A></LI>
</UL>
<H4><A name=Fl_Secret_Input.Fl_Secret_Input>
Fl_Secret_Input::Fl_Secret_Input(int x, int y, int w, int h, const char
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
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
.
<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>
+14 -14
View File
@@ -18,11 +18,11 @@
</UL>
<H3>Description</H3>
The <TT>Fl_Select_Browser</TT> class is a subclass of <TT>Fl_Browser</TT>
which lets the user select a single item, or no items by clicking on
the empty space. As long as the mouse button is held down the item
pointed to by it is highlighted. Normally the callback is done when the
user presses the mouse, but you can change this with <TT>when()</TT>.
<P>See <A href=Fl_Browser.html#Fl_Browser><TT>Fl_Browser</TT></A> for
which lets the user select a single item, or no items by clicking on
the empty space. As long as the mouse button is held down the item
pointed to by it is highlighted. Normally the callback is done when the
user presses the mouse, but you can change this with <TT>when()</TT>.
<P>See <A href=Fl_Browser.html#Fl_Browser><TT>Fl_Browser</TT></A> for
methods to add and remove lines from the browser. </P>
<H3>Methods</H3>
<UL>
@@ -33,21 +33,21 @@ methods to add and remove lines from the browser. </P>
<LI><A href=#Fl_Select_Browser.value>value</A></LI>
</UL>
<H4><A name=Fl_Select_Browser.Fl_Select_Browser>
Fl_Select_Browser::Fl_Select_Browser(int x, int y, int w, int h, const
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
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
.
<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>.
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>.
Same as <TT>value(0)</TT>.
<H4><A name=Fl_Select_Browser.select>int Fl_Browser::select(int,int=1)
<BR> int Fl_Browser::selected(int) const</A></H4>
You can use these for compatibility with <A href=Fl_Multi_Browser.html#Fl_Multi_Browser>
<TT>Fl_Multi_Browser</TT></A>. If you turn on the selection of more
than one line the results are unpredictable.
<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
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>
+9 -9
View File
@@ -17,22 +17,22 @@
</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.
This is the same as <TT>Fl_Window</TT>. However, it is possible that
some implementations will provide double-buffered windows by default.
This subclass can be used to force single-buffering. This may be
useful for modifying existing programs that use incremental update, or
for some types of image data, such as a movie flipbook.
<H3>Methods</H3>
<UL>
<LI><A href=#Fl_Single_Window.Fl_Single_Window>Fl_Single_Window</A></LI>
<LI><A href=#Fl_Single_Window.~Fl_Single_Window>~Fl_Single_Window</A></LI>
</UL>
<H4><A name=Fl_Single_Window.Fl_Single_Window>
Fl_Single_Window::Fl_Single_Window(int x, int y, int w, int h, const
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
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>
+26 -26
View File
@@ -19,11 +19,11 @@
</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>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.
maximum()</TT> to reverse the slider direction.
<P ALIGN=CENTER><IMG src="slider.gif" ALT="Fl_Slider widget."></P>
<H3>Methods</H3>
<UL>
@@ -34,45 +34,45 @@ maximum()</TT> to reverse the slider direction.
<LI><A href=#Fl_Slider.slider_size>slider_size</A></LI>
<LI><A href=#Fl_Slider.type>type</A></LI>
</UL>
<H4><A name=Fl_Slider.Fl_Slider>Fl_Slider::Fl_Slider(int x, int y, int
<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_DOWN_BOX</TT>.
Creates a new <TT>Fl_Slider</TT> widget using the given position,
size, and label string. The default boxtype is <TT>FL_DOWN_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
Destroys the valuator.
<H4><A name=Fl_Slider.scrollvalue>int Fl_Slider::scrollvalue(int
windowtop, int windowsize, int first, int totalsize)</A></H4>
Returns <A href=Fl_Scrollbar.html#Fl_Scrollbar.value><TT>
Fl_Scrollbar::value()</TT></A>.
Fl_Scrollbar::value()</TT></A>.
<H4><A name=Fl_Slider.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>.
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 &quot;fill&quot; 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
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 &quot;fill&quot; sliders this is the size of the area around the end
that causes a drag effect rather than causing the slider to jump to the
mouse. </P>
<H4><A name=Fl_Slider.type>uchar Fl_Widget::type() const
<BR> void Fl_Widget::type(uchar t)</A></H4>
Setting this changes how the slider is drawn, which can be one of the
following:
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
<LI><TT>FL_VERTICAL</TT> - Draws a vertical slider (this is the
default). </LI>
<LI><TT>FL_HORIZONTAL</TT> - Draws a horizontal slider. </LI>
<LI><TT>FL_VERT_FILL_SLIDER</TT> - Draws a filled vertical slider,
<LI><TT>FL_VERT_FILL_SLIDER</TT> - Draws a filled vertical slider,
useful as a progress or value meter. </LI>
<LI><TT>FL_HOR_FILL_SLIDER</TT> - Draws a filled horizontal slider,
<LI><TT>FL_HOR_FILL_SLIDER</TT> - Draws a filled horizontal slider,
useful as a progress or value meter. </LI>
<LI><TT>FL_VERT_NICE_SLIDER</TT> - Draws a vertical slider with a nice
<LI><TT>FL_VERT_NICE_SLIDER</TT> - Draws a vertical slider with a nice
looking control knob. </LI>
<LI><TT>FL_HOR_NICE_SLIDER</TT> - Draws a horizontal slider with a
<LI><TT>FL_HOR_NICE_SLIDER</TT> - Draws a horizontal slider with a
nice looking control knob. </LI>
</UL>
</BODY></HTML>
+24 -24
View File
@@ -17,26 +17,26 @@
</PRE>
</UL>
<H3>Description</H3>
The <TT>Fl_Tabs</TT> widget is the &quot;file card tabs&quot; interface that
allows you to put lots and lots of buttons and switches in a panel, as
popularized by many toolkits.
The <TT>Fl_Tabs</TT> widget is the &quot;file card tabs&quot; interface that
allows you to put lots and lots of buttons and switches in a panel, as
popularized by many toolkits.
<P ALIGN=CENTER><IMG src="tabs.gif" ALT="Fl_Tabs widget."></P>
<P>Clicking the tab makes a child <TT>visible()</TT> (by calling <TT>
show()</TT> on it) and all other children are invisible (by calling <TT>
hide()</TT> on them). Usually the children are <A href=Fl_Group.html#Fl_Group>
<TT>Fl_Group</TT></A> widgets containing several widgets
<TT>Fl_Group</TT></A> widgets containing several widgets
themselves. </P>
<P>Each child makes a card, and it's <TT>label()</TT> is printed on the
card tab (including the label font and style). The color of that child
is used to color the card as well. Currently this only draws nicely if
you set <A href=Fl_Widget.html#Fl_Widget.box><TT>box()</TT></A> to the
default <TT>FL_THIN_UP_BOX</TT> or to <TT>FL_FLAT_BOX</TT>, which gets
<P>Each child makes a card, and it's <TT>label()</TT> is printed on the
card tab (including the label font and style). The color of that child
is used to color the card as well. Currently this only draws nicely if
you set <A href=Fl_Widget.html#Fl_Widget.box><TT>box()</TT></A> to the
default <TT>FL_THIN_UP_BOX</TT> or to <TT>FL_FLAT_BOX</TT>, which gets
rid of the edges drawn on the sides and bottom. </P>
<P>The size of the tabs is controlled by the bounding box of the
children (there should be some space between the children and the edge
of the <TT>Fl_Tabs</TT>), and the tabs may be placed &quot;inverted&quot; 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
<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 &quot;inverted&quot; on the
bottom, this is determined by which gap is larger. It is easiest to
lay this out in fluid, using the fluid browser to select each child
group and resize them until the tabs look the way you want them to. </P>
<H3>Methods</H3>
<UL>
@@ -44,21 +44,21 @@ group and resize them until the tabs look the way you want them to. </P>
<LI><A href=#Fl_Tabs.~Fl_Tabs>~Fl_Tabs</A></LI>
<LI><A href=#Fl_Tabs.value>value</A></LI>
</UL>
<H4><A name=Fl_Tabs.Fl_Tabs>Fl_Tabs::Fl_Tabs(int x, int y, int w, int h,
<H4><A name=Fl_Tabs.Fl_Tabs>Fl_Tabs::Fl_Tabs(int x, int y, int w, int h,
const char *label = 0)</A></H4>
Creates a new <TT>Fl_Tabs</TT> widget using the given position, size,
and label string. The default boxtype is <TT>FL_THIN_UP_BOX</TT>.
Creates a new <TT>Fl_Tabs</TT> widget using the given position, size,
and label string. The default boxtype is <TT>FL_THIN_UP_BOX</TT>.
<P>Use <A href=Fl_Group.html#Fl_Group.add><TT>add(Fl_Widget *)</TT></A>
to add each child (which is probably itself a <TT>Fl_Group</TT>). The
children should be sized to stay away from the top or bottom edge of
to add each child (which is probably itself a <TT>Fl_Group</TT>). The
children should be sized to stay away from the top or bottom edge of
the <TT>Fl_Tabs</TT>, which is where the tabs are drawn. </P>
<H4><A name=Fl_Tabs.~Fl_Tabs>virtual Fl_Tabs::~Fl_Tabs()</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
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_Tabs</TT> and all of it's children can be automatic (local)
variables, but you must declare the <TT>Fl_Tabs</TT><I>first</I>, so
that it is destroyed last.
Fl_Tabs</TT> and all of it's children can be automatic (local)
variables, but you must declare the <TT>Fl_Tabs</TT><I>first</I>, so
that it is destroyed last.
<H4><A name=Fl_Tabs.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>
+26 -26
View File
@@ -17,21 +17,21 @@
</PRE>
</UL>
<H3>Description</H3>
The <TT>Fl_Tile</TT> class lets you resize the children by dragging
the border between them:
The <TT>Fl_Tile</TT> class lets you resize the children by dragging
the border between them:
<P ALIGN=CENTER><IMG src="Fl_Tile.gif" ALT="Fl_Tile widget."></P>
<P><TT>Fl_Tile</TT> allows objects to be resized to zero dimensions.
To prevent this you can use the <TT>resizable()</TT> to limit where
<P><TT>Fl_Tile</TT> allows objects to be resized to zero dimensions.
To prevent this you can use the <TT>resizable()</TT> to limit where
corners can be dragged to. </P>
<P>Even though objects can be resized to zero sizes, they must
initially have non-zero sizes so the <TT>Fl_Tile</TT> can figure out
their layout. If desired, call <TT>position()</TT> after creating the
children but before displaying the window to set the borders where you
<P>Even though objects can be resized to zero sizes, they must
initially have non-zero sizes so the <TT>Fl_Tile</TT> can figure out
their layout. If desired, call <TT>position()</TT> after creating the
children but before displaying the window to set the borders where you
want. </P>
<P>The &quot;borders&quot; are part of the children, an
<TT>Fl_Tile</TT> does not
draw any graphics of it's own. In the above example all the final
children have <TT>FL_DOWN_BOX</TT> types, and the &quot;ridges&quot; you see are
<TT>Fl_Tile</TT> does not
draw any graphics of it's own. In the above example all the final
children have <TT>FL_DOWN_BOX</TT> types, and the &quot;ridges&quot; you see are
two adjacent <TT>FL_DOWN_BOX</TT>'s drawn next to each other. </P>
<H3>Methods</H3>
<UL>
@@ -40,26 +40,26 @@ two adjacent <TT>FL_DOWN_BOX</TT>'s drawn next to each other. </P>
<LI><A href=#Fl_Tile.position>position</A></LI>
<LI><A href=#Fl_Tile.resizeable>resizeable</A></LI>
</UL>
<H4><A name=Fl_Tile.Fl_Tile>Fl_Tile::Fl_Tile(int x, int y, int w, int
<H4><A name=Fl_Tile.Fl_Tile>Fl_Tile::Fl_Tile(int x, int y, int w, int
h, const char *label = 0)</A></H4>
Creates a new <TT>Fl_Tile</TT> widget using the given position, size,
and label string. The default boxtype is <TT>FL_NO_BOX</TT>.
Creates a new <TT>Fl_Tile</TT> widget using the given position, size,
and label string. The default boxtype is <TT>FL_NO_BOX</TT>.
<H4><A name=Fl_Tile.~Fl_Tile>virtual Fl_Tile::~Fl_Tile()</A></H4>
The destructor <I>also deletes all the children</I>. This allows a
whole tree to be deleted at once, without having to keep a pointer to
The destructor <I>also deletes all the children</I>. This allows a
whole tree to be deleted at once, without having to keep a pointer to
all the children in the user code. A kludge has been done so the <TT>
Fl_Tile</TT> and all of it's children can be automatic (local)
variables, but you must declare the <TT>Fl_Tile</TT> <I>first</I>, so
that it is destroyed last.
<H4><A name=Fl_Tile.position>void Fl_Tile::position(from_x, from_y,
Fl_Tile</TT> and all of it's children can be automatic (local)
variables, but you must declare the <TT>Fl_Tile</TT> <I>first</I>, so
that it is destroyed last.
<H4><A name=Fl_Tile.position>void Fl_Tile::position(from_x, from_y,
to_x, to_y)</A></H4>
Drag the intersection at <TT>from_x,from_y</TT> to <TT>to_x,to_y</TT>.
This redraws all the necessary children.
Drag the intersection at <TT>from_x,from_y</TT> to <TT>to_x,to_y</TT>.
This redraws all the necessary children.
<H4><A name=Fl_Tile.resizeable>void Fl_Tile::resizable(Fl_Widget &amp;w)<BR>
void Fl_Tile::resizable(Fl_Widget *w)</A></H4>
The &quot;resizable&quot; child widget (which should be invisible) limits where the
border can be dragged to. If you don't set it, it will be possible to
drag the borders right to the edge, and thus resize objects on the edge
to zero width or height. The <TT>resizable()</TT> widget is not
The &quot;resizable&quot; child widget (which should be invisible) limits where the
border can be dragged to. If you don't set it, it will be possible to
drag the borders right to the edge, and thus resize objects on the edge
to zero width or height. The <TT>resizable()</TT> widget is not
resized by dragging any borders.
</BODY></HTML>
+16 -16
View File
@@ -17,11 +17,11 @@
</PRE>
</UL>
<H3>Description</H3>
This is provided only to emulate the Forms Timer widget. It works by
making a timeout callback every 1/5 second. This is wasteful and
inaccurate if you just want something to happen a fixed time in the
This is provided only to emulate the Forms Timer widget. It works by
making a timeout callback every 1/5 second. This is wasteful and
inaccurate if you just want something to happen a fixed time in the
future. You should directly call <A href=functions.html#add_timeout><TT>
Fl::add_timeout()</TT></A> instead.
Fl::add_timeout()</TT></A> instead.
<H3>Methods</H3>
<UL>
<LI><A href=#Fl_Timer.Fl_Timer>Fl_Timer</A></LI>
@@ -30,29 +30,29 @@ Fl::add_timeout()</TT></A> instead.
<LI><A href=#Fl_Timer.suspended>suspended</A></LI>
<LI><A href=#Fl_Timer.value>value</A></LI>
</UL>
<H4><A name=Fl_Timer.Fl_Timer>Fl_Timer::Fl_Timer(uchar type, int x, int
<H4><A name=Fl_Timer.Fl_Timer>Fl_Timer::Fl_Timer(uchar type, int x, int
y, int w, int h, const char *label = 0)</A></H4>
Creates a new <TT>Fl_Timer</TT> widget using the given type, position,
size, and label string. The <TT>type</TT> parameter can be any of the
following symbolic constants:
Creates a new <TT>Fl_Timer</TT> widget using the given type, position,
size, and label string. The <TT>type</TT> parameter can be any of the
following symbolic constants:
<UL>
<LI><TT>FL_NORMAL_TIMER</TT> - The timer just does the callback and
<LI><TT>FL_NORMAL_TIMER</TT> - The timer just does the callback and
displays the string &quot;Timer&quot; in the widget. </LI>
<LI><TT>FL_VALUE_TIMER</TT> - The timer does the callback and displays
<LI><TT>FL_VALUE_TIMER</TT> - The timer does the callback and displays
the current timer value in the widget. </LI>
<LI><TT>FL_HIDDEN_TIMER</TT> - The timer just does the callback and
<LI><TT>FL_HIDDEN_TIMER</TT> - The timer just does the callback and
does not display anything. </LI>
</UL>
<H4><A name=Fl_Timer.~Fl_Timer>virtual Fl_Timer::~Fl_Timer()</A></H4>
Destroys the timer and removes the timeout.
Destroys the timer and removes the timeout.
<H4><A name=Fl_Timer.direction>char direction() const
<BR> void direction(char d)</A></H4>
Gets or sets the direction of the timer. If the direction is zero
then the timer will count up, otherwise it will count down from the
initial <TT>value()</TT>.
Gets or sets the direction of the timer. If the direction is zero
then the timer will count up, otherwise it will count down from the
initial <TT>value()</TT>.
<H4><A name=Fl_Timer.suspended>char suspended() const
<BR> void suspended(char d)</A></H4>
Gets or sets whether the timer is suspended.
Gets or sets whether the timer is suspended.
<H4><A name=Fl_Timer.value>float value() const
<BR> void value(float)</A></H4>
Gets or sets the current timer value. </BODY></HTML>
+43 -43
View File
@@ -20,16 +20,16 @@
</PRE>
</UL>
<H3>Description</H3>
The <TT>Fl_Valuator</TT> class controls a single floating-point value
and provides a consistent interface to set the value, range, and step,
and insures that callbacks are done the same for every object.
The <TT>Fl_Valuator</TT> class controls a single floating-point value
and provides a consistent interface to set the value, range, and step,
and insures that callbacks are done the same for every object.
<P>There are probably more of these classes in FLTK than any others: </P>
<P ALIGN=CENTER><IMG src="valuators.gif" ALT="Fl_Valuator widgets."></P>
<P>In the above diagram each box surrounds an actual subclass. These
<P>In the above diagram each box surrounds an actual subclass. These
are further differentiated by setting the <A href=Fl_Widget.html#Fl_Widget.type><TT>
type()</TT></A> of the widget to the symbolic value labeling the
type()</TT></A> of the widget to the symbolic value labeling the
widget. The ones labelled &quot;0&quot; are the default versions with a <TT>
type(0)</TT>. For consistency the symbol <TT>FL_VERTICAL</TT> is
type(0)</TT>. For consistency the symbol <TT>FL_VERTICAL</TT> is
defined as zero.</P>
<H3>Methods</H3>
<CENTER>
@@ -66,69 +66,69 @@ defined as zero.</P>
</TD></TR>
</TABLE>
</CENTER>
<H4><A name=Fl_Valuator.Fl_Valuator>Fl_Valuator::Fl_Valuator(int x, int
<H4><A name=Fl_Valuator.Fl_Valuator>Fl_Valuator::Fl_Valuator(int x, int
y, int w, int h, const char *label = 0)</A></H4>
Creates a new <TT>Fl_Valuator</TT> widget using the given position,
size, and label string. The default boxtype is <TT>FL_NO_BOX</TT>.
Creates a new <TT>Fl_Valuator</TT> widget using the given position,
size, and label string. The default boxtype is <TT>FL_NO_BOX</TT>.
<H4><A name=Fl_Valuator.~Fl_Valuator>virtual Fl_Valuator::~Fl_Valuator()</A>
</H4>
Destroys the valuator.
Destroys the valuator.
<H4><A name=Fl_Valuator.value>double Fl_Valuator::value() const
<BR> int Fl_Valuator::value(double)</A></H4>
Get or set the current value. The new value is <I>not</I> clamped or
Get or set the current value. The new value is <I>not</I> clamped or
otherwise changed before storing it. Use <TT>clamp()</TT> or <TT>round()</TT>
to modify the value before calling this if you want. If the new value
is different than the current one the object is redrawn. The initial
value is zero.
to modify the value before calling this if you want. If the new value
is different than the current one the object is redrawn. The initial
value is zero.
<H4><A name=Fl_Valuator.minimum>double Fl_Valuator::minimum() const
<BR> void Fl_Valuator::minimum(double)</A></H4>
Gets or sets the minimum value for the valuator.
Gets or sets the minimum value for the valuator.
<H4><A name=Fl_Valuator.maximum>double Fl_Valuator::maximum() const
<BR> void Fl_Valuator::maximum(double)</A></H4>
Gets or sets the maximum value for the valuator.
<H4><A name=Fl_Valuator.range>void Fl_Valuator::range(double min,
Gets or sets the maximum value for the valuator.
<H4><A name=Fl_Valuator.range>void Fl_Valuator::range(double min,
double max);</A></H4>
Sets the minimum and maximum values for the valuator. When the user
manipulates the widget, the value is limited to this range. This
clamping is done <I>after</I> rounding to the step value (this makes a
difference if the range is not a multiple of the step).
<P>The minimum may be greater than the maximum. This has the effect of
&quot;reversing&quot; the object so the larger values are in the opposite
direction. This also switches which end of the filled sliders is
Sets the minimum and maximum values for the valuator. When the user
manipulates the widget, the value is limited to this range. This
clamping is done <I>after</I> rounding to the step value (this makes a
difference if the range is not a multiple of the step).
<P>The minimum may be greater than the maximum. This has the effect of
&quot;reversing&quot; the object so the larger values are in the opposite
direction. This also switches which end of the filled sliders is
filled. </P>
<P>Some widgets consider this a &quot;soft&quot; range. This means they will
stop at the range, but if the user releases and grabs the control again
<P>Some widgets consider this a &quot;soft&quot; range. This means they will
stop at the range, but if the user releases and grabs the control again
and tries to move it further, it is allowed. </P>
<P>The range may affect the display. You must <TT>redraw()</TT> the
<P>The range may affect the display. You must <TT>redraw()</TT> the
widget after changing the range. </P>
<H4><A name=Fl_Valuator.step>double Fl_Valuator::step() const
<BR> void Fl_Valuator::step(double)
<BR> void Fl_Valuator::step(int A, int B)</A></H4>
Get or set the step value. As the user moves the mouse the value is
Get or set the step value. As the user moves the mouse the value is
rounded to the nearest multiple of the step value. This is done <I>
before</I> clamping it to the range. For most objects the default step
is zero.
<P>For precision the step is stored as the ratio of two integers, A/B.
You can set these integers directly. Currently setting a floating
before</I> clamping it to the range. For most objects the default step
is zero.
<P>For precision the step is stored as the ratio of two integers, A/B.
You can set these integers directly. Currently setting a floating
point value sets the nearest A/1 or 1/B value possible. </P>
<H4><A name=Fl_Valuator.format>int Fl_Valuator::format(char *)</A>
</H4>
Format the passed value to show enough digits so that for the current
Format the passed value to show enough digits so that for the current
step value. If the step has been set to zero then it does a <TT>%g</TT>
format. The characters are written into the passed buffer.
format. The characters are written into the passed buffer.
<H4><A name=Fl_Valuator.round>double Fl_Valuator::round(double)</A></H4>
Round the passed value to the nearest step increment. Does nothing if
step is zero.
Round the passed value to the nearest step increment. Does nothing if
step is zero.
<H4><A name=Fl_Valuator.clamp>double Fl_Valuator::clamp(double)</A></H4>
Clamp the passed value to the valuator range.
<H4><A name=Fl_Valuator.increment>double
Clamp the passed value to the valuator range.
<H4><A name=Fl_Valuator.increment>double
Fl_Valuator::increment(double,int n)</A></H4>
Adds <TT>n</TT> times the step value to the passed value. If step was
set to zero it uses <TT>fabs(maximum() - minimum()) / 100</TT>.
Adds <TT>n</TT> times the step value to the passed value. If step was
set to zero it uses <TT>fabs(maximum() - minimum()) / 100</TT>.
<H4><A name=Fl_Valuator.changed>int Fl_Widget::changed() const</A></H4>
This value is true if the user has moved the slider. It is turned off
by <TT>value(x)</TT> and just before doing a callback (the callback can
turn it back on if desired).
This value is true if the user has moved the slider. It is turned off
by <TT>value(x)</TT> and just before doing a callback (the callback can
turn it back on if desired).
<H4><A name=Fl_Valuator.set_changed>void Fl_Widget::set_changed()</A></H4>
Sets the <TT>changed()</TT> flag.
<H4><A name=Fl_Valuator.clear_changed>void Fl_Widget::clear_changed()</A>
+24 -24
View File
@@ -17,16 +17,16 @@
</PRE>
</UL>
<H3>Description</H3>
The <TT>Fl_Value_Input</TT> widget displays a floating point value.
The user can click in the text field and edit it (there is in fact a
The <TT>Fl_Value_Input</TT> widget displays a floating point value.
The user can click in the text field and edit it (there is in fact a
hidden <A href=Fl_Input.html#Fl_Input><TT>Fl_Input</TT></A> widget with <TT>
type(FL_FLOAT_INPUT)</TT> in there), and when they hit return or tab
the value updates to what they typed and the callback is done.
<P>If <TT>step()</TT> is not zero, the user can also drag the mouse
type(FL_FLOAT_INPUT)</TT> in there), and when they hit return or tab
the value updates to what they typed and the callback is done.
<P>If <TT>step()</TT> is not zero, the user can also drag the mouse
across the object and thus slide the value. The left button moves one <TT>
step()</TT> per pixel, the middle by <TT>10 * step()</TT>, and the left
button by <TT>100 * step()</TT>. It is then impossible to select text
by dragging across it, although clicking can still move the insertion
step()</TT> per pixel, the middle by <TT>10 * step()</TT>, and the left
button by <TT>100 * step()</TT>. It is then impossible to select text
by dragging across it, although clicking can still move the insertion
cursor. </P>
<P ALIGN=CENTER><IMG src="Fl_Value_Input.gif" ALT="Fl_Value_Input widget."></P>
<H3>Methods</H3>
@@ -40,33 +40,33 @@ cursor. </P>
<LI><A href=#Fl_Value_Input.textsize>textsize</A></LI>
</UL>
<H4><A name=Fl_Value_Input.Fl_Value_Input>
Fl_Value_Input::Fl_Value_Input(int x, int y, int w, int h, const char
Fl_Value_Input::Fl_Value_Input(int x, int y, int w, int h, const char
*label = 0)</A></H4>
Creates a new <TT>Fl_Value_Input</TT> widget using the given position,
size, and label string. The default boxtype is <TT>FL_DOWN_BOX</TT>.
<H4><A name=Fl_Value_Input.~Fl_Value_Input>virtual
Creates a new <TT>Fl_Value_Input</TT> widget using the given position,
size, and label string. The default boxtype is <TT>FL_DOWN_BOX</TT>.
<H4><A name=Fl_Value_Input.~Fl_Value_Input>virtual
Fl_Value_Input::~Fl_Value_Input()</A></H4>
Destroys the valuator.
<H4><A name=Fl_Value_Input.cursor_color>Fl_Color
Destroys the valuator.
<H4><A name=Fl_Value_Input.cursor_color>Fl_Color
Fl_Value_Input::cursor_color() const
<BR> void Fl_Value_Input::cursor_color(Fl_Color)</A></H4>
Get or set the color of the cursor. This is black by default.
Get or set the color of the cursor. This is black by default.
<H4><A name=Fl_Value_Input.soft>uchar Fl_Value_Input::soft() const
<BR> void Fl_Value_Input::soft(uchar)</A></H4>
If &quot;soft&quot; 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
true.
<H4><A name=Fl_Value_Input.textcolor>Fl_Color
If &quot;soft&quot; 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
true.
<H4><A name=Fl_Value_Input.textcolor>Fl_Color
Fl_Value_Input::textcolor() const
<BR> void Fl_Value_Input::textcolor(Fl_Color)</A></H4>
Gets or sets the color of the text in the value box.
<H4><A name=Fl_Value_Input.textfont>Fl_Font Fl_Value_Input::textfont()
Gets or sets the color of the text in the value box.
<H4><A name=Fl_Value_Input.textfont>Fl_Font Fl_Value_Input::textfont()
const
<BR>
<BR>void Fl_Value_Input::textfont(Fl_Font)</A></H4>
Gets or sets the typeface of the text in the value box.
<H4><A name=Fl_Value_Input.textsize>uchar Fl_Value_Input::textsize()
Gets or sets the typeface of the text in the value box.
<H4><A name=Fl_Value_Input.textsize>uchar Fl_Value_Input::textsize()
const
<BR> void Fl_Value_Input::textsize(uchar)</A></H4>
Gets or sets the size of the text in the value box. </BODY></HTML>

Some files were not shown because too many files have changed in this diff Show More