mirror of
https://github.com/fltk/fltk.git
synced 2026-05-28 11:25:22 +08:00
Update documentation files to eliminate most of the warnings
and errors reported by HTML Tidy. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1454 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -16,6 +16,11 @@ CHANGES SINCE FLTK 1.0.10
|
|||||||
- Eliminated all "string literal converted to char *"
|
- Eliminated all "string literal converted to char *"
|
||||||
warnings.
|
warnings.
|
||||||
|
|
||||||
|
- OS/2 updates from Alexander Mai.
|
||||||
|
|
||||||
|
- Tidied up the HTML documentation to be more standards
|
||||||
|
compliant.
|
||||||
|
|
||||||
- Added support for AIX (static library only).
|
- Added support for AIX (static library only).
|
||||||
|
|
||||||
- Added support for SunOS 4.x
|
- Added support for SunOS 4.x
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<H3>Description</H3>
|
<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.
|
to be very useful for values that need a large dynamic range.
|
||||||
<P ALIGN=CENTER><IMG SRC="adjuster1.gif"></P>
|
<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.
|
<P>When you press a button and drag to the right the value increases.
|
||||||
When you drag to the left it decreases. The largest button adjusts by
|
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
|
<TT>100 * step()</TT>, the next by <TT>10 * step()</TT> and that
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ const char * = 0)
|
|||||||
char *)</A></H4>
|
char *)</A></H4>
|
||||||
The first constructor sets <TT>box()</TT> to <TT>FL_NO_BOX</TT>, which
|
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
|
means it is invisible. However such widgets are useful as placeholders
|
||||||
or <A href=#Fl_Group.resizable"><TT>Fl_Group::resizable()</TT></A>
|
or <A href="#Fl_Group.resizable"><TT>Fl_Group::resizable()</TT></A>
|
||||||
values. To change the box to something visible, use <TT>box(n)</TT>.
|
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
|
<P>The second form of the constructor sets the box to the specified box
|
||||||
type. </P>
|
type. </P>
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ browser is a lot of work or is inefficient, you may want to make a
|
|||||||
subclass of <TT>Fl_Browser_</TT>. </P>
|
subclass of <TT>Fl_Browser_</TT>. </P>
|
||||||
<H3>Methods</H3>
|
<H3>Methods</H3>
|
||||||
<CENTER>
|
<CENTER>
|
||||||
<TABLE width=90%>
|
<TABLE width=90% summary="Fl_Browser methods">
|
||||||
<TR><TD align=left valign=top>
|
<TR><TD align=left valign=top>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A href=#Fl_Browser.Fl_Browser>Fl_Browser</A></LI>
|
<LI><A href=#Fl_Browser.Fl_Browser>Fl_Browser</A></LI>
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ accessing image data or doing <TT>stat()</TT> on a file or doing some
|
|||||||
other slow operation. </P>
|
other slow operation. </P>
|
||||||
<H3>Methods</H3>
|
<H3>Methods</H3>
|
||||||
<CENTER>
|
<CENTER>
|
||||||
<TABLE width=90%>
|
<TABLE width=90% summary="Fl_Browser_ methods">
|
||||||
<TR><TD align=left valign=top>
|
<TR><TD align=left valign=top>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A href="#Fl_Browser_.Fl_Browser_">Fl_Browser_</A></LI>
|
<LI><A href="#Fl_Browser_.Fl_Browser_">Fl_Browser_</A></LI>
|
||||||
@@ -229,7 +229,7 @@ It allows the <TT>Fl_Browser_</TT> to update its cache data as needed.
|
|||||||
<H4><A NAME="Fl_Browser_.item_draw">virtual void Fl_Browser_::item_draw(void *p, int x, int y, int w, int h)</A></H4>
|
<H4><A NAME="Fl_Browser_.item_draw">virtual void Fl_Browser_::item_draw(void *p, int x, int y, int w, int h)</A></H4>
|
||||||
|
|
||||||
<P>This method must be provided by the subclass to draw the item
|
<P>This method must be provided by the subclass to draw the item
|
||||||
<TT>p</TT> in the area indicated by <TT>x</TT>, <TT>y<TT>, <TT>w</TT>,
|
<TT>p</TT> in the area indicated by <TT>x</TT>, <TT>y</TT>, <TT>w</TT>,
|
||||||
and <TT>h</TT>.
|
and <TT>h</TT>.
|
||||||
|
|
||||||
|
|
||||||
@@ -265,7 +265,7 @@ item <TT>p</TT> in pixels. Allow for two additional pixels for the list
|
|||||||
selection box. This method differs from
|
selection box. This method differs from
|
||||||
<A HREF="#Fl_Browser_.item_height"><TT>item_height</TT></A> in that it is only
|
<A HREF="#Fl_Browser_.item_height"><TT>item_height</TT></A> in that it is only
|
||||||
called for selection and scrolling operations. The default implementation
|
called for selection and scrolling operations. The default implementation
|
||||||
calls <TT>item_height</T>.
|
calls <TT>item_height</TT>.
|
||||||
|
|
||||||
|
|
||||||
<H4><A NAME="Fl_Browser_.item_select">virtual void Fl_Browser_::item_select(void *p, int s=1)</A></H4>
|
<H4><A NAME="Fl_Browser_.item_select">virtual void Fl_Browser_::item_select(void *p, int s=1)</A></H4>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ Alt</I> key so that the input field does not eat the event first as an <TT>
|
|||||||
FL_KEYBOARD</TT> event. </P>
|
FL_KEYBOARD</TT> event. </P>
|
||||||
<H3>Methods</H3>
|
<H3>Methods</H3>
|
||||||
<CENTER>
|
<CENTER>
|
||||||
<TABLE width=90%>
|
<TABLE width=90% summary="Fl_Button methods">
|
||||||
<TR><TD align=left valign=top>
|
<TR><TD align=left valign=top>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A href=#Fl_Button.Fl_Button>Fl_Button</A></LI>
|
<LI><A href=#Fl_Button.Fl_Button>Fl_Button</A></LI>
|
||||||
|
|||||||
@@ -18,10 +18,10 @@
|
|||||||
</UL>
|
</UL>
|
||||||
<H3>Description</H3>
|
<H3>Description</H3>
|
||||||
This widget displays simple charts and is provided for Forms compatibility.
|
This widget displays simple charts and is provided for Forms compatibility.
|
||||||
<CENTER><IMG src="charts.gif" width="80%"></CENTER>
|
<CENTER><IMG src="charts.gif" width="80%" alt="Fl_Chart widget"></CENTER>
|
||||||
<H3>Methods</H3>
|
<H3>Methods</H3>
|
||||||
<CENTER>
|
<CENTER>
|
||||||
<TABLE width=90%>
|
<TABLE width=90% summary="Fl_Chart methods.">
|
||||||
<TR><TD align=left valign=top>
|
<TR><TD align=left valign=top>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A href=#Fl_Chart.Fl_Chart>Fl_Chart</A></LI>
|
<LI><A href=#Fl_Chart.Fl_Chart>Fl_Chart</A></LI>
|
||||||
|
|||||||
@@ -20,12 +20,12 @@
|
|||||||
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>
|
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_Check_Button.gif"></P>
|
<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 "on" state by
|
<P>The <TT>Fl_Check_Button</TT> subclass display the "on" state by
|
||||||
turning on a light, rather than drawing pushed in. The shape of the
|
turning on a light, rather than drawing pushed in. The shape of the
|
||||||
"light" is initially set to FL_DIAMOND_DOWN_BOX. The color of the
|
"light" is initially set to FL_DIAMOND_DOWN_BOX. The color of the
|
||||||
light when on is controlled with <TT>selection_color()<TT>, which
|
light when on is controlled with <TT>selection_color()</TT>, which
|
||||||
defaults to FL_RED. </TT></TT></P>
|
defaults to FL_RED.</P>
|
||||||
<H3>Methods</H3>
|
<H3>Methods</H3>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A href=#Fl_Check_Button.Fl_Check_Button>Fl_Check_Button</A></LI>
|
<LI><A href=#Fl_Check_Button.Fl_Check_Button>Fl_Check_Button</A></LI>
|
||||||
|
|||||||
@@ -46,13 +46,8 @@ Fl_Double_Window::~Fl_Double_Window()</A></H4>
|
|||||||
The destructor <I>also deletes all the children</I>. This allows a
|
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
|
whole tree to be deleted at once, without having to keep a pointer to
|
||||||
all the children in the user code.
|
all the children in the user code.
|
||||||
<H4><A name="Fl_Double_Window.pixmap>ulong Fl_Double_Window::pixmap() const</a></h4>
|
<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
|
Returns the off-screen pixmap or back buffer. This value is zero until
|
||||||
the first time <tt>flush()</tt> is called.
|
the first time <tt>flush()</tt> is called.
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
">
|
|
||||||
</H4>
|
|
||||||
</BODY></HTML>
|
</BODY></HTML>
|
||||||
@@ -31,7 +31,7 @@ This works pretty well if your graphics are double buffered, but not
|
|||||||
very well for single-buffered. </P>
|
very well for single-buffered. </P>
|
||||||
<H3>Methods</H3>
|
<H3>Methods</H3>
|
||||||
<CENTER>
|
<CENTER>
|
||||||
<TABLE width=90%>
|
<TABLE width=90% summary="Fl_Gl_Window methods.">
|
||||||
<TR><TD align=left valign=top>
|
<TR><TD align=left valign=top>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A href=#Fl_Gl_Window.Fl_Gl_Window>Fl_Gl_Window</A></LI>
|
<LI><A href=#Fl_Gl_Window.Fl_Gl_Window>Fl_Gl_Window</A></LI>
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ groups can also be used to control radio buttons or to enforce resize
|
|||||||
behavior.
|
behavior.
|
||||||
<H3>Methods</H3>
|
<H3>Methods</H3>
|
||||||
<CENTER>
|
<CENTER>
|
||||||
<TABLE width=90%>
|
<TABLE width=90% summary="Fl_Group methods.">
|
||||||
<TR><TD align=left valign=top>
|
<TR><TD align=left valign=top>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A href=#Fl_Group.Fl_Group>Fl_Group</A></LI>
|
<LI><A href=#Fl_Group.Fl_Group>Fl_Group</A></LI>
|
||||||
@@ -138,8 +138,8 @@ dimensions of the box are scaled to the new size. Widgets outside the
|
|||||||
box are moved.
|
box are moved.
|
||||||
<P>In these examples the gray area is the resizable:
|
<P>In these examples the gray area is the resizable:
|
||||||
<BR></P>
|
<BR></P>
|
||||||
<P align=center><IMG align=TOP SRC=./resizebox1.gif> <IMG align=TOP
|
<P align=center><IMG align=TOP SRC="resizebox1.gif" ALT="Resizeable groups">
|
||||||
SRC=./resizebox2.gif></P>
|
<IMG align=TOP SRC="resizebox2.gif" ALT="Resizeable groups"></P>
|
||||||
<P>The resizable may be set to the group itself (this is the default
|
<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
|
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.
|
for an <TT>Fl_Window</TT>), in which case all the contents are resized.
|
||||||
@@ -152,4 +152,4 @@ 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
|
||||||
&Fl_Group::add_resizable(Fl_Widget &box)</A></H4>
|
&Fl_Group::add_resizable(Fl_Widget &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.
|
||||||
</TT></BODY></HTML>
|
</BODY></HTML>
|
||||||
|
|||||||
@@ -20,16 +20,15 @@
|
|||||||
</PRE>
|
</PRE>
|
||||||
</UL>
|
</UL>
|
||||||
<H3>Description</H3>
|
<H3>Description</H3>
|
||||||
This is the FLTK text input widget. It displays a single line of text
|
<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
|
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
|
a white background. The text may contain any characters (even 0), and
|
||||||
will correctly display anything, using ^X notation for unprintable
|
will correctly display anything, using ^X notation for unprintable
|
||||||
control characters and \nnn notation for unprintable characters with
|
control characters and \nnn notation for unprintable characters with
|
||||||
the high bit set. It assummes the font can draw any characters in the
|
the high bit set. It assumes the font can draw any characters in the
|
||||||
ISO-8859-1 character set.
|
ISO-8859-1 character set.
|
||||||
|
|
||||||
<p>
|
<CENTER><TABLE border=1 WIDTH=90% summary="Fl_Input keyboard and mouse bindings.">
|
||||||
<CENTER><TABLE border=1 WIDTH=90%>
|
|
||||||
|
|
||||||
<TR><TD WIDTH=200><B>Mouse button 1</B></TD><TD>Moves the cursor to
|
<TR><TD WIDTH=200><B>Mouse button 1</B></TD><TD>Moves the cursor to
|
||||||
this point. Drag selects characters. Double click selects words.
|
this point. Drag selects characters. Double click selects words.
|
||||||
@@ -104,8 +103,8 @@ inserted.
|
|||||||
</TABLE></CENTER>
|
</TABLE></CENTER>
|
||||||
|
|
||||||
<!-- NEW PAGE -->
|
<!-- NEW PAGE -->
|
||||||
<center><table border=1>
|
<center><table border=1 summary="Character Composition Table">
|
||||||
<caption align="center">Character Composition Table</caption>
|
<caption align="top">Character Composition Table</caption>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Keys</th><th>Char</th>
|
<th>Keys</th><th>Char</th>
|
||||||
<th>Keys</th><th>Char</th>
|
<th>Keys</th><th>Char</th>
|
||||||
@@ -230,7 +229,7 @@ inserted.
|
|||||||
|
|
||||||
<H3>Methods</H3>
|
<H3>Methods</H3>
|
||||||
<CENTER>
|
<CENTER>
|
||||||
<TABLE width=90%>
|
<TABLE width=90% summary="Fl_Input methods.">
|
||||||
<TR><TD align=left valign=top>
|
<TR><TD align=left valign=top>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A href=#Fl_Input.Fl_Input>Fl_Input</A></LI>
|
<LI><A href=#Fl_Input.Fl_Input>Fl_Input</A></LI>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ type()</TT> to one of the following values: </P>
|
|||||||
</UL>
|
</UL>
|
||||||
<H3>Methods</H3>
|
<H3>Methods</H3>
|
||||||
<CENTER>
|
<CENTER>
|
||||||
<TABLE width=90%>
|
<TABLE width=90% summary="Fl_Input_ methods.">
|
||||||
<TR><TD align=left valign=top>
|
<TR><TD align=left valign=top>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A href=#Fl_Input_.Fl_Input_>Fl_Input_</A></LI>
|
<LI><A href=#Fl_Input_.Fl_Input_>Fl_Input_</A></LI>
|
||||||
|
|||||||
@@ -20,12 +20,12 @@
|
|||||||
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>
|
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"></P>
|
<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 "on" state by
|
<P>The <TT>Fl_Light_Button</TT> subclass display the "on" state by
|
||||||
turning on a light, rather than drawing pushed in. The shape of the
|
turning on a light, rather than drawing pushed in. The shape of the
|
||||||
"light" is initially set to FL_DOWN_BOX. The color of the light when
|
"light" is initially set to FL_DOWN_BOX. The color of the light when
|
||||||
on is controlled with <TT>selection_color()<TT>, which defaults to
|
on is controlled with <TT>selection_color()</TT>, which defaults to
|
||||||
FL_YELLOW. </TT></TT></P>
|
FL_YELLOW.</P>
|
||||||
<H3>Methods</H3>
|
<H3>Methods</H3>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A href=#Fl_Light_Button.Fl_Light_Button>Fl_Light_Button</A></LI>
|
<LI><A href=#Fl_Light_Button.Fl_Light_Button>Fl_Light_Button</A></LI>
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ be "private": a dynamically allocated array managed by the Fl_Menu_.
|
|||||||
|
|
||||||
<H3>Methods</H3>
|
<H3>Methods</H3>
|
||||||
<CENTER>
|
<CENTER>
|
||||||
<TABLE width=90%>
|
<TABLE width=90% summary="Fl_Menu_ methods.">
|
||||||
<TR><TD align=left valign=top>
|
<TR><TD align=left valign=top>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A href=#Fl_Menu_.Fl_Menu_>Fl_Menu_</A></LI>
|
<LI><A href=#Fl_Menu_.Fl_Menu_>Fl_Menu_</A></LI>
|
||||||
@@ -131,7 +131,7 @@ that the new entry was placed at.</P>
|
|||||||
|
|
||||||
<P>The return value is the index into the array that the entry was put. </P>
|
<P>The return value is the index into the array that the entry was put. </P>
|
||||||
|
|
||||||
<h4>int Fl_Menu_::add(const char *)</A></H4>
|
<h4>int Fl_Menu_::add(const char *)</H4>
|
||||||
|
|
||||||
<P>The passed string is split at any '|' characters and then <TT>
|
<P>The passed string is split at any '|' characters and then <TT>
|
||||||
add(s,0,0,0,0)</TT> is done with each section. This is often useful
|
add(s,0,0,0,0)</TT> is done with each section. This is often useful
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ single <A href=Fl_Menu_Item.html#Fl_Menu_Item><TT>Fl_Menu_Item</TT></A>
|
|||||||
top level menu defines the items in the menubar, while the submenus
|
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
|
define the pull-down menus. Sub-sub menus and lower pop up to the right
|
||||||
of the submenus. </P>
|
of the submenus. </P>
|
||||||
<P ALIGN=CENTER><IMG src=menubar.gif></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
|
<P>If there is an item in the top menu that is not a title of a
|
||||||
submenu, then it acts like a "button" in the menubar. Clicking on it
|
submenu, then it acts like a "button" in the menubar. Clicking on it
|
||||||
will pick it. </P>
|
will pick it. </P>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
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>
|
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></P>
|
<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>
|
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>
|
may also control a pop-up menu. This is done by setting the <TT>type()</TT>
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ Fl_Menu_Item popup[] = {
|
|||||||
{0}};
|
{0}};
|
||||||
</PRE></UL>
|
</PRE></UL>
|
||||||
produces:
|
produces:
|
||||||
<P ALIGN=CENTER><IMG src="menu.gif"></P>
|
<P ALIGN=CENTER><IMG src="menu.gif" ALT="Fl_Menu_Item widgets."></P>
|
||||||
|
|
||||||
A submenu title is identified by the bit <TT>FL_SUBMENU</TT> in the <TT>
|
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>.
|
flags</TT> field, and ends with a <TT>label()</TT> that is <TT>NULL</TT>.
|
||||||
@@ -82,7 +82,7 @@ not access them directly to avoid compatibility problems with future
|
|||||||
releases of FLTK. </P>
|
releases of FLTK. </P>
|
||||||
<H3>Methods</H3>
|
<H3>Methods</H3>
|
||||||
<CENTER>
|
<CENTER>
|
||||||
<TABLE width=90%>
|
<TABLE width=90% summary="Fl_Menu_Item methods.">
|
||||||
<TR><TD align=left valign=top>
|
<TR><TD align=left valign=top>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A href=#Fl_Menu_Item.label>label</A></LI>
|
<LI><A href=#Fl_Menu_Item.label>label</A></LI>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
which is useful for program-generated values. The user may select
|
which is useful for program-generated values. The user may select
|
||||||
portions of the text using the mouse and paste the contents into other
|
portions of the text using the mouse and paste the contents into other
|
||||||
fields or programs.
|
fields or programs.
|
||||||
<CENTER><IMG src=./text.gif></CENTER>
|
<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>
|
<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>
|
text. </P>
|
||||||
|
|||||||
@@ -41,14 +41,14 @@ position, size, and label (title) string.
|
|||||||
<H4><A name=Fl_Overlay_Window.~Fl_Overlay_Window>virtual
|
<H4><A name=Fl_Overlay_Window.~Fl_Overlay_Window>virtual
|
||||||
Fl_Overlay_Window::~Fl_Overlay_Window()</A></H4>
|
Fl_Overlay_Window::~Fl_Overlay_Window()</A></H4>
|
||||||
Destroys the window and all child widgets.
|
Destroys the window and all child widgets.
|
||||||
<H4><A name=Fl_Overlay_Window.>virtual void
|
<H4><A name=Fl_Overlay_Window.draw_overlay>virtual void
|
||||||
Fl_Overlay_Window::draw_overlay() = 0</A></H4>
|
Fl_Overlay_Window::draw_overlay() = 0</A></H4>
|
||||||
You must subclass <TT>Fl_Overlay_Window</TT> and provide this method.
|
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.
|
It is just like a <TT>draw()</TT> method, except it draws the overlay.
|
||||||
The overlay will have already been "cleared" when this is called. You
|
The overlay will have already been "cleared" when this is called. You
|
||||||
can use any of the routines described in <A href=drawing.html#Drawing>
|
can use any of the routines described in <A href=drawing.html#Drawing>
|
||||||
<FL/fl_draw.H></A>.
|
<FL/fl_draw.H></A>.
|
||||||
<H4><A name=Fl_Overlay_Window.>void Fl_Overlay_Window::redraw_overlay()</A>
|
<H4><A name=Fl_Overlay_Window.redraw_overlay>void Fl_Overlay_Window::redraw_overlay()</A>
|
||||||
</H4>
|
</H4>
|
||||||
Call this to indicate that the overlay data has changed and needs to
|
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
|
be redrawn. The overlay will be clear until the first time this is
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ widgets. </P>
|
|||||||
<TT>Fl_Scroll</TT></A>. </P>
|
<TT>Fl_Scroll</TT></A>. </P>
|
||||||
<H3>Methods</H3>
|
<H3>Methods</H3>
|
||||||
<CENTER>
|
<CENTER>
|
||||||
<TABLE width=90%>
|
<TABLE width=90% summary="Fl_Pack methods.">
|
||||||
<TR><TD align=left valign=top>
|
<TR><TD align=left valign=top>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A href=#Fl_Pack.Fl_Pack>Fl_Pack</A></LI>
|
<LI><A href=#Fl_Pack.Fl_Pack>Fl_Pack</A></LI>
|
||||||
|
|||||||
@@ -21,10 +21,10 @@
|
|||||||
It would be useful if this could be put atop another widget so that the
|
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 are on top, but this is not implemented. The color of the
|
||||||
crosshairs is <TT>selection_color()</TT>.
|
crosshairs is <TT>selection_color()</TT>.
|
||||||
<P ALIGN=CENTER><IMG src=positioner.gif></P>
|
<P ALIGN=CENTER><IMG src="positioner.gif" ALT="Fl_Positioner widget."></P>
|
||||||
<H3>Methods</H3>
|
<H3>Methods</H3>
|
||||||
<CENTER>
|
<CENTER>
|
||||||
<TABLE width=90%>
|
<TABLE width=90% summary="Fl_Positioner methods.">
|
||||||
<TR><TD align=left valign=top>
|
<TR><TD align=left valign=top>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A href=#Fl_Positioner.Fl_Positioner>Fl_Positioner</A></LI>
|
<LI><A href=#Fl_Positioner.Fl_Positioner>Fl_Positioner</A></LI>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
The <TT>Fl_Return_Button</TT> is a subclass of <TT>Fl_Button</TT> that
|
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
|
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.
|
Enter key. A carriage-return symbol is drawn next to the button label.
|
||||||
<P ALIGN=CENTER><IMG SRC="Fl_Return_Button.gif"></P>
|
<P ALIGN=CENTER><IMG SRC="Fl_Return_Button.gif" ALT="Fl_Return_Button widget."></P>
|
||||||
<H3>Methods</H3>
|
<H3>Methods</H3>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A href=#Fl_Return_Button.Fl_Return_Button>Fl_Return_Button</A></LI>
|
<LI><A href=#Fl_Return_Button.Fl_Return_Button>Fl_Return_Button</A></LI>
|
||||||
|
|||||||
@@ -20,12 +20,12 @@
|
|||||||
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>
|
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"></P>
|
<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 "on" state by
|
<P>The <TT>Fl_Round_Button</TT> subclass display the "on" state by
|
||||||
turning on a light, rather than drawing pushed in. The shape of the
|
turning on a light, rather than drawing pushed in. The shape of the
|
||||||
"light" is initially set to FL_ROUND_DOWN_BOX. The color of the light
|
"light" is initially set to FL_ROUND_DOWN_BOX. The color of the light
|
||||||
when on is controlled with <TT>selection_color()<TT>, which defaults to
|
when on is controlled with <TT>selection_color()</TT>, which defaults to
|
||||||
FL_RED. </TT></TT></P>
|
FL_RED.</P>
|
||||||
<H3>Methods</H3>
|
<H3>Methods</H3>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A href=#Fl_Round_Button.Fl_Round_Button>Fl_Round_Button</A></LI>
|
<LI><A href=#Fl_Round_Button.Fl_Round_Button>Fl_Round_Button</A></LI>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
larger than your window. If the child widgets are larger than the size
|
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
|
of this object then scrollbars will appear so that you can scroll over
|
||||||
to them:
|
to them:
|
||||||
<P ALIGN=CENTER><IMG src=Fl_Scroll.gif></P>
|
<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
|
<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
|
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.
|
one of the <TT>_FRAME</TT> types. This will result in the best output.
|
||||||
|
|||||||
@@ -20,11 +20,11 @@
|
|||||||
The <TT>Fl_Tabs</TT> widget is the "file card tabs" interface that
|
The <TT>Fl_Tabs</TT> widget is the "file card tabs" interface that
|
||||||
allows you to put lots and lots of buttons and switches in a panel, as
|
allows you to put lots and lots of buttons and switches in a panel, as
|
||||||
popularized by many toolkits.
|
popularized by many toolkits.
|
||||||
<P ALIGN=CENTER><IMG src=tabs.gif></P>
|
<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>
|
<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>
|
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>
|
hide()</TT> on them). Usually the children are <A href=Fl_Group.html#Fl_Group>
|
||||||
<TT>Fl_Group<TT></TT></A> widgets containing several widgets
|
<TT>Fl_Group</TT></A> widgets containing several widgets
|
||||||
themselves. </P>
|
themselves. </P>
|
||||||
<P>Each child makes a card, and it's <TT>label()</TT> is printed on the
|
<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
|
card tab (including the label font and style). The color of that child
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<H3>Description</H3>
|
<H3>Description</H3>
|
||||||
The <TT>Fl_Tile</TT> class lets you resize the children by dragging
|
The <TT>Fl_Tile</TT> class lets you resize the children by dragging
|
||||||
the border between them:
|
the border between them:
|
||||||
<P ALIGN=CENTER><IMG src=Fl_Tile.gif border=1></P>
|
<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.
|
<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
|
To prevent this you can use the <TT>resizable()</TT> to limit where
|
||||||
corners can be dragged to. </P>
|
corners can be dragged to. </P>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
and provides a consistent interface to set the value, range, and step,
|
and provides a consistent interface to set the value, range, and step,
|
||||||
and insures that callbacks are done the same for every object.
|
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>There are probably more of these classes in FLTK than any others: </P>
|
||||||
<P ALIGN=CENTER><IMG src=valuators.gif></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.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
|
type()</TT></A> of the widget to the symbolic value labeling the
|
||||||
@@ -33,7 +33,7 @@ type(0)</TT>. For consistency the symbol <TT>FL_VERTICAL</TT> is
|
|||||||
defined as zero.</P>
|
defined as zero.</P>
|
||||||
<H3>Methods</H3>
|
<H3>Methods</H3>
|
||||||
<CENTER>
|
<CENTER>
|
||||||
<TABLE width=90%>
|
<TABLE width=90% summary="Fl_Valuator methods.">
|
||||||
<TR><TD align=left valign=top>
|
<TR><TD align=left valign=top>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A href=#Fl_Valuator.Fl_Valuator>Fl_Valuator</A></LI>
|
<LI><A href=#Fl_Valuator.Fl_Valuator>Fl_Valuator</A></LI>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<H3>Description</H3>
|
<H3>Description</H3>
|
||||||
The <TT>Fl_Value_Slider</TT> widget is a <TT>Fl_Slider</TT> widget
|
The <TT>Fl_Value_Slider</TT> widget is a <TT>Fl_Slider</TT> widget
|
||||||
with a box displaying the current value.
|
with a box displaying the current value.
|
||||||
<P ALIGN=CENTER><IMG src=value_slider.gif></P>
|
<P ALIGN=CENTER><IMG src="value_slider.gif" ALT="Fl_Value_Slider widget."></P>
|
||||||
<H3>Methods</H3>
|
<H3>Methods</H3>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A href=#Fl_Value_Slider.Fl_Value_Slider>Fl_Value_Slider</A></LI>
|
<LI><A href=#Fl_Value_Slider.Fl_Value_Slider>Fl_Value_Slider</A></LI>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ even if they change the widget's appearance. It is up to the user code
|
|||||||
to call <TT>redraw()</TT> after these. </P>
|
to call <TT>redraw()</TT> after these. </P>
|
||||||
<H3>Methods</H3>
|
<H3>Methods</H3>
|
||||||
<CENTER>
|
<CENTER>
|
||||||
<TABLE width=90%>
|
<TABLE width=90% summary="Fl_Widget methods.">
|
||||||
<TR><TD align=left valign=top>
|
<TR><TD align=left valign=top>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A href=#Fl_Widget.Fl_Widget>Fl_Widget</A></LI>
|
<LI><A href=#Fl_Widget.Fl_Widget>Fl_Widget</A></LI>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ Fl::modal()</TT></A> is zero or equal to the window. <TT>Fl_Window</TT>
|
|||||||
exit(0)</TT> if this is the last top-level window. </P>
|
exit(0)</TT> if this is the last top-level window. </P>
|
||||||
<H3>Methods</H3>
|
<H3>Methods</H3>
|
||||||
<CENTER>
|
<CENTER>
|
||||||
<TABLE width=90%>
|
<TABLE width=90% summary="Fl_Window methods.">
|
||||||
<TR><TD align=left valign=top>
|
<TR><TD align=left valign=top>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A href=#Fl_Window.Fl_Window>Fl_Window</A></LI>
|
<LI><A href=#Fl_Window.Fl_Window>Fl_Window</A></LI>
|
||||||
@@ -80,7 +80,7 @@ exit(0)</TT> if this is the last top-level window. </P>
|
|||||||
</TD></TR>
|
</TD></TR>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
</CENTER>
|
</CENTER>
|
||||||
<H4><A name=Fl_Window.Fl_Window>Fl_Window::Fl_Window(int w, int h, const char *title = 0)</H4>
|
<H4><A name=Fl_Window.Fl_Window>Fl_Window::Fl_Window(int w, int h, const char *title = 0)</A></H4>
|
||||||
|
|
||||||
The first form of the constructor should be used for a "top-level" window
|
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
|
(that is, one that is not inside another window). It correctly sets
|
||||||
@@ -95,7 +95,7 @@ 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
|
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>
|
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>
|
<h4>Fl_Window::Fl_Window(int x, int y, int w, int h, const char *title = 0)</H4>
|
||||||
|
|
||||||
<P>The second form of the constructor is for creating child windows. It
|
<P>The second form of the constructor is for creating child windows. It
|
||||||
leaves <tt>visible()</tt> set to true.
|
leaves <tt>visible()</tt> set to true.
|
||||||
@@ -258,7 +258,7 @@ debug and maintain!</B>
|
|||||||
Fl_Gl_Window</TT> classes. </P>
|
Fl_Gl_Window</TT> classes. </P>
|
||||||
<H4><A name=Fl_Window.current>static Fl_Window* Fl_Window::current()</A></H4>
|
<H4><A name=Fl_Window.current>static Fl_Window* Fl_Window::current()</A></H4>
|
||||||
Returns the last window that was made current.
|
Returns the last window that was made current.
|
||||||
<H4><A name=Fl_Window.cursor>void Fl_Window::cursor(Fl_Cursor, Fl_Color = FL_WHITE, Fl_Color = FL_BLACK)</H4>
|
<H4><A name=Fl_Window.cursor>void Fl_Window::cursor(Fl_Cursor, Fl_Color = FL_WHITE, Fl_Color = FL_BLACK)</A></H4>
|
||||||
Change the cursor for this window. This always calls the system, if
|
Change the cursor for this window. This always calls the system, if
|
||||||
you are changing the cursor a lot you may want to keep track of how
|
you are changing the cursor a lot you may want to keep track of how
|
||||||
you set it in a static varaible and call this only if the new cursor
|
you set it in a static varaible and call this only if the new cursor
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ return <A href=functions.html#run>Fl::run</A>();
|
|||||||
</UL>
|
</UL>
|
||||||
The resulting program will display the window below. You can quit the
|
The resulting program will display the window below. You can quit the
|
||||||
program by closing the window or pressing the ESCape key.
|
program by closing the window or pressing the ESCape key.
|
||||||
<P ALIGN=CENTER><IMG src=./hello.C.gif></P>
|
<P ALIGN=CENTER><IMG src="hello.C.gif" alt="Hello, World! Window"></P>
|
||||||
<H3>Creating the Widgets</H3>
|
<H3>Creating the Widgets</H3>
|
||||||
The widgets are created using the C++ <TT>new</TT> operator. For
|
The widgets are created using the C++ <TT>new</TT> operator. For
|
||||||
most widgets the arguments to the constructor are:
|
most widgets the arguments to the constructor are:
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ and covers how to query and set the standard attributes.
|
|||||||
Enter key. </LI>
|
Enter key. </LI>
|
||||||
<LI><A HREF="Fl_Round_Button.html"><TT>Fl_Round_Button</TT></A> - A button with a check circle. </LI>
|
<LI><A HREF="Fl_Round_Button.html"><TT>Fl_Round_Button</TT></A> - A button with a check circle. </LI>
|
||||||
</UL>
|
</UL>
|
||||||
<P ALIGN=CENTER><IMG SRC="buttons.gif">
|
<P ALIGN=CENTER><IMG SRC="buttons.gif" ALT="FLTK Buttons">
|
||||||
<P>For all of these buttons you just need to include the corresponding <TT>
|
<P>For all of these buttons you just need to include the corresponding <TT>
|
||||||
<FL/Fl_xyz_Button.H></TT> header file. The constructor takes the
|
<FL/Fl_xyz_Button.H></TT> header file. The constructor takes the
|
||||||
bounding box of the button and optionally a label string:
|
bounding box of the button and optionally a label string:
|
||||||
@@ -75,7 +75,7 @@ strings. FLTK provides the following valuators:
|
|||||||
<LI><A HREF="Fl_Slider.html"><TT>Fl_Slider</TT></A> - A scrollbar with a knob. </LI>
|
<LI><A HREF="Fl_Slider.html"><TT>Fl_Slider</TT></A> - A scrollbar with a knob. </LI>
|
||||||
<LI><A HREF="Fl_Value_Slider.html"><TT>Fl_Value_Slider</TT></A> - A slider that shows the current value. </LI>
|
<LI><A HREF="Fl_Value_Slider.html"><TT>Fl_Value_Slider</TT></A> - A slider that shows the current value. </LI>
|
||||||
</UL>
|
</UL>
|
||||||
<P ALIGN=CENTER><IMG SRC="valuators.gif"></P>
|
<P ALIGN=CENTER><IMG SRC="valuators.gif" ALT="FLTK Valuators"></P>
|
||||||
The <A href=Fl_Valuator.html#Fl_Valuator.value><TT>value()</TT></A>
|
The <A href=Fl_Valuator.html#Fl_Valuator.value><TT>value()</TT></A>
|
||||||
method gets and sets the current value of the widget. The <A href=Fl_Valuator.html#Fl_Valuator.minimum>
|
method gets and sets the current value of the widget. The <A href=Fl_Valuator.html#Fl_Valuator.minimum>
|
||||||
<TT>minimum()</TT></A> and <A href=Fl_Valuator.html#Fl_Valuator.maximum><TT>
|
<TT>minimum()</TT></A> and <A href=Fl_Valuator.html#Fl_Valuator.maximum><TT>
|
||||||
@@ -143,7 +143,7 @@ button->labelcolor(FL_WHITE);
|
|||||||
<P>The type <TT>Fl_Boxtype</TT> stored and returned in <A href=Fl_Widget.html#Fl_Widget.box>
|
<P>The type <TT>Fl_Boxtype</TT> stored and returned in <A href=Fl_Widget.html#Fl_Widget.box>
|
||||||
<TT>Fl_Widget::box()</TT></A> is an enumeration defined in <A href=enumerations.html#enumerations>
|
<TT>Fl_Widget::box()</TT></A> is an enumeration defined in <A href=enumerations.html#enumerations>
|
||||||
<TT><Enumerations.H></TT></A>:
|
<TT><Enumerations.H></TT></A>:
|
||||||
<P ALIGN=CENTER><IMG src="boxtypes.gif"></P>
|
<P ALIGN=CENTER><IMG src="boxtypes.gif" ALT="FLTK Box Types"></P>
|
||||||
<P><TT>FL_NO_BOX</TT> means nothing is drawn at all, so whatever is
|
<P><TT>FL_NO_BOX</TT> means nothing is drawn at all, so whatever is
|
||||||
already on the screen remains. The <TT>FL_..._FRAME</TT> types only
|
already on the screen remains. The <TT>FL_..._FRAME</TT> types only
|
||||||
draw their edges, leaving the interior unchanged. In the above diagram
|
draw their edges, leaving the interior unchanged. In the above diagram
|
||||||
@@ -280,14 +280,14 @@ type.
|
|||||||
<P>The <TT>Fl::set_labeltype</TT> method can also be used to overload
|
<P>The <TT>Fl::set_labeltype</TT> method can also be used to overload
|
||||||
an existing label type such as <TT>FL_NORMAL_LABEL</TT>. </P>
|
an existing label type such as <TT>FL_NORMAL_LABEL</TT>. </P>
|
||||||
<H4><A name=symbols>Symbol Labels</A></H4>
|
<H4><A name=symbols>Symbol Labels</A></H4>
|
||||||
The <TT>FL_SYMBOL_LABEL</TT> label type uses the <TT>label()</TT>
|
<P>The <TT>FL_SYMBOL_LABEL</TT> label type uses the <TT>label()</TT>
|
||||||
string to look up a small drawing procedure in a hash table. For
|
string to look up a small drawing procedure in a hash table. For
|
||||||
historical reasons the string always starts with '@'; if it starts with
|
historical reasons the string always starts with '@'; if it starts with
|
||||||
something else (or the symbol is not found) the label is drawn
|
something else (or the symbol is not found) the label is drawn
|
||||||
normally:
|
normally:
|
||||||
<CENTER><IMG src=./symbols.gif></CENTER>
|
<CENTER><IMG src="symbols.gif" ALT="FLTK Symbols"></CENTER>
|
||||||
The @ sign may be followed by the following optional "formatting"
|
<P>The @ sign may be followed by the following optional "formatting"
|
||||||
characters, in this order: </P>
|
characters, in this order:
|
||||||
<UL>
|
<UL>
|
||||||
<LI>'#' forces square scaling, rather than distortion to the widget's
|
<LI>'#' forces square scaling, rather than distortion to the widget's
|
||||||
shape. </LI>
|
shape. </LI>
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ Restore the previous clip region. <I>You must call <TT>fl_pop_clip()</TT>
|
|||||||
once for every time you call <TT>fl_clip()</TT>. If you return to
|
once for every time you call <TT>fl_clip()</TT>. If you return to
|
||||||
FLTK with the clip stack not empty unpredictable results occur.</I>
|
FLTK with the clip stack not empty unpredictable results occur.</I>
|
||||||
<H4>int fl_not_clipped(int x, int y, int w, int h)</H4>
|
<H4>int fl_not_clipped(int x, int y, int w, int h)</H4>
|
||||||
Returns true if any of the rectangle intersects the current clip
|
Returns true if any of the rectangle intersects the current clip
|
||||||
region. If this returns false you don't have to draw the object. <I>
|
region. If this returns false you don't have to draw the object. <I>
|
||||||
Under X this returns 2 if the rectangle is partially clipped, and 1 if
|
Under X this returns 2 if the rectangle is partially clipped, and 1 if
|
||||||
it is entirely inside the clip region</I>.
|
it is entirely inside the clip region</I>.
|
||||||
@@ -230,7 +230,7 @@ holes should be drawn in the opposite direction of the outside.
|
|||||||
<P><TT>fl_gap()</TT> should only be called between <TT>
|
<P><TT>fl_gap()</TT> should only be called between <TT>
|
||||||
fl_begin_complex_polygon()</TT> and <TT>fl_end_complex_polygon()</TT>.
|
fl_begin_complex_polygon()</TT> and <TT>fl_end_complex_polygon()</TT>.
|
||||||
To outline the polygon, use <TT>fl_begin_loop()</TT> and replace each <TT>
|
To outline the polygon, use <TT>fl_begin_loop()</TT> and replace each <TT>
|
||||||
fl_gap()</TT> with <TT>fl_end_loop();fl_begin_loop()<TT>. </TT></TT></P>
|
fl_gap()</TT> with <TT>fl_end_loop();fl_begin_loop()</TT>.</P>
|
||||||
<H4>void fl_vertex(float x, float y)</H4>
|
<H4>void fl_vertex(float x, float y)</H4>
|
||||||
Add a single vertex to the current path.
|
Add a single vertex to the current path.
|
||||||
<H4>void fl_curve(float x, float y, float x1, float y1, float x2, float
|
<H4>void fl_curve(float x, float y, float x1, float y1, float x2, float
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ and "replace all", "replace next", and "cancel" bu
|
|||||||
are just <TT>Fl_Input</TT> widgets, the "replace all" and "cancel"
|
are just <TT>Fl_Input</TT> widgets, the "replace all" and "cancel"
|
||||||
buttons are <TT>Fl_Button</TT> widgets, and the "replace next " button
|
buttons are <TT>Fl_Button</TT> widgets, and the "replace next " button
|
||||||
is a <TT>Fl_Return_Button</TT> widget:
|
is a <TT>Fl_Return_Button</TT> widget:
|
||||||
<P ALIGN=CENTER><IMG src=./editor-replace.gif></P>
|
<P ALIGN=CENTER><IMG src="editor-replace.gif" ALT="The search and replace dialog."></P>
|
||||||
<UL>
|
<UL>
|
||||||
<PRE>
|
<PRE>
|
||||||
Fl_Window *replace_dlg = new Fl_Window(300, 105, "Replace");
|
Fl_Window *replace_dlg = new Fl_Window(300, 105, "Replace");
|
||||||
@@ -553,5 +553,5 @@ library. Also, the <TT>CC</TT> command may also be called <TT>gcc</TT>
|
|||||||
<P>Congratulations, you've just built your own text editor! </P>
|
<P>Congratulations, you've just built your own text editor! </P>
|
||||||
<H2>The Final Product</H2>
|
<H2>The Final Product</H2>
|
||||||
The final editor window should look like the image on the next page.
|
The final editor window should look like the image on the next page.
|
||||||
<P ALIGN=CENTER><IMG src=./editor.gif></P>
|
<P ALIGN=CENTER><IMG src="editor.gif" ALT="The completed editor window."></P>
|
||||||
</BODY></HTML>
|
</BODY></HTML>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ understand) occurred (0).</LI>
|
|||||||
<LI><TT>FL_SELECTIONCLEAR</TT> - The widget should clear any selections
|
<LI><TT>FL_SELECTIONCLEAR</TT> - The widget should clear any selections
|
||||||
made for the clipboard. </LI>
|
made for the clipboard. </LI>
|
||||||
</UL>
|
</UL>
|
||||||
<H2><a name=when>Callback "When" Conditions</H2>
|
<H2><a name=when>Callback "When" Conditions</A></H2>
|
||||||
The following constants determine when a callback is performed:
|
The following constants determine when a callback is performed:
|
||||||
<UL>
|
<UL>
|
||||||
<LI><TT>FL_WHEN_NEVER</TT> - Never call the callback (0). </LI>
|
<LI><TT>FL_WHEN_NEVER</TT> - Never call the callback (0). </LI>
|
||||||
@@ -125,7 +125,7 @@ FL_KEYBOARD</TT> and <TT>FL_SHORTCUT</TT> events:
|
|||||||
<LI><TT>FL_BUTTON2</TT> - Mouse button 2 is pushed. </LI>
|
<LI><TT>FL_BUTTON2</TT> - Mouse button 2 is pushed. </LI>
|
||||||
<LI><TT>FL_BUTTON3</TT> - Mouse button 3 is pushed. </LI>
|
<LI><TT>FL_BUTTON3</TT> - Mouse button 3 is pushed. </LI>
|
||||||
</UL>
|
</UL>
|
||||||
<H2><a name=align>Alignment Values</H2>
|
<H2><a name=align>Alignment Values</A></H2>
|
||||||
The following constants define bits that can be used with <A href=Fl_Widget.html#Fl_Widget.align>
|
The following constants define bits that can be used with <A href=Fl_Widget.html#Fl_Widget.align>
|
||||||
<TT>Fl_Widget::align()</TT></A> to control the positioning of the
|
<TT>Fl_Widget::align()</TT></A> to control the positioning of the
|
||||||
label:
|
label:
|
||||||
@@ -149,7 +149,7 @@ label:
|
|||||||
label inside the widget. </LI>
|
label inside the widget. </LI>
|
||||||
|
|
||||||
</UL>
|
</UL>
|
||||||
<H2><a name=fonts>Fonts</H2>
|
<H2><a name=fonts>Fonts</A></H2>
|
||||||
The following constants define the standard FLTK fonts:
|
The following constants define the standard FLTK fonts:
|
||||||
<ul>
|
<ul>
|
||||||
<LI><TT>FL_HELVETICA</TT> - Helvetica (or Arial) normal (0). </LI>
|
<LI><TT>FL_HELVETICA</TT> - Helvetica (or Arial) normal (0). </LI>
|
||||||
@@ -171,7 +171,7 @@ bold-oblique. </LI>
|
|||||||
<LI><TT>FL_ZAPF_DINGBATS</TT> - Zapf-dingbats font.
|
<LI><TT>FL_ZAPF_DINGBATS</TT> - Zapf-dingbats font.
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<H2><a name=colors>Colors</H2>
|
<H2><a name=colors>Colors</A></H2>
|
||||||
The following color constants can be used to access the colors in the
|
The following color constants can be used to access the colors in the
|
||||||
FLTK standard color palette:
|
FLTK standard color palette:
|
||||||
<UL>
|
<UL>
|
||||||
@@ -207,9 +207,9 @@ 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,
|
<tt>fl_color_cube(R*FL_NUM_RED/256, G*FL_NUM_GREEN/256,
|
||||||
B*FL_NUM_BLUE/256);</tt>
|
B*FL_NUM_BLUE/256);</tt>
|
||||||
|
|
||||||
<H2><a name=cursor>Cursors</H2>
|
<H2><a name=cursor>Cursors</A></H2>
|
||||||
|
|
||||||
The following constants define the mouse cursors that are available in
|
<P>The following constants define the mouse cursors that are available in
|
||||||
FLTK. The double-headed arrows are bitmaps
|
FLTK. The double-headed arrows are bitmaps
|
||||||
provided by FLTK on X, the others are provided by system-defined
|
provided by FLTK on X, the others are provided by system-defined
|
||||||
cursors.</P>
|
cursors.</P>
|
||||||
@@ -237,7 +237,7 @@ cursors.</P>
|
|||||||
<LI><TT>FL_EXCEPT</TT> - Call the callback if an exception occurs on
|
<LI><TT>FL_EXCEPT</TT> - Call the callback if an exception occurs on
|
||||||
the file. </LI>
|
the file. </LI>
|
||||||
</UL>
|
</UL>
|
||||||
<H2><a name=damage>Damage Masks</H2>
|
<H2><a name=damage>Damage Masks</A></H2>
|
||||||
The following damage mask bits are used by the standard FLTK widgets:
|
The following damage mask bits are used by the standard FLTK widgets:
|
||||||
<UL>
|
<UL>
|
||||||
<LI><TT>FL_DAMAGE_CHILD</TT> - A child needs to be redrawn. </LI>
|
<LI><TT>FL_DAMAGE_CHILD</TT> - A child needs to be redrawn. </LI>
|
||||||
@@ -247,5 +247,4 @@ cursors.</P>
|
|||||||
<LI><TT>FL_DAMAGE_OVERLAY</TT> - The overlay planes need to be redrawn. </LI>
|
<LI><TT>FL_DAMAGE_OVERLAY</TT> - The overlay planes need to be redrawn. </LI>
|
||||||
<LI><TT>FL_DAMAGE_ALL</TT> - Everything needs to be redrawn. </LI>
|
<LI><TT>FL_DAMAGE_ALL</TT> - Everything needs to be redrawn. </LI>
|
||||||
</UL>
|
</UL>
|
||||||
</LI>
|
|
||||||
</BODY></HTML>
|
</BODY></HTML>
|
||||||
|
|||||||
+12
-12
@@ -29,7 +29,7 @@ These <TT>.cxx</TT> files must <TT>#include</TT> the <TT>.h</TT> file or they ca
|
|||||||
#include</TT> the <TT>.cxx</TT> file so it still appears to be a single source
|
#include</TT> the <TT>.cxx</TT> file so it still appears to be a single source
|
||||||
file.
|
file.
|
||||||
|
|
||||||
<P ALIGN=CENTER><IMG src=fluid-org.gif>
|
<P ALIGN=CENTER><IMG src="fluid-org.gif" ALT="FLUID organization.">
|
||||||
|
|
||||||
<P>Normally the FLUID file defines one or more functions or classes which
|
<P>Normally the FLUID file defines one or more functions or classes which
|
||||||
output C++ code. Each function defines a one or more FLTK
|
output C++ code. Each function defines a one or more FLTK
|
||||||
@@ -113,7 +113,7 @@ simple tasks with it. This tutorial will show you how to generate a
|
|||||||
complete user interface class with FLUID that is used for the CubeView
|
complete user interface class with FLUID that is used for the CubeView
|
||||||
program provided with FLTK.
|
program provided with FLTK.
|
||||||
|
|
||||||
<P ALIGN=CENTER><IMG SRC="cubeview.gif"></P>
|
<P ALIGN=CENTER><IMG SRC="cubeview.gif" ALT="CubeView demo."></P>
|
||||||
|
|
||||||
<P>The window is of class CubeViewUI, and is completely generated by FLUID, including
|
<P>The window is of class CubeViewUI, and is completely generated by FLUID, including
|
||||||
class member functions. The central display of the cube is a separate
|
class member functions. The central display of the cube is a separate
|
||||||
@@ -323,14 +323,14 @@ void CubeView::draw() {
|
|||||||
<h3>The CubeViewUI Class</h3>
|
<h3>The CubeViewUI Class</h3>
|
||||||
We will completely construct a window to display and control the
|
We will completely construct a window to display and control the
|
||||||
CubeView defined in the previous section using FLUID.
|
CubeView defined in the previous section using FLUID.
|
||||||
<h4><a name="def">Defining the CubeViewUI Class</a></h4>
|
<h4><a name="defui">Defining the CubeViewUI Class</a></h4>
|
||||||
Once you have started FLUID, the first step in defining a class is to
|
Once you have started FLUID, the first step in defining a class is to
|
||||||
create a new class within FLUID using the <b>New->Code->Class</b>
|
create a new class within FLUID using the <b>New->Code->Class</b>
|
||||||
menu item. Name the class "CubeViewUI" and leave the
|
menu item. Name the class "CubeViewUI" and leave the
|
||||||
subclass blank. We do not need any inheritance for this
|
subclass blank. We do not need any inheritance for this
|
||||||
window. You should see the new class declaration in the FLUID
|
window. You should see the new class declaration in the FLUID
|
||||||
browser window.
|
browser window.
|
||||||
<p align=center><img src="fluid1.gif"></p>
|
<p align=center><img src="fluid1.gif" ALT="FLUID file for CubeView."></p>
|
||||||
<h4><a name="addcon">Adding the Class Constructor</a></h4>
|
<h4><a name="addcon">Adding the Class Constructor</a></h4>
|
||||||
Click on the CubeViewUI class in the FLUID window and add a new method
|
Click on the CubeViewUI class in the FLUID window and add a new method
|
||||||
by selecting <b>New->Code->Function/Method.</b> The name of the
|
by selecting <b>New->Code->Function/Method.</b> The name of the
|
||||||
@@ -352,7 +352,7 @@ None of these additions need be public. And they shouldn't be
|
|||||||
unless you plan to expose them as part of the interface for
|
unless you plan to expose them as part of the interface for
|
||||||
CubeViewUI.
|
CubeViewUI.
|
||||||
<p>When you are finished you should have something like this:
|
<p>When you are finished you should have something like this:
|
||||||
<p align=center><img src="fluid2.gif">
|
<p align=center><img src="fluid2.gif" ALT="FLUID window containing CubeView demo.">
|
||||||
<p>We will talk about the <tt>show()</tt> method that is highlighted
|
<p>We will talk about the <tt>show()</tt> method that is highlighted
|
||||||
shortly.
|
shortly.
|
||||||
<h4><a name="addcube">Adding the CubeView Widget</a></h4>
|
<h4><a name="addcube">Adding the CubeView Widget</a></h4>
|
||||||
@@ -373,7 +373,7 @@ Code:" field enter <tt>#include "CubeView.h"</tt>
|
|||||||
CubeView as a member of CubeViewUI, so any public CubeView methods are
|
CubeView as a member of CubeViewUI, so any public CubeView methods are
|
||||||
now available to CubeViewUI.
|
now available to CubeViewUI.
|
||||||
|
|
||||||
<p align=center><img src="fluid3.gif"></p>
|
<p align=center><img src="fluid3.gif" ALT="CubeView methods."></p>
|
||||||
|
|
||||||
<h4><a name="defcall">Defining the Callbacks</a></h4>
|
<h4><a name="defcall">Defining the Callbacks</a></h4>
|
||||||
Each of the widgets we defined before adding CubeView can have
|
Each of the widgets we defined before adding CubeView can have
|
||||||
@@ -401,7 +401,7 @@ appear on the screen.
|
|||||||
<tt>show()</tt>. We don't need a return value here, and since we will
|
<tt>show()</tt>. We don't need a return value here, and since we will
|
||||||
not be adding any widgets to this method FLUID will assign it a return
|
not be adding any widgets to this method FLUID will assign it a return
|
||||||
type of <tt>void</tt>.
|
type of <tt>void</tt>.
|
||||||
<p align=center><img src="fluid4.gif"></p>
|
<p align=center><img src="fluid4.gif" ALT="CubeView constructor."></p>
|
||||||
<p>Once the new method has been added, highlight its name and select
|
<p>Once the new method has been added, highlight its name and select
|
||||||
New->Code->Code. Enter the method's code in the code window.
|
New->Code->Code. Enter the method's code in the code window.
|
||||||
|
|
||||||
@@ -553,7 +553,7 @@ grid that all widgets snap to when you move and resize them, and for the
|
|||||||
"snap" which is how far a widget has to be dragged from its original position
|
"snap" which is how far a widget has to be dragged from its original position
|
||||||
to actually change.
|
to actually change.
|
||||||
|
|
||||||
<P ALIGN="CENTER"><IMG SRC="fluid_prefs.gif"></P>
|
<P ALIGN="CENTER"><IMG SRC="fluid_prefs.gif" ALT="FLUID Preferences Window"></P>
|
||||||
|
|
||||||
<P>The output filenames control the extensions or names of the files the are
|
<P>The output filenames control the extensions or names of the files the are
|
||||||
generated by FLUID. If you check the "Include .h from .cxx" button the code
|
generated by FLUID. If you check the "Include .h from .cxx" button the code
|
||||||
@@ -617,7 +617,7 @@ to "visible" attributes (such as the color, label, box) are not undone
|
|||||||
by revert or cancel. Changes to code like the callbacks are undone,
|
by revert or cancel. Changes to code like the callbacks are undone,
|
||||||
however.
|
however.
|
||||||
<!-- NEW PAGE -->
|
<!-- NEW PAGE -->
|
||||||
<TABLE cellpadding=0 cellspacing=0 width=100%>
|
<TABLE cellpadding=0 cellspacing=0 width=100% summary="columns of text">
|
||||||
<TR>
|
<TR>
|
||||||
<TD VALIGN=TOP>
|
<TD VALIGN=TOP>
|
||||||
<H3><A name=widget_attributes>Widget Attributes</A></H3>
|
<H3><A name=widget_attributes>Widget Attributes</A></H3>
|
||||||
@@ -636,7 +636,7 @@ You pick the subtype off of this menu.
|
|||||||
The boxtype to draw as a background for the widget.
|
The boxtype to draw as a background for the widget.
|
||||||
</TD>
|
</TD>
|
||||||
<TD> </TD>
|
<TD> </TD>
|
||||||
<TD VALIGN=TOP WIDTH=378><IMG src="fluid_widget.gif"></TD>
|
<TD VALIGN=TOP WIDTH=378><IMG src="fluid_widget.gif" ALT="The FLUID widget dialog."></TD>
|
||||||
</TR>
|
</TR>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
<P>Many widgets will work, and draw faster, with a "frame" instead of a
|
<P>Many widgets will work, and draw faster, with a "frame" instead of a
|
||||||
@@ -918,7 +918,7 @@ to select the appropriate language and message file.
|
|||||||
"GNU gettext" from the "Use" chooser. Two new input fields will then
|
"GNU gettext" from the "Use" chooser. Two new input fields will then
|
||||||
appear to control the include file and function/macro name to use when
|
appear to control the include file and function/macro name to use when
|
||||||
retrieving the localized label strings.
|
retrieving the localized label strings.
|
||||||
<P ALIGN="CENTER"><IMG SRC="fluid-gettext.gif"></P>
|
<P ALIGN="CENTER"><IMG SRC="fluid-gettext.gif" ALT="I18N using FLUID."></P>
|
||||||
<P>The "#include" field controls the header file to include for I18N; by
|
<P>The "#include" field controls the header file to include for I18N; by
|
||||||
default this is <TT><libintl.h></TT>, the standard I18N file for
|
default this is <TT><libintl.h></TT>, the standard I18N file for
|
||||||
GNU gettext.
|
GNU gettext.
|
||||||
@@ -934,7 +934,7 @@ need to call <TT>setlocale()</TT> to select the appropriate language.
|
|||||||
"POSIX catgets" from the "Use" chooser. Three new input fields will then
|
"POSIX catgets" from the "Use" chooser. Three new input fields will then
|
||||||
appear to control the include file, catalog file, and set number for
|
appear to control the include file, catalog file, and set number for
|
||||||
retrieving the localized label strings.
|
retrieving the localized label strings.
|
||||||
<P ALIGN="CENTER"><IMG SRC="fluid-catgets.gif"></P>
|
<P ALIGN="CENTER"><IMG SRC="fluid-catgets.gif" ALT="I18N using FLUID"></P>
|
||||||
<P>The "#include" field controls the header file to include for I18N; by
|
<P>The "#include" field controls the header file to include for I18N; by
|
||||||
default this is <TT><nl_types.h></TT>, the standard I18N file for
|
default this is <TT><nl_types.h></TT>, the standard I18N file for
|
||||||
POSIX catgets.
|
POSIX catgets.
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ all occurances of "->fdui" and edit to use "->user_data()&q
|
|||||||
<P>The prototype for the functions passed to <TT>fl_add_timeout()</TT>
|
<P>The prototype for the functions passed to <TT>fl_add_timeout()</TT>
|
||||||
and <TT>fl_set_idle_callback()</TT> callback are different. </P>
|
and <TT>fl_set_idle_callback()</TT> callback are different. </P>
|
||||||
<P><B>All the following XForms calls are missing:</B></P>
|
<P><B>All the following XForms calls are missing:</B></P>
|
||||||
<P>
|
|
||||||
<UL>
|
<UL>
|
||||||
<LI><TT>FL_REVISION</TT>, <TT>fl_library_version()</TT></LI>
|
<LI><TT>FL_REVISION</TT>, <TT>fl_library_version()</TT></LI>
|
||||||
<LI><TT>FL_RETURN_DBLCLICK</TT> (use <TT>Fl::event_clicks()</TT>) </LI>
|
<LI><TT>FL_RETURN_DBLCLICK</TT> (use <TT>Fl::event_clicks()</TT>) </LI>
|
||||||
@@ -166,7 +165,7 @@ have to rewrite things a lot. </P>
|
|||||||
<H3>You Cannot Use <device.h></H3>
|
<H3>You Cannot Use <device.h></H3>
|
||||||
If you have written your own "free" widgets you will probably get a
|
If you have written your own "free" widgets you will probably get a
|
||||||
lot of errors about "getvaluator". You should substitute:
|
lot of errors about "getvaluator". You should substitute:
|
||||||
<CENTER><TABLE border=1 WIDTH=90%>
|
<CENTER><TABLE border=1 WIDTH=90% summary="Mapping of Forms valuators to FLTK.">
|
||||||
<TR><TH align=center>Forms</TH><TH align=center>FLTK</TH></TR>
|
<TR><TH align=center>Forms</TH><TH align=center>FLTK</TH></TR>
|
||||||
<TR><TD>MOUSE_X</TD><TD>Fl::event_x_root()</TD></TR>
|
<TR><TD>MOUSE_X</TD><TD>Fl::event_x_root()</TD></TR>
|
||||||
<TR><TD>MOUSE_Y</TD><TD>Fl::event_y_root()</TD></TR>
|
<TR><TD>MOUSE_Y</TD><TD>Fl::event_y_root()</TD></TR>
|
||||||
|
|||||||
@@ -10,13 +10,13 @@ href=widgets.html#widgets> Appendix A</A>.
|
|||||||
|
|
||||||
<h3><A name="fl_color_chooser_func">int fl_color_chooser(const char
|
<h3><A name="fl_color_chooser_func">int fl_color_chooser(const char
|
||||||
*title, double &r, double &g, double &b)
|
*title, double &r, double &g, double &b)
|
||||||
<br>int fl_color_chooser(const char *title, uchar &r, uchar &g, uchar &b)</h3></A>
|
<br>int fl_color_chooser(const char *title, uchar &r, uchar &g, uchar &b)</A></h3>
|
||||||
|
|
||||||
The double version takes RGB values in the range 0.0 to 1.0. The
|
The double version takes RGB values in the range 0.0 to 1.0. The
|
||||||
uchar version takes RGB values in the range 0 to 255. The <tt>title</tt>
|
uchar version takes RGB values in the range 0 to 255. The <tt>title</tt>
|
||||||
argument specifies the label (title) for the window.
|
argument specifies the label (title) for the window.
|
||||||
|
|
||||||
<p align=center><img src="fl_color_chooser.jpg">
|
<p align=center><img src="fl_color_chooser.jpg" ALT="The fl_color_chooser dialog.">
|
||||||
|
|
||||||
<P><tt>fl_color_chooser()</tt> pops up a window to let the user pick an
|
<P><tt>fl_color_chooser()</tt> pops up a window to let the user pick an
|
||||||
arbitrary RGB color. They can pick the hue and saturation in the "hue
|
arbitrary RGB color. They can pick the hue and saturation in the "hue
|
||||||
@@ -43,7 +43,7 @@ dithering.
|
|||||||
access with <A href=#fl_color><tt>fl_color()</tt></A> and lets the user
|
access with <A href=#fl_color><tt>fl_color()</tt></A> and lets the user
|
||||||
pick one of them. It returns the new color index, or the old one if
|
pick one of them. It returns the new color index, or the old one if
|
||||||
the user types ESC or clicks outside the window.
|
the user types ESC or clicks outside the window.
|
||||||
<P ALIGN=CENTER><IMG src=./fl_show_colormap.gif>
|
<P ALIGN=CENTER><IMG src="fl_show_colormap.gif" ALT="The fl_show_colormap dialog">
|
||||||
|
|
||||||
<h3><A name=fl_message>void fl_message(const char *, ...)</A></h3>
|
<h3><A name=fl_message>void fl_message(const char *, ...)</A></h3>
|
||||||
|
|
||||||
@@ -51,12 +51,12 @@ Displays a printf-style message in a pop-up box with an "OK" button,
|
|||||||
waits for the user to hit the button. The message will wrap to fit the
|
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.
|
window, or may be many lines by putting <tt>\n</tt> characters into it.
|
||||||
The enter key is a shortcut for the OK button.
|
The enter key is a shortcut for the OK button.
|
||||||
<P ALIGN=CENTER><IMG src=./fl_message.gif border=1>
|
<P ALIGN=CENTER><IMG src="fl_message.gif" ALT="The fl_message window.">
|
||||||
|
|
||||||
<h3><A name=fl_>void fl_alert(const char *, ...)</A></h3>
|
<h3><A name=fl_>void fl_alert(const char *, ...)</A></h3>
|
||||||
|
|
||||||
Same as <tt>fl_message()</tt> except for the "!" symbol.
|
Same as <tt>fl_message()</tt> except for the "!" symbol.
|
||||||
<P ALIGN=CENTER><IMG src=./fl_alert.gif border=1>
|
<P ALIGN=CENTER><IMG src="fl_alert.gif" ALT="The fl_alert window">
|
||||||
|
|
||||||
<h3><A name=fl_ask>int fl_ask(const char *, ...)</A></h3>
|
<h3><A name=fl_ask>int fl_ask(const char *, ...)</A></h3>
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ 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
|
pick No. The enter key is a shortcut for Yes and ESC is a shortcut
|
||||||
for No.
|
for No.
|
||||||
|
|
||||||
<p align=center><img src=./fl_ask.gif border=1>
|
<p align=center><img src="fl_ask.gif" ALT="The fl_ask window.">
|
||||||
|
|
||||||
<h3><A name=fl_choice2>int fl_choice(const char *q, const char *b0,
|
<h3><A name=fl_choice2>int fl_choice(const char *q, const char *b0,
|
||||||
const char *b1, const char *b2, ...)</A></h3>
|
const char *b1, const char *b2, ...)</A></h3>
|
||||||
@@ -78,7 +78,7 @@ the enter key is a shortcut for button 1. Notice the buttons are
|
|||||||
positioned "backwards" You can hide buttons by passing
|
positioned "backwards" You can hide buttons by passing
|
||||||
<tt>NULL</tt> as their labels.
|
<tt>NULL</tt> as their labels.
|
||||||
|
|
||||||
<p align=center><img src=./fl_choice.gif border=1>
|
<p align=center><img src="fl_choice.gif" ALT="The fl_choice window.">
|
||||||
|
|
||||||
<h3><A name=fl_input2>const char *fl_input(const char *label, const char
|
<h3><A name=fl_input2>const char *fl_input(const char *label, const char
|
||||||
*deflt = 0, ...)</A></h3>
|
*deflt = 0, ...)</A></h3>
|
||||||
@@ -89,7 +89,7 @@ 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
|
is called</I>. Due to back-compatability, the arguments to any printf
|
||||||
commands in the label are after the default value.
|
commands in the label are after the default value.
|
||||||
|
|
||||||
<p align=center><img src=./fl_input.gif border=1>
|
<p align=center><img src="fl_input.gif" ALT="The fl_input window.">
|
||||||
|
|
||||||
<h3><A name=fl_password>const char *fl_password(const char *label,
|
<h3><A name=fl_password>const char *fl_password(const char *label,
|
||||||
const char *deflt = 0, ...)</A></h3>
|
const char *deflt = 0, ...)</A></h3>
|
||||||
@@ -97,7 +97,7 @@ const char *deflt = 0, ...)</A></h3>
|
|||||||
Same as <tt>fl_input()</tt> except an <A
|
Same as <tt>fl_input()</tt> except an <A
|
||||||
href=Fl_Secret_Input.html><tt>Fl_Secret_Input</tt></A> field is used.
|
href=Fl_Secret_Input.html><tt>Fl_Secret_Input</tt></A> field is used.
|
||||||
|
|
||||||
<p align=center><img src=./fl_password.gif border=1>
|
<p align=center><img src="fl_password.gif" ALT="The fl_password window.">
|
||||||
|
|
||||||
<h3><A name=fl_message_font>void fl_message_font(Fl_Font fontid, uchar
|
<h3><A name=fl_message_font>void fl_message_font(Fl_Font fontid, uchar
|
||||||
size)</A></h3>
|
size)</A></h3>
|
||||||
@@ -119,7 +119,7 @@ unique features, the major one being that the Tab key completes
|
|||||||
filenames like it does in Emacs or tcsh, and the list always shows all
|
filenames like it does in Emacs or tcsh, and the list always shows all
|
||||||
possible completions.
|
possible completions.
|
||||||
|
|
||||||
<p align=center><img src=./filechooser.gif>
|
<p align=center><img src="filechooser.gif" ALT="The fl_file_chooser window.">
|
||||||
|
|
||||||
<tt>fl_file_chooser()</tt> pops up the file chooser, waits for the user
|
<tt>fl_file_chooser()</tt> pops up the file chooser, waits for the user
|
||||||
to pick a file or Cancel, and then returns a pointer to that filename
|
to pick a file or Cancel, and then returns a pointer to that filename
|
||||||
@@ -663,7 +663,7 @@ it is the most recent window to get an event.
|
|||||||
Returns the next top-level window in the list of shown() windows. You can
|
Returns the next top-level window in the list of shown() windows. You can
|
||||||
use this call to iterate through all the windows that are shown().
|
use this call to iterate through all the windows that are shown().
|
||||||
|
|
||||||
<h3><A name=first_window>static void Fl::first_window(Fl_Window*)</A></h3>
|
<h3>static void Fl::first_window(Fl_Window*)</h3>
|
||||||
|
|
||||||
Sets the window that is returned by first_window. The window is
|
Sets the window that is returned by first_window. The window is
|
||||||
removed from wherever it is in the list and inserted at the top. This
|
removed from wherever it is in the list and inserted at the top. This
|
||||||
@@ -706,11 +706,11 @@ colormap.
|
|||||||
|
|
||||||
Returns the color index or RGB value for the given FLTK color index.
|
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)</h3>
|
<h3><A name=get_font>static const char *Fl::get_font(int face)</A></h3>
|
||||||
|
|
||||||
Get the string for this face. This string is different for each
|
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
|
face. Under X this value is passed to XListFonts to get all the sizes
|
||||||
of this face. </A>
|
of this face.
|
||||||
|
|
||||||
<h3><A name=get_font_name>static const char *Fl::get_font_name(int
|
<h3><A name=get_font_name>static const char *Fl::get_font_name(int
|
||||||
face, int *attributes = 0)</A></h3>
|
face, int *attributes = 0)</A></h3>
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ not work. If you do <TT>show()</TT> the window, call <TT>make_current()</TT>
|
|||||||
<H3>Members</H3>
|
<H3>Members</H3>
|
||||||
The <TT>Fl_Glut_Window</TT> class contains several public members that can
|
The <TT>Fl_Glut_Window</TT> class contains several public members that can
|
||||||
be altered directly:
|
be altered directly:
|
||||||
<CENTER><TABLE WIDTH="80%" BORDER">
|
<CENTER><TABLE WIDTH="80%" BORDER="1" ALT="Fl_Glut_Window public members.">
|
||||||
<TR>
|
<TR>
|
||||||
<TH>member</TH>
|
<TH>member</TH>
|
||||||
<TH>description</TH>
|
<TH>description</TH>
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
</HEAD>
|
</HEAD>
|
||||||
<BODY>
|
<BODY>
|
||||||
|
|
||||||
<CENTER><TABLE WIDTH=90% BGCOLOR=#9f9f9f CELLPADDING=8 CELLSPACING=0>
|
<CENTER><TABLE WIDTH=90% BGCOLOR=#9f9f9f CELLPADDING=8 CELLSPACING=0 SUMMARY="TITLE BAR">
|
||||||
<TR>
|
<TR>
|
||||||
<TD ALIGN=CENTER VALIGN=MIDDLE><IMG SRC=FL.gif ALIGN=ABSMIDDLE></TD>
|
<TD ALIGN=CENTER VALIGN=MIDDLE><IMG SRC="FL.gif" ALIGN="ABSMIDDLE" ALT="FL"></TD>
|
||||||
<TD ALIGN=CENTER VALIGN=MIDDLE>
|
<TD ALIGN=CENTER VALIGN=MIDDLE>
|
||||||
<H1>FLTK 1.0.11 Programming Manual</H1>
|
<H1>FLTK 1.0.11 Programming Manual</H1>
|
||||||
Revision 17 by Michael Sweet, Craig P. Earls, and Bill Spitzak<BR>
|
Revision 17 by Michael Sweet, Craig P. Earls, and Bill Spitzak<BR>
|
||||||
@@ -21,7 +21,7 @@ Public License.
|
|||||||
</TR>
|
</TR>
|
||||||
</TABLE></CENTER>
|
</TABLE></CENTER>
|
||||||
|
|
||||||
<CENTER><TABLE WIDTH=90% COLS=2 BGCOLOR=#9f9fef CELLPADDING=8 CELLSPACING=0>
|
<CENTER><TABLE WIDTH=90% COLS=2 BGCOLOR=#9f9fef CELLPADDING=8 CELLSPACING=0 SUMMARY="Table of Contents">
|
||||||
<TR>
|
<TR>
|
||||||
<TD ALIGN=LEFT VALIGN=TOP>
|
<TD ALIGN=LEFT VALIGN=TOP>
|
||||||
<B><A HREF=preface.html#preface>Preface</A></B>
|
<B><A HREF=preface.html#preface>Preface</A></B>
|
||||||
|
|||||||
@@ -146,8 +146,9 @@ purpose that is entirely well-defined independent of the application.
|
|||||||
function or table used by this function must be optional: if the
|
function or table used by this function must be optional: if the
|
||||||
application does not supply it, the square root function must still
|
application does not supply it, the square root function must still
|
||||||
compute square roots.) </P>
|
compute square roots.) </P>
|
||||||
</BLOCKQUOTE> These requirements apply to the modified work as a whole.
|
</BLOCKQUOTE>
|
||||||
If identifiable sections of that work are not derived from the
|
<P>These requirements apply to the modified work as a whole.
|
||||||
|
If identifiable sections of that work are not derived from the
|
||||||
Library, and can be reasonably considered independent and separate
|
Library, and can be reasonably considered independent and separate
|
||||||
works in themselves, then this License, and its terms, do not apply to
|
works in themselves, then this License, and its terms, do not apply to
|
||||||
those sections when you distribute them as separate works. But when
|
those sections when you distribute them as separate works. But when
|
||||||
@@ -246,14 +247,15 @@ access to copy from a designated place, offer equivalent access to
|
|||||||
copy the above specified materials from the same place. </P>
|
copy the above specified materials from the same place. </P>
|
||||||
<P><STRONG>d)</STRONG> Verify that the user has already received a copy
|
<P><STRONG>d)</STRONG> Verify that the user has already received a copy
|
||||||
of these materials or that you have already sent this user a copy. </P>
|
of these materials or that you have already sent this user a copy. </P>
|
||||||
</BLOCKQUOTE> For an executable, the required form of the "work that
|
</BLOCKQUOTE>
|
||||||
|
<P>For an executable, the required form of the "work that
|
||||||
uses the Library" must include any data and utility programs needed for
|
uses the Library" must include any data and utility programs needed for
|
||||||
reproducing the executable from it. However, as a special exception,
|
reproducing the executable from it. However, as a special exception,
|
||||||
the source code distributed need not include anything that is normally
|
the source code distributed need not include anything that is normally
|
||||||
distributed (in either source or binary form) with the major components
|
distributed (in either source or binary form) with the major components
|
||||||
(compiler, kernel, and so on) of the operating system on which the
|
(compiler, kernel, and so on) of the operating system on which the
|
||||||
executable runs, unless that component itself accompanies the
|
executable runs, unless that component itself accompanies the
|
||||||
executable. </P>
|
executable.</P>
|
||||||
<P>It may happen that this requirement contradicts the license
|
<P>It may happen that this requirement contradicts the license
|
||||||
restrictions of other proprietary libraries that do not normally
|
restrictions of other proprietary libraries that do not normally
|
||||||
accompany the operating system. Such a contradiction means you cannot
|
accompany the operating system. Such a contradiction means you cannot
|
||||||
@@ -273,7 +275,8 @@ above.
|
|||||||
of the fact that part of it is a work based on the Library, and
|
of the fact that part of it is a work based on the Library, and
|
||||||
explaining where to find the accompanying uncombined form of the same
|
explaining where to find the accompanying uncombined form of the same
|
||||||
work. </P>
|
work. </P>
|
||||||
</BLOCKQUOTE><STRONG>8.</STRONG> You may not copy, modify, sublicense,
|
</BLOCKQUOTE>
|
||||||
|
<P><STRONG>8.</STRONG> You may not copy, modify, sublicense,
|
||||||
link with, or distribute the Library except as expressly provided under
|
link with, or distribute the Library except as expressly provided under
|
||||||
this License. Any attempt otherwise to copy, modify, sublicense, link
|
this License. Any attempt otherwise to copy, modify, sublicense, link
|
||||||
with, or distribute the Library is void, and will automatically
|
with, or distribute the Library is void, and will automatically
|
||||||
|
|||||||
@@ -305,9 +305,7 @@ public:
|
|||||||
};
|
};
|
||||||
</PRE>
|
</PRE>
|
||||||
</UL>
|
</UL>
|
||||||
<PRE>
|
|
||||||
|
|
||||||
</PRE>
|
|
||||||
<H4>The camera() Method</H4>
|
<H4>The camera() Method</H4>
|
||||||
The <TT>camera()</TT> method sets the camera (projection and
|
The <TT>camera()</TT> method sets the camera (projection and
|
||||||
viewpoint) to use when drawing the scene. The scene is redrawn after
|
viewpoint) to use when drawing the scene. The scene is redrawn after
|
||||||
|
|||||||
@@ -100,13 +100,13 @@ MyClass::handle(int event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MyClass::draw() {
|
MyClass::draw() {
|
||||||
if (damage() & FL_DAMAGE_ALL) {
|
if (damage() & FL_DAMAGE_ALL) {
|
||||||
... draw frame/box and other static stuff ...
|
... draw frame/box and other static stuff ...
|
||||||
}
|
}
|
||||||
|
|
||||||
if (damage() & (FL_DAMAGE_ALL | 1)) draw_part1();
|
if (damage() & (FL_DAMAGE_ALL | 1)) draw_part1();
|
||||||
if (damage() & (FL_DAMAGE_ALL | 2)) draw_part2();
|
if (damage() & (FL_DAMAGE_ALL | 2)) draw_part2();
|
||||||
if (damage() & (FL_DAMAGE_ALL | 4)) draw_part3();
|
if (damage() & (FL_DAMAGE_ALL | 4)) draw_part3();
|
||||||
}
|
}
|
||||||
</PRE></UL>
|
</PRE></UL>
|
||||||
<H4><A name=draw_box>void Fl_Widget::draw_box() const
|
<H4><A name=draw_box>void Fl_Widget::draw_box() const
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ see <A href=functions.html#functions>Appendix B</A>.
|
|||||||
|
|
||||||
<H2>Alphabetical List of Classes</H2>
|
<H2>Alphabetical List of Classes</H2>
|
||||||
|
|
||||||
<CENTER><TABLE WIDTH=80%>
|
<CENTER><TABLE WIDTH=80% SUMMARY="List of Widget Classes">
|
||||||
<TR ALIGN=LEFT VALIGN=TOP>
|
<TR ALIGN=LEFT VALIGN=TOP>
|
||||||
<TD>
|
<TD>
|
||||||
<A HREF=Fl_Adjuster.html#Fl_Adjuster>Fl_Adjuster</A><BR>
|
<A HREF=Fl_Adjuster.html#Fl_Adjuster>Fl_Adjuster</A><BR>
|
||||||
|
|||||||
Reference in New Issue
Block a user