summaryrefslogtreecommitdiff
path: root/documentation
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>1999-01-27 08:45:11 +0000
committerBill Spitzak <spitzak@gmail.com>1999-01-27 08:45:11 +0000
commit59c96f54635aed579fcb40a1980ff3694af46bd8 (patch)
tree06bbd99c434659190549626dd5380262ce6eb0c5 /documentation
parent7e0bd92469a8d9fd6fde66a856bfea703d587e71 (diff)
Fixes to documentation.
Restored the lines drawn around symbols, it uses fl_color_average to pick a dark line color that is still deactivatable. Requested by CE. git-svn-id: file:///fltk/svn/fltk/trunk@249 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'documentation')
-rw-r--r--documentation/Fl_Button.html4
-rw-r--r--documentation/Fl_Choice.html4
-rw-r--r--documentation/Fl_End.html7
-rw-r--r--documentation/Fl_Gl_Window.html20
-rw-r--r--documentation/Fl_Group.html58
-rw-r--r--documentation/Fl_Menu_Bar.html6
-rw-r--r--documentation/Fl_Menu_Button.html6
-rw-r--r--documentation/Fl_Menu_Item.html21
-rw-r--r--documentation/Fl_Tile.html7
-rw-r--r--documentation/Fl_Valuator.html6
-rw-r--r--documentation/Fl_Widget.html29
-rw-r--r--documentation/Fl_Window.html20
-rw-r--r--documentation/common.html2
-rw-r--r--documentation/enumerations.html63
-rw-r--r--documentation/functions.html57
-rw-r--r--documentation/widgets.html2
16 files changed, 180 insertions, 132 deletions
diff --git a/documentation/Fl_Button.html b/documentation/Fl_Button.html
index f0bb3fd67..3c713852d 100644
--- a/documentation/Fl_Button.html
+++ b/documentation/Fl_Button.html
@@ -26,7 +26,7 @@ control exactly when and how by changing the values for <TT>type()</TT>
<P>Buttons can also generate callbacks in response to <TT>FL_SHORTCUT</TT>
events. The button can either have an explicit <A href=#Fl_Button.shortcut>
<TT>shortcut()</TT></A> value or a letter shortcut can be indicated in
-the <TT>label()</TT> with an ''character before it. For the label
+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>
@@ -86,7 +86,7 @@ group (calling <TT>value(1)</TT> or <TT>set()</TT> does not do this).
<BR> void Fl_Button::shortcut(ulong key)</A></H4>
The first form returns the current shortcut key for the button.
<P>The second form sets the shortcut key to <TT>key</TT>. Setting this
-overrides the use of ''in the <TT>label()</TT>. The value is a bitwise
+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
of 0 disables the shortcut. </P>
diff --git a/documentation/Fl_Choice.html b/documentation/Fl_Choice.html
index e6f52706a..c13d95ddb 100644
--- a/documentation/Fl_Choice.html
+++ b/documentation/Fl_Choice.html
@@ -33,10 +33,10 @@ to that item and then the callback is done. </P>
first two buttons to increment/decrement the choice is not implemented.
This could be added with a subclass, however. </P>
<P>The menu will also pop up in response to shortcuts indicated by
-putting a ''character in the <TT>label()</TT>. See <A href=Fl_Button.html#Fl_Button>
+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 ''character in
+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>
<H3>Methods</H3>
<UL>
diff --git a/documentation/Fl_End.html b/documentation/Fl_End.html
index 75597f35f..fc1439815 100644
--- a/documentation/Fl_End.html
+++ b/documentation/Fl_End.html
@@ -5,7 +5,7 @@
<H3>Class Hierarchy</H3>
<UL>
<PRE>
-<A href=Fl_Group.html#Fl_Group>Fl_Group</A>----<B>Fl_End</B>
+<B>Fl_End</B>
</PRE>
</UL>
<H3>Include Files</H3>
@@ -15,8 +15,9 @@
</PRE>
</UL>
<H3>Description</H3>
- This is a dummy class that allows you to end a group in a constructor
-list of a class:
+This is a dummy class that allows you to end a <A
+href=Fl_Group.html#Fl_Group>Fl_Group</A> in a constructor list of a
+class:
<UL>
<PRE>class MyClass {
Fl_Group group;
diff --git a/documentation/Fl_Gl_Window.html b/documentation/Fl_Gl_Window.html
index f4010f756..6e5ad96be 100644
--- a/documentation/Fl_Gl_Window.html
+++ b/documentation/Fl_Gl_Window.html
@@ -124,7 +124,7 @@ mode.
<BR> void Fl_Gl_Window::valid(char i)</A></H4>
<TT>Fl_Gl_Window::valid()</TT> is turned off when FLTK creates a new
context for this window or when the window resizes, and is turned on <I>
-after</I><TT>draw()</TT> is called. You can use this inside your <TT>
+after</I> <TT>draw()</TT> is called. You can use this inside your <TT>
draw()</TT> method to avoid unneccessarily initializing the OpenGL
context. Just do this:
<UL><PRE>
@@ -139,24 +139,6 @@ void mywindow::draw() {
}
</PRE></UL>
-<TT>Fl_Gl_Window::valid()</TT> is turned off when FLTK creates a
-new context for this window and by the window resizing, and is turned
-on <I>after</I> draw() is called. You can use this inside your draw()
-method to avoid unneccessarily initializing the OpenGL context. Just
-do this:
-
-<UL><PRE>
-void mywindow::draw() {
- if (!valid()) {
- glViewport(0,0,w(),h());
- glFrustum(...);
- glLight(...);
- ...other initilization...
- }
- ... draw your geometry here ...
-}
-</PRE></UL>
-
You can turn <TT>valid()</TT> on by calling <TT>valid(1)</TT>. You
should only do this after fixing the transformation inside a <TT>draw()</TT>
or after <TT>make_current()</TT>. This is done automatically after <TT>
diff --git a/documentation/Fl_Group.html b/documentation/Fl_Group.html
index e307d71b4..ccf7a3c45 100644
--- a/documentation/Fl_Group.html
+++ b/documentation/Fl_Group.html
@@ -69,14 +69,28 @@ and label string. The default boxtype is <TT>FL_NO_BOX</TT>.
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
+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>
- Adds a widget to the group at the end of the child array.
-<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 at the end of the child array. If the
+widget is already in a group it is removed from that group before
+adding to this one.
+
+<H4><A name=Fl_Group.insert>void Fl_Group::insert(Fl_Widget &amp;w, int n)
+<BR> void Fl_Group::insert(Fl_Widget &amp;w, Fl_Widget
+*beforethis)</A></H4>
+
+The widget is removed from it's current group (if any) and then
+inserted into this group. It is put at index <TT>n</TT> (or at the end
+if <tt>n &gt;= children()</tt>. The second version does a <TT>
+find(beforethis)</TT> and inserts using that index (at the end if
+<tt>beforethis</tt> is not in this 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.
+
<H4><A name=Fl_Group.array>const Fl_Widget **Fl_Group::array() const</A></H4>
Returns a pointer to the array of children. <I>This pointer can change
when children are added or removed!</I>
@@ -84,33 +98,25 @@ when children are added or removed!</I>
<TT>begin()</TT> sets the current group so you can build the widget
tree by just constructing the widgets. <TT>begin()</TT> is
automatically called by the constructor for Fl_Group (and thus for
-Fl_Window as well). <TT>begin()</TT> does <TT>current(this)</TT>.
+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.
+<H4><A name=Fl_Group.current>static Fl_Group *Fl_Group::current()
+<BR> static void Fl_Group::current(Fl_Group *w)</A></H4>
+<TT>current()</TT> returns the currently active group. The Fl_Widget
+ 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.child>Fl_Widget *Fl_Group::child(int n) const</A></H4>
Returns child <TT>n</TT>, where <TT>0 &lt;= n &lt; children()</TT>.
<H4><A name=Fl_Group.children>int Fl_Group::children() const</A></H4>
Returns how many child widgets the group has.
-<H4><A name=Fl_Group.current>static Fl_Group *Fl_Group::current()
-<BR> static void Fl_Group::current(Fl_Group *w)</A></H4>
-<TT>current()</TT> returns the currently active group in the widget
-tree. To prevent widgets from being added to a group, call <TT>current()</TT>
- with a <TT>NULL</TT> group.
-<H4><A name=Fl_Group.end>void Fl_Group::end()</A></H4>
-<TT>end()</TT> does <TT>current(this-&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.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.
-<H4><A name=Fl_Group.insert>void Fl_Group::insert(Fl_Widget &amp;w, int n)
-<BR> void Fl_Group::insert(Fl_Widget &amp;w, Fl_Widget *beforethis)</A></H4>
- Inserts a widget into the child array. It is put at index <TT>n</TT>
- which must be less or equal to children(). The second version does a <TT>
-find(beforethis)</TT> and inserts using that index.
-<H4><A name=Fl_Group.remove>void Fl_Group::remove(Fl_Widget &amp;w)</A></H4>
- Removes a widget from the group. This does nothing if the widget is
-not currently a child of this group.
<H4><A name=Fl_Group.resizeable>void Fl_Group::resizable(Fl_Widget *box)
<BR> void Fl_Group::resizable(Fl_Widget &amp;box)
<BR> Fl_Widget *Fl_Group::resizable() const</A></H4>
@@ -121,8 +127,8 @@ dimensions of the box are scaled to the new size. Widgets outside the
box are moved.
<P>In these examples the gray area is the resizable:
<BR></P>
-<P align=center><IMG align=TOP height=240 SRC=./resizebox1.gif>&nbsp;&nbsp; <IMG align=TOP
-height=240 SRC=./resizebox2.gif></P>
+<P align=center><IMG align=TOP SRC=./resizebox1.gif>&nbsp;&nbsp; <IMG align=TOP
+SRC=./resizebox2.gif></P>
<P>The resizable may be set to the group itself (this is the default
value for an <TT>Fl_Group</TT>, although <TT>NULL</TT> is the default
for an <TT>Fl_Window</TT>), in which case all the contents are resized.
@@ -131,4 +137,8 @@ and distance from the top-left corner. </P>
<P>It is possible to achieve any type of resize behavior by using an
invisible <TT>Fl_Box</TT> as the resizable and/or by using a hierarchy
of child <TT>Fl_Group</TT>'s. </P>
+
+<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.
</TT></BODY></HTML>
diff --git a/documentation/Fl_Menu_Bar.html b/documentation/Fl_Menu_Bar.html
index 208d7fa36..6c97bca31 100644
--- a/documentation/Fl_Menu_Bar.html
+++ b/documentation/Fl_Menu_Bar.html
@@ -35,9 +35,9 @@ will pick it. </P>
done with the menubar as the <TT>Fl_Widget*</TT> argument. If the item
does not have a callback the menubar's callback is done instead. </P>
<P>Submenus will also pop up in response to shortcuts indicated by
-putting a ''character in the name field of the menu item. If you put a
-''character in a top-level &quot;button&quot; then the shortcut picks it. The
-''character in submenus is ignored until the menu is popped up. </P>
+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
callbacks exactly the same as when you pick the item with the mouse. </P>
<H3>Methods</H3>
diff --git a/documentation/Fl_Menu_Button.html b/documentation/Fl_Menu_Button.html
index b1df98060..b073b4dd3 100644
--- a/documentation/Fl_Menu_Button.html
+++ b/documentation/Fl_Menu_Button.html
@@ -26,10 +26,10 @@ below the button as shown in the picture. However an <TT>Fl_Menu_Button</TT>
may also control a pop-up menu. This is done by setting the <TT>type()</TT>
, see below. </P>
<P>The menu will also pop up in response to shortcuts indicated by
-putting a ''character in the <TT>label()</TT>. </P>
+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 ''character in menu item names are only looked at when the menu is
+ 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
@@ -59,7 +59,7 @@ its menu items.
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.
+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
nonzero then this is a pop-up menu. The bits in <TT>type()</TT>
diff --git a/documentation/Fl_Menu_Item.html b/documentation/Fl_Menu_Item.html
index 6ab539dc6..7d3ca8820 100644
--- a/documentation/Fl_Menu_Item.html
+++ b/documentation/Fl_Menu_Item.html
@@ -5,9 +5,7 @@
<H3>Class Hierarchy</H3>
<UL>
<PRE>
-<A href=Fl_Widget.html#Fl_Widget>Fl_Widget</A>
- |
- +----<B>Fl_Menu_Item</B>----<A href=Fl_Menu_.html#Fl_Menu_>Fl_Menu_</A>
+<B>struct Fl_Menu_Item</B>
</PRE>
</UL>
<H3>Include Files</H3>
@@ -17,9 +15,11 @@
</PRE>
</UL>
<H3>Description</H3>
- The <TT>Fl_Menu_Item</TT> structure defines a single menu item that is
-used by the <TT>Fl_Menu_</TT> class. This structure is defined in <TT>
-&lt;FL/Fl_Menu_Item.H&gt;</TT>
+
+The <TT>Fl_Menu_Item</TT> structure defines a single menu item that
+is used by the <A href=Fl_Menu_.html#Fl_Menu_>Fl_Menu_</A> class. This
+structure is defined in <TT> &lt;FL/Fl_Menu_Item.H&gt;</TT>
+
<UL>
<PRE>
struct Fl_Menu_Item {
@@ -134,9 +134,10 @@ releases of FLTK. </P>
<BR> void Fl_Menu_Item::label(const char*)
<BR> void Fl_Menu_Item::label(Fl_Labeltype, const char*)</A></H4>
This is the title of the item. A <TT>NULL</TT> here indicates the end
-of the menu (or of a submenu). A ''in the item will print an
+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 ''put two
+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
Fl_Menu_Item::labeltype() const
@@ -208,8 +209,8 @@ 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
-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>
+that goes from the next item through the next one with a <TT>NULL</TT>
+<TT>label()</TT>. <TT>FL_SUBMENU_POINTER</TT> indicates that <TT>user_data()</TT>
is a pointer to another menu array.
<H4><A name=Fl_Menu_Item.checkbox>int Fl_Menu_Item::checkbox() const</A></H4>
Returns true if a checkbox will be drawn next to this item. This is
diff --git a/documentation/Fl_Tile.html b/documentation/Fl_Tile.html
index fb837d70b..e906105a0 100644
--- a/documentation/Fl_Tile.html
+++ b/documentation/Fl_Tile.html
@@ -21,7 +21,7 @@
<H3>Description</H3>
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></P>
+<P ALIGN=CENTER><IMG src=Fl_Tile.gif border=1></P>
<P><TT>Fl_Tile</TT> allows objects to be resized to zero dimensions.
To prevent this you can use the <TT>resizable()</TT> to limit where
corners can be dragged to. </P>
@@ -30,7 +30,8 @@ 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
+<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
two adjacent <TT>FL_DOWN_BOX</TT>'s drawn next to each other. </P>
@@ -50,7 +51,7 @@ and label string. The default boxtype is <TT>FL_NO_BOX</TT>.
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
+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>
diff --git a/documentation/Fl_Valuator.html b/documentation/Fl_Valuator.html
index b192d8f62..ccc6a2867 100644
--- a/documentation/Fl_Valuator.html
+++ b/documentation/Fl_Valuator.html
@@ -24,9 +24,9 @@
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 WIDTH=60%></P>
+<P ALIGN=CENTER><IMG src=valuators.gif></P>
<P>In the above diagram each box surrounds an actual subclass. These
-are further differentiated by setting the <A href=#Fl_Widget.type"><TT>
+are further differentiated by setting the <A href=#Fl_Widget.type><TT>
type()</TT></A> of the widget to the symbolic value labeling the
widget. The ones labelled &quot;0&quot; are the default versions with a <TT>
type(0)</TT>. For consistency the symbol <TT>FL_VERTICAL</TT> is
@@ -130,7 +130,7 @@ set to zero it uses <TT>fabs(maximum() - minimum()) / 100</TT>.
by <TT>value(x)</TT> and just before doing a callback (the callback can
turn it back on if desired).
<H4><A name=Fl_Valuator.set_changed>void Fl_Widget::set_changed()</A></H4>
-<H4>Sets the <TT>changed()</TT> flag. </H4>
+Sets the <TT>changed()</TT> flag.
<H4><A name=Fl_Valuator.clear_changed>void Fl_Widget::clear_changed()</A>
</H4>
Clears the <TT>changed()</TT> flag. </BODY></HTML>
diff --git a/documentation/Fl_Widget.html b/documentation/Fl_Widget.html
index 63c534fe6..a64f46677 100644
--- a/documentation/Fl_Widget.html
+++ b/documentation/Fl_Widget.html
@@ -39,14 +39,13 @@ to call <TT>redraw()</TT> after these. </P>
<LI><A href=#Fl_Widget.activate>activate</A></LI>
<LI><A href=#Fl_Widget.active>active</A></LI>
<LI><A href=#Fl_Widget.active_r>active_r</A></LI>
-<LI><A href=#Fl_Widget.activevisible>activevisible</A></LI>
<LI><A href=#Fl_Widget.align>align</A></LI>
<LI><A href=#Fl_Widget.argument>argument</A></LI>
<LI><A href=#Fl_Widget.box>box</A></LI>
+<LI><A href=#Fl_Widget.callback>callback</A></LI>
</UL>
</TD><TD align=left valign=top>
<UL>
-<LI><A href=#Fl_Widget.callback>callback</A></LI>
<LI><A href=#Fl_Widget.changed>changed</A></LI>
<LI><A href=#Fl_Widget.clear_changed>clear_changed</A></LI>
<LI><A href=#Fl_Widget.color>color</A></LI>
@@ -55,10 +54,10 @@ to call <TT>redraw()</TT> after these. </P>
<LI><A href=#Fl_Widget.deactivate>deactivate</A></LI>
<LI><A href=#Fl_Widget.default_callback>default_callback</A></LI>
<LI><A href=#Fl_Widget.do_callback>do_callback</A></LI>
+<LI><A href=#Fl_Widget.h>h</A></LI>
</UL>
</TD><TD align=left valign=top>
<UL>
-<LI><A href=#Fl_Widget.h>h</A></LI>
<LI><A href=#Fl_Widget.hide>hide</A></LI>
<LI><A href=#Fl_Widget.inside>inside</A></LI>
<LI><A href=#Fl_Widget.label>label</A></LI>
@@ -66,6 +65,7 @@ to call <TT>redraw()</TT> after these. </P>
<LI><A href=#Fl_Widget.labelfont>labelfont</A></LI>
<LI><A href=#Fl_Widget.labelsize>labelsize</A></LI>
<LI><A href=#Fl_Widget.labeltype>labeltype</A></LI>
+<LI><A href=#Fl_Widget.output>output</A></LI>
<LI><A href=#Fl_Widget.parent>parent</A></LI>
</UL>
</TD><TD align=left valign=top>
@@ -78,10 +78,11 @@ to call <TT>redraw()</TT> after these. </P>
<LI><A href=#Fl_Widget.show>show</A></LI>
<LI><A href=#Fl_Widget.size>size</A></LI>
<LI><A href=#Fl_Widget.take_focus>take_focus</A></LI>
-<LI><A href=#Fl_Widget.type>type</A></LI>
+<LI><A href=#Fl_Widget.takesevents>takesevents</A></LI>
</UL>
</TD><TD align=left valign=top>
<UL>
+<LI><A href=#Fl_Widget.type>type</A></LI>
<LI><A href=#Fl_Widget.user_data>user_data</A></LI>
<LI><A href=#Fl_Widget.visible>visible</A></LI>
<LI><A href=#Fl_Widget.visible_r>visible_r</A></LI>
@@ -113,9 +114,9 @@ destroy that group <I>immediately</I> after destroying the children.
Fl_Window (<I>not</I> its parent if that is not an Fl_Window), and its
width and height.
<H4><A name=Fl_Widget.resize>virtual void
-Fl_Widget::resize(int,int,int,int)</A>
-<BR><A name=Fl_Widget.position>void Fl_Widget::position(short x,short y)</A>
-<BR><A name=Fl_Widget.size>void Fl_Widget::size(short w,short h)</A></H4>
+Fl_Widget::resize(int x, int y, int w, int h)</A>
+<BR><A name=Fl_Widget.position>void Fl_Widget::position(short x, short y)</A>
+<BR><A name=Fl_Widget.size>void Fl_Widget::size(short w, short h)</A></H4>
Change the size or position of the widget. This is a virtual function
so the widget may implement its own handling of resizing. The default
version does <I>not</I> do redraw(), that is the parent widget's
@@ -269,9 +270,19 @@ true on it <I>and all of its parents</I>.
<P>Changing this value will send <TT>FL_ACTIVATE</TT> or <TT>
FL_DEACTIVATE</TT> to the widget if <tt>active_r()</tt> is true.
<P>Currently you cannot deactivate <TT>Fl_Window</TT> widgets. </P>
-<H4><A name=Fl_Widget.activevisible>int Fl_Widget::activevisible() const</A>
+
+<H4><A name=Fl_Widget.output>int Fl_Widget::output() const</A><BR>
+<A name=Fl_Widget.set_output>void Fl_Widget::set_output()</A></BR>
+<A name=Fl_Widget.clear_output>void Fl_Widget::clear_output()</A></H4>
+<tt>output()</tt> means the same as <tt>!active()</tt> except it does
+not change how the widget is drawn. The widget will not recieve any
+events. This is useful for making scrollbars or buttons that work as
+displays rather than input devices.
+
+<H4><A name=Fl_Widget.takesevents>int Fl_Widget::takesevents() const</A>
</H4>
- This is the same as <TT>active() &amp;&amp; visible()</TT> but is faster.
+This is the same as <TT>(active() &amp;&amp; visible() &amp;&amp;
+!output())</TT> but is faster.
<H4><A name=Fl_Widget.redraw>void Fl_Widget::redraw()</A></H4>
Mark the widget as needing its <TT>draw()</TT> routine called.
<H4><A name=Fl_Widget.damage>uchar Fl_Widget::damage() const</A></H4>
diff --git a/documentation/Fl_Window.html b/documentation/Fl_Window.html
index f78fee9f3..568dd8d4c 100644
--- a/documentation/Fl_Window.html
+++ b/documentation/Fl_Window.html
@@ -81,8 +81,7 @@ exit(0)</TT> if this is the last top-level window. </P>
</TD></TR>
</TABLE>
</CENTER>
-<H4><A name=Fl_Window.Fl_Window>Fl_Window::Fl_Window(int w, int h, const char *title = 0)<BR>
-Fl_Window::Fl_Window(int x, int y, int w, int h, const char *title = 0)</A></H4>
+<H4><A name=Fl_Window.Fl_Window>Fl_Window::Fl_Window(int w, int h, const char *title = 0)</H4>
The first form of the constructor should be used for a "top-level" window
(that is, one that is not inside another window). It correctly sets
@@ -92,14 +91,16 @@ place to show the window or allow the user to pick a location. If you want to
force a position you should call <tt>position(x,y)</tt> or <tt>hotspot()</tt>
before calling <tt>show()</tt>.
-<P>The second form of the constructor is for creating child windows. It
-leaves <tt>visible()</tt> set to true.
-
<P><TT>Fl_Widget::box()</TT> is set to <TT>FL_FLAT_BOX</TT>. If you
plan to completely fill the window with children widgets you should
change this to <TT>FL_NO_BOX</TT>. If you turn the window border off
you may want to change this to <TT>FL_UP_BOX</TT>. </P>
+<h4>Fl_Window::Fl_Window(int x, int y, int w, int h, const char *title = 0)</A></H4>
+
+<P>The second form of the constructor is for creating child windows. It
+leaves <tt>visible()</tt> set to true.
+
<H4><A name=Fl_Window.~Fl_Window>virtual Fl_Window::~Fl_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
@@ -121,10 +122,11 @@ that direction such that the window will fill the screen. </LI>
<LI><TT>dw</TT> and <TT>dh</TT> are size increments. The window will
be constrained to widths of <TT>minw + N * dw</TT>, where <TT>N</TT>
is any non-negative integer. If these are less or equal to 1 they
-are ignored. </LI>
+are ignored. (this is ignored on WIN32)</LI>
<LI><TT>aspect</TT> is a flag that indicates that the window should
preserve it's aspect ratio. This only works if both the maximum and
- minimum have the same aspect ratio. </LI>
+ minimum have the same aspect ratio. (ignored on WIN32 and by many X
+ window managers)</LI>
</UL>
If this function is not called, FLTK tries to figure out the range
from the setting of <A href=#Fl_Group.resizable><TT>resizeable()</TT></A>
@@ -250,7 +252,9 @@ non-alphanumeric character and capitalizing the first character, and
the second one if the first is 'x'. Thus &quot;foo&quot; turns into &quot;foo, Foo&quot;,
and &quot;xprog.1&quot; turns into &quot;xprog, XProg&quot;.</I> This only works if called <I>
before</I> calling <TT>show()</TT>.
-<P>This method has no effect under Microsoft Windows. </P>
+<P>Under Microsoft Windows this string is used as the name of the
+WNDCLASS structure, though it is not clear if this can have any
+visible effect. </P>
<H4><A name=Fl_Window.make_current>void Fl_Window::make_current()</A></H4>
<TT>make_current()</TT> sets things up so that the drawing functions in <A
href=drawing.html#Drawing><TT>&lt;FL/fl_draw.H&gt;</TT></A> will go into this
diff --git a/documentation/common.html b/documentation/common.html
index ae42af388..b98ec9c75 100644
--- a/documentation/common.html
+++ b/documentation/common.html
@@ -62,7 +62,7 @@ input-&gt;value(&quot;Now is the time for all good men...&quot;);
</PRE>
</UL>
<p>The string is copied to the widget's own storage when you set the
-<tt>value()<tt> of the widget.
+<tt>value()</tt> of the widget.
<H2>Valuators</H2>
Unlike text widgets, valuators keep track of numbers instead of
strings. FLTK provides the following valuators:
diff --git a/documentation/enumerations.html b/documentation/enumerations.html
index 2bb19ce69..be8d012c7 100644
--- a/documentation/enumerations.html
+++ b/documentation/enumerations.html
@@ -2,6 +2,8 @@
<H1 ALIGN=RIGHT><A NAME=enumerations>C - FLTK Enumerations</A></H1>
This appendix lists the enumerations provided in the <TT>
&lt;FL/Enumerations.H&gt;</TT> header file, organized by section.
+Constants whose value is zero are marked with "(0)", this is often
+useful to know when programming.
<H2>Version Numbers</H2>
The FLTK version number is stored in a number of compile-time
constants:
@@ -16,7 +18,8 @@ the major and minor release numbers, currently 1.0. </LI>
Events are identified by an <TT>Fl_Event</TT> enumeration value. The
following events are currently defined:
<UL>
-<LI><TT>FL_NO_EVENT</TT> - No event occurred. </LI>
+<LI><TT>FL_NO_EVENT</TT> - No event (or an event fltk does not
+understand) occurred (0).</LI>
<LI><TT>FL_PUSH</TT> - A mouse button was pushed. </LI>
<LI><TT>FL_RELEASE</TT> - A mouse button was released. </LI>
<LI><TT>FL_ENTER</TT> - The mouse pointer entered a widget. </LI>
@@ -42,7 +45,7 @@ following events are currently defined:
<H2>Callback &quot;When&quot; Conditions</H2>
The following constants determine when a callback is performed:
<UL>
-<LI><TT>FL_WHEN_NEVER</TT> - Never call the callback. </LI>
+<LI><TT>FL_WHEN_NEVER</TT> - Never call the callback (0). </LI>
<LI><TT>FL_WHEN_CHANGED</TT> - Do the callback only when the widget
value changes. </LI>
<LI><TT>FL_WHEN_NOT_CHANGED</TT> - Do the callback whenever the user
@@ -116,18 +119,29 @@ FL_KEYBOARD</TT> and <TT>FL_SHORTCUT</TT> events:
<TT>Fl_Widget::align()</TT></A> to control the positioning of the
label:
<UL>
-<LI><TT>FL_ALIGN_CENTER</TT> - The label is centered. </LI>
+<LI><TT>FL_ALIGN_CENTER</TT> - The label is centered (0). </LI>
<LI><TT>FL_ALIGN_TOP</TT> - The label is top-aligned. </LI>
<LI><TT>FL_ALIGN_BOTTOM</TT> - The label is bottom-aligned. </LI>
<LI><TT>FL_ALIGN_LEFT</TT> - The label is left-aligned. </LI>
<LI><TT>FL_ALIGN_RIGHT</TT> - The label is right-aligned. </LI>
-<LI><TT>FL_ALIGN_INSIDE</TT> - The label is put inside the widget. </LI>
<LI><TT>FL_ALIGN_CLIP</TT> - The label is clipped to the widget. </LI>
<LI><TT>FL_ALIGN_WRAP</TT> - The label text is wrapped as needed. </LI>
+<LI><TT>FL_ALIGN_TOP_LEFT</TT></LI>
+<LI><TT>FL_ALIGN_TOP_RIGHT</TT></LI>
+<LI><TT>FL_ALIGN_BOTTOM_LEFT</TT></LI>
+<LI><TT>FL_ALIGN_BOTTOM_RIGHT</TT></LI>
+<LI><TT>FL_ALIGN_LEFT_TOP</TT></LI>
+<LI><TT>FL_ALIGN_RIGHT_TOP</TT></LI>
+<LI><TT>FL_ALIGN_LEFT_BOTTOM</TT></LI>
+<LI><TT>FL_ALIGN_RIGHT_BOTTOM</TT></LI>
+<LI><TT>FL_ALIGN_INSIDE</TT> - 'or' this with other values to put
+label inside the widget. </LI>
+
</UL>
<H2>Fonts</H2>
The following constants define the standard FLTK fonts:
-<LI><TT>FL_HELVETICA</TT> - Helvetica (or Arial) normal. </LI>
+<ul>
+<LI><TT>FL_HELVETICA</TT> - Helvetica (or Arial) normal (0). </LI>
<LI><TT>FL_HELVETICA_BOLD</TT> - Helvetica (or Arial) bold. </LI>
<LI><TT>FL_HELVETICA_ITALIC</TT> - Helvetica (or Arial) oblique. </LI>
<LI><TT>FL_HELVETICA_BOLD_ITALIC</TT> - Helvetica (or Arial)
@@ -144,32 +158,49 @@ bold-oblique. </LI>
<LI><TT>FL_SCREEN</TT> - Default monospaced screen font. </LI>
<LI><TT>FL_SCREEN_BOLD</TT> - Default monospaced bold screen font. </LI>
<LI><TT>FL_ZAPF_DINGBATS</TT> - Zapf-dingbats font.
+</ul>
+
<H2>Colors</H2>
The following color constants can be used to access the colors in the
FLTK standard color palette:
<UL>
-<LI><TT>FL_BLACK</TT></LI>
+<LI><TT>FL_BLACK</TT> - the default label color (0)</LI>
<LI><TT>FL_RED</TT></LI>
<LI><TT>FL_GREEN</TT></LI>
<LI><TT>FL_YELLOW</TT></LI>
<LI><TT>FL_BLUE</TT></LI>
<LI><TT>FL_MAGENTA</TT></LI>
<LI><TT>FL_CYAN</TT></LI>
-<LI><TT>FL_WHITE</TT></LI>
-<LI><TT>FL_GRAY0</TT></LI>
-<LI><TT>FL_DARK3</TT></LI>
-<LI><TT>FL_DARK2</TT></LI>
-<LI><TT>FL_DARK1</TT></LI>
-<LI><TT>FL_GRAY</TT></LI>
-<LI><TT>FL_LIGHT1</TT></LI>
-<LI><TT>FL_LIGHT2</TT></LI>
-<LI><TT>FL_LIGHT3</TT></LI>
+<LI><TT>FL_WHITE</TT> - the default background for text</LI>
+<LI><TT>FL_SELECTION_COLOR</TT> - change to dark blue for Windows style</LI>
+<LI><TT>FL_GRAY</TT> - the default color.</LI>
</UL>
+
+In addition there are two inline functions to allow you to select
+grays or colors from the FLTK colormap:
+
+<p><b>Fl_Color fl_gray_ramp(int i)</b>
+<br>Returs a gray color. Returns black for zero, returns white for
+<tt>FL_NUM_GRAY</tt> (which is 24) minus 1. To get the closest to an
+8-bit gray value 'I' use
+<tt>fl_gray_ramp(I*FL_NUM_GRAY/256)</tt>
+
+<p><b>Fl_Color fl_color_cube(int r, int g, int b)</b>
+<br>Returns a color out of the color cube.
+
+<tt>r</tt> must be in the range 0 to FL_NUM_RED (5) minus 1.
+<tt>g</tt> must be in the range 0 to FL_NUM_GREEN (8) minus 1.
+<tt>b</tt> must be in the range 0 to FL_NUM_BLUE (5) minus 1.
+
+To get the closest color to a 8-bit set of R,G,B values use
+<tt>fl_color_cube(R*FL_NUM_RED/256, G*FL_NUM_GREEN/256,
+B*FL_NUM_BLUE/256);</tt>
+
<H2>Cursors</H2>
The following constants define the mouse cursors that are available in
FLTK:
<UL>
-<LI><TT>FL_CURSOR_DEFAULT</TT> - the default cursor, usually an arrow </LI>
+<LI><TT>FL_CURSOR_DEFAULT</TT> - the default cursor, usually an arrow (0)</LI>
<LI><TT>FL_CURSOR_ARROW</TT> - an arrow pointer </LI>
<LI><TT>FL_CURSOR_CROSS</TT> - crosshair </LI>
<LI><TT>FL_CURSOR_WAIT</TT> - watch or hourglass </LI>
diff --git a/documentation/functions.html b/documentation/functions.html
index 96ddc536b..d8943d3b7 100644
--- a/documentation/functions.html
+++ b/documentation/functions.html
@@ -38,25 +38,27 @@ the user types ESC or clicks outside the window.
waits for the user to hit the button. The message will wrap to fit the
window, or may be many lines by putting <TT>\n</TT> characters into it.
The enter key is a shortcut for the OK button.
-<P ALIGN=CENTER><IMG src=./fl_message.gif></P>
+<P ALIGN=CENTER><IMG src=./fl_message.gif border=1></P>
<H3><A name=fl_>void fl_alert(const char *, ...)</A></H3>
Same as <TT>fl_message()</TT> except for the &quot;!&quot; symbol.
-<P ALIGN=CENTER><IMG src=./fl_alert.gif></P>
+<P ALIGN=CENTER><IMG src=./fl_alert.gif border=1></P>
<H3><A name=fl_ask>int fl_ask(const char *, ...)</A></H3>
Displays a printf-style message in a pop-up box with an &quot;Yes&quot; and &quot;No&quot;
button and waits for the user to hit a button. The return value is 1
if the user hits Yes, 0 if they pick No. The enter key is a shortcut
for Yes and ESC is a shortcut for No.
-<P ALIGN=CENTER><IMG src=./fl_ask.gif></P>
+<P ALIGN=CENTER><IMG src=./fl_ask.gif border=1></P>
<H3><A name=fl_choice>int fl_choice(const char *q, const char *b0,
const char *b1, const char *b2, ...)</A></H3>
- Shows the message with three buttons below it marked with the strings <TT>
-b0</TT>, <TT>b1</TT>, and <TT>b2</TT>. Returns 0, 1, or 2 depending on
-which button is hit. ESC is a shortcut for button 0 and the enter key
-is a shortcut for button 1. Notice the &quot;misordered&quot; position of the
-buttons. You can hide buttons by passing <TT>NULL</TT> as their
-labels.
-<P ALIGN=CENTER><IMG src=./fl_choice.gif></P>
+
+ Shows the message with three buttons below it marked with the strings
+<TT> b0</TT>, <TT>b1</TT>, and <TT>b2</TT>. Returns 0, 1, or 2
+depending on which button is hit. ESC is a shortcut for button 0 and
+the enter key is a shortcut for button 1. Notice the buttons are
+positioned &quot;backwards&quot; You can hide buttons by passing
+<TT>NULL</TT> as their labels.
+
+<P ALIGN=CENTER><IMG src=./fl_choice.gif border=1></P>
<H3><A name=fl_input>const char *fl_input(const char *label, const char
*deflt = 0, ...)</A></H3>
Pops up a window displaying a string, lets the user edit it, and
@@ -64,12 +66,12 @@ return the new value. The cancel button returns <TT>NULL</TT>. <I>The
returned pointer is only valid until the next time <TT>fl_input()</TT>
is called</I>. Due to back-compatability, the arguments to any printf
commands in the label are after the default value.
-<P ALIGN=CENTER><IMG src=./fl_input.gif></P>
+<P ALIGN=CENTER><IMG src=./fl_input.gif border=1></P>
<H3><A name=fl_password>const char *fl_password(const char *label,
const char *deflt = 0, ...)</A></H3>
Same as <TT>fl_input()</TT> except an <A href=Fl_Secret_Input.html#Fl_Secret_Input>
<TT>Fl_Secret_Input</TT></A> field is used.
-<P ALIGN=CENTER><IMG src=./fl_password.gif></P>
+<P ALIGN=CENTER><IMG src=./fl_password.gif border=1></P>
<H3><A name=fl_message_font>void fl_message_font(Fl_Font fontid, uchar
size)</A></H3>
Change the font and font size used for the messages in all the popups.
@@ -269,7 +271,9 @@ index of each word. The callback should return zero if the switch is
unrecognized, and not change <TT>i</TT>. It should return non-zero if
the switch is recognized, and add at least 1 to <TT>i</TT> (it can add
more to consume words after the switch). This function is called
-before any other tests, so you can override any FLTK switch. </P>
+<i>before</i> any other tests, so <i>you can override any FLTK
+switch</i> (this is why fltk can use very short switches instead of
+the long ones all other toolkits force you to use).</P>
<P>On return <TT>i</TT> is set to the index of the first non-switch.
This is either: </P>
<UL>
@@ -282,7 +286,7 @@ This is either: </P>
in which case it is zero. If your program takes no arguments other
than switches you should produce an error if the return value is less
than <TT>argc</TT>.
-<P>All switches may be abbreviated to two letters and case is ignored: </P>
+<P>All switches except -bg2 may be abbreviated one letter and case is ignored: </P>
<UL>
<LI><TT>-display host:n.n</TT> The X display to use (ignored under
WIN32). </LI>
@@ -354,8 +358,10 @@ windows are displayed.
<H3><A name=damage>static int Fl::damage()</A></H3>
If true then <A href=#flush><TT>flush()</TT></A> will do something.
<H3><A name=display>static void Fl::display(const char *)</A></H3>
- Sets the X display to use for all windows. This function is ignored
-under WIN32.
+ Sets the X display to use for all windows. Actually this just sets
+ the environment variable $DISPLAY to the passed string, so this only
+ works before you show() the first window or otherwise open the display,
+ and does nothing useful under WIN32.
<H3><A name=enable_symbols>static void Fl::enable_symbols()</A></H3>
Enables the symbol drawing code.
<H3><A name=event_button>static int Fl::event_button()</A></H3>
@@ -501,10 +507,10 @@ colormap.
<BR> static void Fl::get_color(Fl_Color, uchar &amp;r, uchar &amp;g, uchar &amp;b)</A>
</H3>
Returns the color index or RGB value for the given FLTK color index.
-<H3><A name=get_font>static const char *Fl::get_font(int face) Get the
+<H3><A name=get_font>static const char *Fl::get_font(int face)</H3> Get the
string for this face. This string is different for each face. Under X
this value is passed to XListFonts to get all the sizes of this face. </A>
-</H3>
+
<H3><A name=get_font_name>static const char *Fl::get_font_name(int
face, int *attributes = 0)</A></H3>
Get a human-readable string describing the family of this face. This
@@ -550,8 +556,8 @@ call this so your X windows use the same visual as an <A href=Fl_Gl_Window.html#
flashing.
<P>See <A href=Fl_Gl_Window.html#Fl_Gl_Window.mode><TT>Fl_Gl_Window</TT></A>
for a list of additional values for the argument. </P>
-<H3><A name=grab>static void Fl::grab(Fl_Window static Fl_Window
-*Fl::grab()</A></H3>
+<H3><A name=grab>static void Fl::grab(Fl_Window&amp;)
+<br>static Fl_Window* Fl::grab()</A></H3>
This is used when pop-up menu systems are active. Send all events to
the passed window no matter where the pointer or focus is (including in
other programs). The window <I>does not have to be <TT>shown()</TT></I>
@@ -575,13 +581,14 @@ widget uses the event.
This is the usage string that is displayed if <TT>Fl::args()</TT>
detects an invalid argument on the command-line.
<H3><A name=modal>static Fl_Window *Fl::modal()</A></H3>
- The <TT>modal()</TT> window has its <TT>handle()</TT> method called
-for all events, and no other windows will have <TT>handle()</TT>
- called. If <A href=#grab><TT>grab()</TT></A> has been done then this
-is equal to <TT>grab()</TT>. Otherwise this is the most recently <TT>
+Returns the top-most <tt>modal()</tt> window currently shown.
+This is the most recently <TT>
shown()</TT> window with <A href=Fl_Window.html#Fl_Window.modal><TT>
modal()</TT></A> true, or <TT>NULL</TT> if there are no <TT>modal()</TT>
- windows <TT>shown()</TT>.
+windows <TT>shown()</TT>.
+The <TT>modal()</TT> window has its <TT>handle()</TT> method called
+for all events, and no other windows will have <TT>handle()</TT>
+called (<A href=#grab><TT>grab()</TT></A> overrides this).
<H3><A name=next_window>static Fl_Window *Fl::next_window(Fl_Window *)</A>
</H3>
Returns the next top-level window in the widget hierarchy.
diff --git a/documentation/widgets.html b/documentation/widgets.html
index ccebf0e97..452d709b7 100644
--- a/documentation/widgets.html
+++ b/documentation/widgets.html
@@ -32,7 +32,7 @@ see <A href=functions.html#functions>Appendix B</A>.
</TD>
<TD>
<A HREF=Fl_Hold_Browser.html#Fl_Hold_Browser>Fl_Hold_Browser</A><BR>
-<A HREF=functions.html#Fl_Input>Fl_Input</A><BR>
+<A HREF=Fl_Input.html#Fl_Input>Fl_Input</A><BR>
<A HREF=Fl_Input_.html#Fl_Input_>Fl_Input_</A><BR>
<A HREF=Fl_Int_Input.html#Fl_Int_Input>Fl_Int_Input</A><BR>
<A HREF=Fl_Light_Button.html#Fl_Light_Button>Fl_Light_Button</A><BR>