Documentation updates.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1625 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
eb9a83b348
commit
2c61d60470
2
CHANGES
2
CHANGES
@ -15,6 +15,8 @@ CHANGES IN FLTK 1.1.0b3
|
||||
- fl_line_style() used different default cap and join
|
||||
options for WIN32 and X11.
|
||||
|
||||
- Documentation updates from A. Suatoni.
|
||||
|
||||
|
||||
CHANGES IN FLTK 1.1.0b2
|
||||
|
||||
|
@ -31,9 +31,10 @@ const char * = 0)
|
||||
char *)</A></H4>
|
||||
The first constructor sets <TT>box()</TT> to <TT>FL_NO_BOX</TT>, which
|
||||
means it is invisible. However such widgets are useful as placeholders
|
||||
or <A href="#Fl_Group.resizable"><TT>Fl_Group::resizable()</TT></A>
|
||||
or <A href="Fl_Group.html#Fl_Group.resizable"><TT>Fl_Group::resizable()</TT></A>
|
||||
values. To change the box to something visible, use <TT>box(n)</TT>.
|
||||
<P>The second form of the constructor sets the box to the specified box
|
||||
type. </P>
|
||||
<H4><A name=Fl_Box.~Fl_Box>Fl_Box::~Fl_Box(void)</A></H4>
|
||||
The destructor removes the box. </BODY></HTML>
|
||||
The destructor removes the box.
|
||||
</BODY></HTML>
|
||||
|
@ -38,6 +38,7 @@ putting a '&' character in the <TT>label()</TT>. See <A href=Fl_Button.html
|
||||
<P>Typing the <TT>shortcut()</TT> of any of the items will do exactly
|
||||
the same as when you pick the item with the mouse. The '&' character in
|
||||
item names are only looked at when the menu is popped up, however. </P>
|
||||
<P ALIGN=CENTER><IMG src="choice.gif" ALT="Fl_Choice widget."></P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Choice.Fl_Choice>Fl_Choice</A></LI>
|
||||
|
@ -20,6 +20,7 @@
|
||||
This widget provides a round analog clock display and is provided for
|
||||
Forms compatibility. It installs a 1-second timeout callback using <A href=functions.html#add_timeout>
|
||||
<TT>Fl::add_timeout()</TT></A>.
|
||||
<P ALIGN=CENTER><IMG src="clock.gif" ALT="Fl_Clock widget."> <IMG src="round_clock.gif" ALT="Fl_Clock widget."></P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Clock.Fl_Clock>Fl_Clock</A></LI>
|
||||
|
@ -29,7 +29,16 @@ or value is zero.
|
||||
<UL>
|
||||
<LI><A href=#Fl_Color_Chooser.Fl_Color_Chooser>Fl_Color_Chooser</A></LI>
|
||||
<LI><A href=#Fl_Color_Chooser.~Fl_Color_Chooser>~Fl_Color_Chooser</A></LI>
|
||||
<LI><A href=#Fl_Color_Chooser.add>add</A></LI>
|
||||
<LI><A href=#Fl_Color_Chooser.b>b</A></LI>
|
||||
<LI><A href=#Fl_Color_Chooser.g>g</A></LI>
|
||||
<LI><A href=#Fl_Color_Chooser.hsv2rgb>hsv2rgb</A></LI>
|
||||
<LI><A href=#Fl_Color_Chooser.hsv>hsv</A></LI>
|
||||
<LI><A href=#Fl_Color_Chooser.hue>hue</A></LI>
|
||||
<LI><A href=#Fl_Color_Chooser.rgb2hsv>rgb2hsv</A></LI>
|
||||
<LI><A href=#Fl_Color_Chooser.rgb>rgb</A></LI>
|
||||
<LI><A href=#Fl_Color_Chooser.r>r</A></LI>
|
||||
<LI><A href=#Fl_Color_Chooser.saturation>saturation</A></LI>
|
||||
<LI><A href=#Fl_Color_Chooser.value>value</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Color_Chooser.Fl_Color_Chooser>
|
||||
Fl_Color_Chooser::Fl_Color_Chooser(int x, int y, int w, int h, const
|
||||
|
@ -19,6 +19,7 @@
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Counter</TT> widget is provided for forms compatibility.
|
||||
It controls a single floating point value.
|
||||
<P ALIGN=CENTER><IMG src="counter.gif" ALT="Fl_Counter widget."></P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Counter.Fl_Counter>Fl_Counter</A></LI>
|
||||
|
@ -19,6 +19,7 @@
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Dial</TT> widget provides a circular dial to control a
|
||||
single floating point value.
|
||||
<P ALIGN=CENTER><IMG src="dial.gif" ALT="Fl_Dial widget."></P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Dial.Fl_Dial>Fl_Dial</A></LI>
|
||||
|
@ -5,11 +5,9 @@
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=Fl_Widget.html#Fl_Widget>Fl_Widget</A>
|
||||
<A href=Fl_Window.html#Fl_Window>Fl_Window</A>
|
||||
|
|
||||
+----<B>Fl_Gl_Window</B>
|
||||
|
|
||||
+----<A href=Fl_Pack.html#Fl_Pack>Fl_Pack</A>, <A href=Fl_Scroll.html#Fl_Scroll>Fl_Scroll</A>, <A href=Fl_Tabs.html#Fl_Tabs>Fl_Tabs</A>, <A href=Fl_Tile.html#Fl_Tile>Fl_Tile</A>, <A href=Fl_Window.html#Fl_Window>Fl_Window</A>
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Include Files</H3>
|
||||
@ -44,7 +42,6 @@ very well for single-buffered. </P>
|
||||
<LI><A href=#Fl_Gl_Window.context>context</A></LI>
|
||||
<LI><A href=#Fl_Gl_Window.draw>draw</A></LI>
|
||||
<LI><A href=#Fl_Gl_Window.draw_overlay>draw_overlay</A></LI>
|
||||
<LI><A href=#Fl_Gl_Window.handle>handle</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
@ -129,12 +126,12 @@ Return or set a pointer to the GLContext that this window is
|
||||
using. This is a system-dependent structure, but it is portable to copy
|
||||
the context from one window to another. You can also set it to NULL,
|
||||
which will force FLTK to recreate the context the next time <a
|
||||
href=#make_current><tt>make_current()</tt></a> is called, this is
|
||||
href=#Fl_Gl_Window.make_current><tt>make_current()</tt></a> is called, this is
|
||||
useful for getting around bugs in OpenGL implementations.
|
||||
|
||||
<p>If <i>destroy_flag</i> is true the context will be destroyed by
|
||||
fltk when the window is destroyed, or when the <a
|
||||
href=#mode><tt>mode()</tt></a> is changed, or the next time
|
||||
href=#Fl_Gl_Window.mode><tt>mode()</tt></a> is changed, or the next time
|
||||
<tt>context(x)</tt> is called.
|
||||
|
||||
<H4><A name=Fl_Gl_Window.valid>char Fl_Gl_Window::valid() const
|
||||
|
@ -56,7 +56,7 @@ behavior.
|
||||
<UL>
|
||||
<LI><A href=#Fl_Group.insert>insert</A></LI>
|
||||
<LI><A href=#Fl_Group.remove>remove</A></LI>
|
||||
<LI><A href=#Fl_Group.resizeable>resizable</A></LI>
|
||||
<LI><A href=#Fl_Group.resizable>resizable</A></LI>
|
||||
</UL>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
@ -128,7 +128,7 @@ added to the widget tree will be added to the parent of the group.
|
||||
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.resizeable>void Fl_Group::resizable(Fl_Widget *box)
|
||||
<H4><A name=Fl_Group.resizable>void Fl_Group::resizable(Fl_Widget *box)
|
||||
<BR> void Fl_Group::resizable(Fl_Widget &box)
|
||||
<BR> Fl_Widget *Fl_Group::resizable() const</A></H4>
|
||||
The resizable widget defines the resizing box for the group. When the
|
||||
|
@ -19,7 +19,7 @@
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
This is a virtual base class below <A href=functions.html#Fl_Input><TT>
|
||||
This is a virtual base class below <A href=Fl_Input.html#Fl_Input><TT>
|
||||
Fl_Input</TT></A>. It has all the same interfaces, but lacks the <TT>
|
||||
handle()</TT> and <TT>draw()</TT> method. You may want to subclass it
|
||||
if you are one of those people who likes to change how the editing keys
|
||||
|
@ -19,10 +19,10 @@
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3>Description</H3>
|
||||
All widgets that have a menu in FLTK are subclassed off of this class.
|
||||
All widgets that have a menu in FLTK are subclassed off of this class.
|
||||
Currently FLTK provides you with <A href=Fl_Menu_Button.html#Fl_Menu_Button>
|
||||
<TT>Fl_Menu_Button</TT></A>, <A href=Fl_Menu_Bar.html#Fl_Menu_Bar><TT>
|
||||
Fl_Menu_Bar</TT></A>, and <A href=functions.html#Fl_Choice><TT>Fl_Choice</TT>
|
||||
Fl_Menu_Bar</TT></A>, and <A href=Fl_Choice.html#Fl_Choice><TT>Fl_Choice</TT>
|
||||
</A>.
|
||||
|
||||
<P>The class contains a pointer to an array of structures of type <A
|
||||
|
@ -200,7 +200,7 @@ zero disables the shortcut.
|
||||
<P>The key can be any value returned by <A href=functions.html#event_key>
|
||||
<TT>Fl::event_key()</TT></A>, but will usually be an ASCII letter. Use
|
||||
a lower-case letter unless you require the shift key to be held down. </P>
|
||||
<P>The shift flags can be any set of values accepted by <A href=events.html#event_state>
|
||||
<P>The shift flags can be any set of values accepted by <A href=functions.html#event_state>
|
||||
<TT>Fl::event_state()</TT></A>. If the bit is on that shift key must
|
||||
be pushed. Meta, Alt, Ctrl, and Shift must be off if they are not in
|
||||
the shift flags (zero for the other bits indicates a "don't care"
|
||||
|
@ -5,7 +5,7 @@
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=functions.html#Fl_Input>Fl_Input</A>
|
||||
<A href=Fl_Input.html#Fl_Input>Fl_Input</A>
|
||||
|
|
||||
+----<B>Fl_Multiline_Input</B>
|
||||
</PRE>
|
||||
|
@ -37,7 +37,6 @@ set. </P>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Output.Fl_Output>Fl_Output</A></LI>
|
||||
<LI><A href=#Fl_Output.~Fl_Output>~Fl_Output</A></LI>
|
||||
<LI><A href=#Fl_Output.cursor_color>cursor_color</A></LI>
|
||||
<LI><A href=#Fl_Output.index>index</A></LI>
|
||||
<LI><A href=#Fl_Output.size>size</A></LI>
|
||||
<LI><A href=#Fl_Output.textcolor>textcolor</A></LI>
|
||||
|
@ -25,44 +25,15 @@ each other horizontally. If <TT>type()</TT> is not <TT>FL_HORIZONTAL</TT>
|
||||
then the children are resized to the width and are stacked below each
|
||||
other. Then the <TT>Fl_Pack</TT> resizes itself to surround the child
|
||||
widgets. </P>
|
||||
<P>This widget is needed for the <A href=#Fl_Tab><TT>Fl_Tab</TT></A>.
|
||||
<P>This widget is needed for the <A href=Fl_Tabs.html#Fl_Tabs><TT>Fl_Tabs</TT></A>.
|
||||
In addition you may want to put the <TT>Fl_Pack</TT> inside an <A href=Fl_Scroll.html#Fl_Scroll>
|
||||
<TT>Fl_Scroll</TT></A>. </P>
|
||||
<H3>Methods</H3>
|
||||
<CENTER>
|
||||
<TABLE width=90% summary="Fl_Pack methods.">
|
||||
<TR><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Pack.Fl_Pack>Fl_Pack</A></LI>
|
||||
<LI><A href=#Fl_Pack.~Fl_Pack>~Fl_Pack</A></LI>
|
||||
<LI><A href=#Fl_Pack.add>add</A></LI>
|
||||
<LI><A href=#Fl_Pack.spacing>spacing</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Pack.add_resizeable>add_resizeable</A></LI>
|
||||
<LI><A href=#Fl_Pack.array>array</A></LI>
|
||||
<LI><A href=#Fl_Pack.begin>begin</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Pack.child>child</A></LI>
|
||||
<LI><A href=#Fl_Pack.children>children</A></LI>
|
||||
<LI><A href=#Fl_Pack.current>current</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Pack.end>end</A></LI>
|
||||
<LI><A href=#Fl_Pack.find>find</A></LI>
|
||||
<LI><A href=#Fl_Pack.insert>insert</A></LI>
|
||||
</UL>
|
||||
</TD><TD align=left valign=top>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Pack.remove>remove</A></LI>
|
||||
<LI><A href=#Fl_Pack.resizeable>resizeable</A></LI>
|
||||
</UL>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
<H4><A name=Fl_Pack.Fl_Pack>Fl_Pack::Fl_Pack(int x, int y, int w, int
|
||||
h, const char *label = 0)</A></H4>
|
||||
Creates a new <TT>Fl_Pack</TT> widget using the given position, size,
|
||||
|
@ -19,6 +19,7 @@
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Roller</TT> widget is a "dolly" control commonly used to
|
||||
move 3D objects.
|
||||
<P ALIGN=CENTER><IMG src="Fl_Roller.gif" ALT="Fl_Roller widget."></P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Roller.Fl_Roller>Fl_Roller</A></LI>
|
||||
|
@ -34,12 +34,12 @@ Fl_Double_Window</TT>. </P>
|
||||
draw()</TT> method that draws the contents. The scrolling is done by
|
||||
changing the <TT>x()</TT> and <TT>y()</TT> of the widget, so this child
|
||||
must use the <TT>x()</TT> and <TT>y()</TT> to position it's drawing.
|
||||
To speed up drawing it should test <A href=fl_clip><TT>fl_clip()</TT></A>
|
||||
To speed up drawing it should test <A href=drawing.html#fl_clip><TT>fl_clip()</TT></A>
|
||||
. </P>
|
||||
<P>Another very useful child is a single <A href=Fl_Pack.html#Fl_Pack><TT>
|
||||
Fl_Pack</TT></A>, which is itself a group that packs it's children
|
||||
together and changes size to surround them. Filling the <TT>Fl_Pack</TT>
|
||||
with <A href=#Fl_Tab><TT>Fl_Tab</TT></A> groups (and then putting
|
||||
with <A href=Fl_Tabs.html#Fl_Tabs><TT>Fl_Tabs</TT></A> groups (and then putting
|
||||
normal widgets inside those) gives you a very powerful scrolling list
|
||||
of individually-openable panels. </P>
|
||||
<P>Fluid lets you create these, but you can only lay out objects that
|
||||
|
@ -27,6 +27,7 @@ linesize()</TT>) and Home/End (they jump to the top or bottom).
|
||||
integers). If desired you can set the <TT>step()</TT> to non-integer
|
||||
values. You will then have to use casts to get at the floating-point
|
||||
versions of <TT>value()</TT> from <TT>Fl_Slider</TT>. </P>
|
||||
<P ALIGN=CENTER><IMG src="scrollbar.gif" ALT="Fl_Scrollbar widget."></P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Scrollbar.Fl_Scrollbar>Fl_Scrollbar</A></LI>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<H3>Class Hierarchy</H3>
|
||||
<UL>
|
||||
<PRE>
|
||||
<A href=functions.html#Fl_Input>Fl_Input</A>
|
||||
<A href=Fl_Input.html#Fl_Input>Fl_Input</A>
|
||||
|
|
||||
+----<B>Fl_Secret_Input</B>
|
||||
</PRE>
|
||||
@ -19,7 +19,7 @@
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Secret_Input</TT> class is a subclass of <TT>Fl_Input</TT>
|
||||
that displays its input as a string of asterisks. This subclass is
|
||||
usually used to recieve passwords and other "secret" information.
|
||||
usually used to receive passwords and other "secret" information.
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Secret_Input.Fl_Secret_Input>Fl_Secret_Input</A></LI>
|
||||
|
@ -24,6 +24,7 @@ if often used as a scrollbar. Moving the box all the way to the
|
||||
top/left sets it to the <TT>minimum()</TT>, and to the bottom/right to
|
||||
the <TT>maximum()</TT>. The <TT>minimum()</TT> may be greater than the <TT>
|
||||
maximum()</TT> to reverse the slider direction.
|
||||
<P ALIGN=CENTER><IMG src="slider.gif" ALT="Fl_Slider widget."></P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Slider.Fl_Slider>Fl_Slider</A></LI>
|
||||
@ -43,7 +44,7 @@ size, and label string. The default boxtype is <TT>FL_DOWN_BOX</TT>.
|
||||
windowtop, int windowsize, int first, int totalsize)</A></H4>
|
||||
Returns <A href=Fl_Scrollbar.html#Fl_Scrollbar.value><TT>
|
||||
Fl_Scrollbar::value()</TT></A>.
|
||||
<H4><A name=Fl_Slider.>Fl_Boxtype Fl_Slider::slider() const
|
||||
<H4><A name=Fl_Slider.slider>Fl_Boxtype Fl_Slider::slider() const
|
||||
<BR> void Fl_Slider::slider(Fl_Boxtype)</A></H4>
|
||||
Set the type of box to draw for the moving part of the slider. The
|
||||
color of the moving part (or of the notch in it for the nice sliders)
|
||||
|
@ -26,7 +26,7 @@ and insures that callbacks are done the same for every object.
|
||||
<P>There are probably more of these classes in FLTK than any others: </P>
|
||||
<P ALIGN=CENTER><IMG src="valuators.gif" ALT="Fl_Valuator widgets."></P>
|
||||
<P>In the above diagram each box surrounds an actual subclass. These
|
||||
are further differentiated by setting the <A href=#Fl_Widget.type><TT>
|
||||
are further differentiated by setting the <A href=Fl_Widget.html#Fl_Widget.type><TT>
|
||||
type()</TT></A> of the widget to the symbolic value labeling the
|
||||
widget. The ones labelled "0" are the default versions with a <TT>
|
||||
type(0)</TT>. For consistency the symbol <TT>FL_VERTICAL</TT> is
|
||||
|
@ -19,7 +19,7 @@
|
||||
<H3>Description</H3>
|
||||
The <TT>Fl_Value_Input</TT> widget displays a floating point value.
|
||||
The user can click in the text field and edit it (there is in fact a
|
||||
hidden <A href=#Fl_Input><TT>Fl_Input</TT></A> widget with <TT>
|
||||
hidden <A href=Fl_Input.html#Fl_Input><TT>Fl_Input</TT></A> widget with <TT>
|
||||
type(FL_FLOAT_INPUT)</TT> in there), and when they hit return or tab
|
||||
the value updates to what they typed and the callback is done.
|
||||
<P>If <TT>step()</TT> is not zero, the user can also drag the mouse
|
||||
@ -28,6 +28,7 @@ step()</TT> per pixel, the middle by <TT>10 * step()</TT>, and the left
|
||||
button by <TT>100 * step()</TT>. It is then impossible to select text
|
||||
by dragging across it, although clicking can still move the insertion
|
||||
cursor. </P>
|
||||
<P ALIGN=CENTER><IMG src="Fl_Value_Input.gif" ALT="Fl_Value_Input widget."></P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Value_Input.Fl_Value_Input>Fl_Value_Input</A></LI>
|
||||
|
@ -25,6 +25,7 @@ dragging the mouse left and right. The left button moves one <TT>step()</TT>
|
||||
<P>This is much lighter-weight than <A href=Fl_Value_Input.html#Fl_Value_Input>
|
||||
<TT>Fl_Value_Input</TT></A> because it contains no text editing code or
|
||||
character buffer. </P>
|
||||
<P ALIGN=CENTER><IMG src="Fl_Value_Output.gif" ALT="Fl_Value_Output widget."></P>
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Value_Output.Fl_Value_Output>Fl_Value_Output</A></LI>
|
||||
|
@ -21,7 +21,7 @@
|
||||
<H3>Description</H3>
|
||||
<TT>Fl_Widget</TT> is the base class for all widgets in FLTK. You can't
|
||||
create one of these because the constructor is not public. However you
|
||||
can <A href="#subclassing">subclass</A> it.
|
||||
can <A href="subclassing.html#subclassing">subclass</A> it.
|
||||
<P>All "property" accessing methods, such as <TT>color()</TT>, <TT>
|
||||
parent()</TT>, or <TT>argument()</TT> are implemented as trivial inline
|
||||
functions and thus are as fast and small as accessing fields in a
|
||||
@ -95,16 +95,16 @@ to call <TT>redraw()</TT> after these. </P>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
<H4>Fl_Widget::Fl_Widget(int x, int y, int w, int h, const char*
|
||||
label=0);</H4>
|
||||
<H4><A NAME="Fl_Widget.Fl_Widget">Fl_Widget::Fl_Widget(int x, int y, int w, int h, const char*
|
||||
label=0);</A></H4>
|
||||
This is the protected constructor for an Fl_Widget, but all derived
|
||||
widgets have a matching public constructor. It takes a value for x(),
|
||||
y(), w(), h(), and an optional value for label().
|
||||
<H4>virtual Fl_Widget::~Fl_Widget();</H4>
|
||||
<H4><A NAME="Fl_Widget.~Fl_Widget">virtual Fl_Widget::~Fl_Widget();</A></H4>
|
||||
Destroying single widgets is not very common. It is your
|
||||
responsibility to either remove() them from any enclosing group, or to
|
||||
destroy that group <I>immediately</I> after destroying the children.
|
||||
<H4>uchar Fl_Widget::type() const;</H4>
|
||||
<H4><A NAME="Fl_Widget.type">uchar Fl_Widget::type() const;</A></H4>
|
||||
This value is used for Forms compatability and to simulate RTTI.
|
||||
<H4><A name=Fl_Widget.x>short Fl_Widget::x() const</A>
|
||||
<BR><A name=Fl_Widget.y>short Fl_Widget::y() const</A>
|
||||
@ -161,7 +161,7 @@ the widget.
|
||||
const char*)
|
||||
<BR> uchar Fl_Widget::labeltype() const
|
||||
<BR> void Fl_Widget::labeltype(Fl_Labeltype)</A></H4>
|
||||
A <A href=#LabelTypes><TT>labeltype</TT></A> identifies a routine that
|
||||
A <A href="common.html#labeltypes"><TT>labeltype</TT></A> identifies a routine that
|
||||
draws the label of the widget. This can be used for special effects
|
||||
such as emboss, or to use the <TT>label()</TT> pointer as another form
|
||||
of data such as a bitmap. The value <TT>FL_NORMAL_LABEL</TT> prints
|
||||
@ -275,7 +275,7 @@ FL_DEACTIVATE</TT> to the widget if <tt>active_r()</tt> is true.
|
||||
<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
|
||||
not change how the widget is drawn. The widget will not receive any
|
||||
events. This is useful for making scrollbars or buttons that work as
|
||||
displays rather than input devices.
|
||||
|
||||
@ -284,9 +284,9 @@ displays rather than input devices.
|
||||
This is the same as <TT>(active() && visible() &&
|
||||
!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.
|
||||
Mark the widget as needing its <A HREF="subclassing.html#draw"><TT>draw()</TT></A> routine called.
|
||||
<H4><A name=Fl_Widget.damage>uchar Fl_Widget::damage() const</A></H4>
|
||||
Non-zero if <TT>draw()</TT> needs to be called. Actually this is a
|
||||
Non-zero if <A HREF="subclassing.html#draw"><TT>draw()</TT></A> needs to be called. Actually this is a
|
||||
bit field that the widget subclass can use to figure out what parts to
|
||||
draw.
|
||||
<H4><A name=Fl_Widget.parent>Fl_Widget *Fl_Widget::parent() const</A></H4>
|
||||
|
@ -128,16 +128,15 @@ are ignored. (this is ignored on WIN32)</LI>
|
||||
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>
|
||||
:
|
||||
from the setting of <A href="Fl_Group.html#Fl_Group.resizable"><TT>resizable()</TT></A>:
|
||||
<UL>
|
||||
<LI>If <TT>resizeable()</TT> is <TT>NULL</TT> (this is the default)
|
||||
<LI>If <TT>resizable()</TT> is <TT>NULL</TT> (this is the default)
|
||||
then the window cannot be resized and the resize border and max-size
|
||||
control will not be displayed for the window. </LI>
|
||||
<LI>If either dimension of <TT>resizeable()</TT> is less than 100,
|
||||
<LI>If either dimension of <TT>resizable()</TT> is less than 100,
|
||||
then that is considered the minimum size. Otherwise the <TT>
|
||||
resizeable()</TT> has a minimum size of 100. </LI>
|
||||
<LI>If either dimension of <TT>resizeable()</TT> is zero, then that is
|
||||
resizable()</TT> has a minimum size of 100. </LI>
|
||||
<LI>If either dimension of <TT>resizable()</TT> is zero, then that is
|
||||
also the maximum size (so the window cannot resize in that direction). </LI>
|
||||
</UL>
|
||||
It is undefined what happens if the current size does not fit in the
|
||||
|
@ -143,7 +143,7 @@ the pointer.
|
||||
Fl_Box draws, changing it from the default of <tt>FL_NO_BOX</tt>, which means
|
||||
that no box is drawn. In our "Hello, World!" example we use <TT>
|
||||
FL_UP_BOX</TT>, which means that a raised button border will be drawn
|
||||
around the widget. You can learn more about boxtypes in <A href=#boytypes>
|
||||
around the widget. You can learn more about boxtypes in <A href="common.html#boytypes">
|
||||
Chapter 3</A>.
|
||||
<p>You could examine the boxtype in by doing
|
||||
<tt>box->box()</tt>. Fltk uses method name overloading to make
|
||||
|
@ -36,10 +36,10 @@ rbutton->type(FL_RADIO_BUTTON);
|
||||
</UL>
|
||||
For toggle and radio buttons, the <A href=Fl_Button.html#Fl_Button.value>
|
||||
<TT>value()</TT></A> method returns the current button state (0 = off,
|
||||
1 = on). The <A href=#Fl_Widget.set><TT>set()</TT></A> and <A href=#Fl_Widget.clear>
|
||||
1 = on). The <A href="Fl_Button.html#Fl_Button.set"><TT>set()</TT></A> and <A href="Fl_Button.html#Fl_Button.clear">
|
||||
<TT>clear()</TT></A> methods can be used on toggle buttons to turn a
|
||||
toggle button on or off, respectively. Radio buttons can be turned on
|
||||
with the <A href=#Fl_Widget.setonly><TT>setonly()</TT></A> method; this
|
||||
with the <A href="Fl_Button.html#Fl_Button.setonly"><TT>setonly()</TT></A> method; this
|
||||
will also turn off other radio buttons in the same group.
|
||||
<H2>Text</H2>
|
||||
FLTK provides several text widgets for displaying and receiving text:
|
||||
@ -211,7 +211,7 @@ widget. </LI>
|
||||
box. </LI>
|
||||
<LI><TT>FL_ALIGN_WRAP</TT> - wrap the label text as needed. </LI>
|
||||
</UL>
|
||||
<H3>labeltype()</H3>
|
||||
<H3><A NAME="labeltypes">labeltype()</A></H3>
|
||||
The <TT>labeltype()</TT> method sets the type of the label. The
|
||||
following standard label types are included:
|
||||
<UL>
|
||||
@ -239,7 +239,7 @@ program-generated letters or symbology.
|
||||
<H5>Label Type Functions</H5>
|
||||
To setup your own label type you will need to write two functions to
|
||||
draw and measure the label. The draw function is called with a pointer
|
||||
to a <A href=#Fl_Label><TT>Fl_Label</TT></A> structure containing the
|
||||
to a <TT>Fl_Label</TT> structure containing the
|
||||
label information, the bounding box for the label, and the label
|
||||
alignment:
|
||||
<UL>
|
||||
@ -252,8 +252,8 @@ void xyz_draw(Fl_Label *label, int x, int y, int w, int h, Fl_Align align) {
|
||||
The label should be drawn <I>inside</I> this bounding box, even if <TT>
|
||||
FL_ALIGN_INSIDE</TT> is not enabled. The function is not called if the
|
||||
label value is <TT>NULL</TT>.
|
||||
<P>The measure function is called with a pointer to a <A href=#Fl_Label><TT>
|
||||
Fl_Label</TT></A> structure and references to the width and height: </P>
|
||||
<P>The measure function is called with a pointer to a <TT>Fl_Label</TT>
|
||||
structure and references to the width and height: </P>
|
||||
<UL>
|
||||
<PRE>
|
||||
void xyz_measure(Fl_Label *label, int &w, int &h) {
|
||||
|
@ -6,15 +6,15 @@
|
||||
Calling these functions at other places will result in undefined
|
||||
behavior!
|
||||
<UL>
|
||||
<LI>The most common is inside the virtual method <A href=#draw><TT>
|
||||
<LI>The most common is inside the virtual method <A href="subclassing.html#draw"><TT>
|
||||
Fl_Widget::draw()</TT></A>. To write code here, you must subclass one
|
||||
of the existing <TT>Fl_Widget</TT> classes and implement your own
|
||||
version of <TT>draw()</TT>. </LI>
|
||||
<LI>You can also write <A href=common.html#boxtypes>boxtypes</A> and <A href=#labeltypes>
|
||||
<LI>You can also write <A href=common.html#boxtypes>boxtypes</A> and <A href="common.html#labeltypes">
|
||||
labeltypes</A>. These are small procedures that can be called by
|
||||
existing <TT>Fl_Widget::draw()</TT> methods. These "types" are
|
||||
identified by an 8-bit index that is stored in the widget's <TT>box()</TT>
|
||||
, <TT>labeltype()</TT>, and possibly other properties. </LI>
|
||||
existing <A HREF="subclassing.html#draw"><TT>Fl_Widget::draw()</TT></A> methods. These "types" are
|
||||
identified by an 8-bit index that is stored in the widget's <TT>box()</TT>,
|
||||
<TT>labeltype()</TT>, and possibly other properties. </LI>
|
||||
<LI>You can call <A href=Fl_Window.html#Fl_Window.make_current><TT>
|
||||
Fl_Window::make_current()</TT></A> to do incremental update of a
|
||||
widget. Use <A href=Fl_Widget.html#Fl_Widget.window><TT>
|
||||
@ -134,7 +134,7 @@ Windows 95/98, use the dash styles instead.</i>
|
||||
These are used to draw almost all the FLTK widgets. They draw on
|
||||
exact pixel boundaries and are as fast as possible, and their behavior
|
||||
will be duplicated exactly on any platform FLTK is ported to. It is
|
||||
undefined whether these are affected by the <A href=#complex_shapes>
|
||||
undefined whether these are affected by the <A href=#complex>
|
||||
transformation matrix</A>, so you should only call these while it is
|
||||
the identity.
|
||||
<H4>void fl_point(int x, int y)</H4>
|
||||
@ -237,7 +237,7 @@ fl_gap()</TT> with <TT>fl_end_loop();fl_begin_loop()</TT>.</P>
|
||||
y2, float x3, float y3)</H4>
|
||||
Add a series of points on a Bezier curve to the path. The curve ends
|
||||
(and two of the points) are at <TT>x,y</TT> and <TT>x3,y3</TT>.
|
||||
<H4>void fl_arc(float x, float y, float r, float start, float end)</H4>
|
||||
<H4><A NAME="fl_arc">void fl_arc(float x, float y, float r, float start, float end)</A></H4>
|
||||
Add a series of points to the current path on the arc of a circle (you
|
||||
can get elliptical paths by using scale and rotate before calling
|
||||
this). <TT>x,y</TT> are the center of the circle, and <TT>r</TT> is its
|
||||
@ -337,10 +337,10 @@ thus redrawing is <I>much</I> faster.
|
||||
It is undefined whether the location or drawing of the image is
|
||||
affected by the current transformation, so you should only call these
|
||||
when it is the identity.
|
||||
<H4>void fl_draw_image(const uchar *, int X, int Y, int W, int H, int D
|
||||
<H4><A NAME="fl_draw_image">void fl_draw_image(const uchar *, int X, int Y, int W, int H, int D
|
||||
= 3, int LD = 0)
|
||||
<BR> void fl_draw_image_mono(const uchar *, int X, int Y, int W, int H,
|
||||
int D = 1, int LD = 0)</H4>
|
||||
int D = 1, int LD = 0)</A></H4>
|
||||
Draw an 8-bit per color RGB or luminance image. The pointer points at
|
||||
the "r" data of the top-left pixel. Data must be in <TT>r,g,b</TT>
|
||||
order. <TT>X,Y</TT> are where to put the top-left corner. <TT>W</TT>
|
||||
|
@ -152,7 +152,7 @@ because some of the other callbacks will set the changed status to 0,
|
||||
and also because we want to show the changed status in the window's
|
||||
title bar.
|
||||
<H3>copy_cb()</H3>
|
||||
This callback function will call <A href=#Fl_Input.copy><TT>
|
||||
This callback function will call <A href=Fl_Input_.html#Fl_Input_.copy><TT>
|
||||
input->copy()</TT></A> to copy the currently selected text to the
|
||||
clipboard:
|
||||
<UL>
|
||||
@ -230,7 +230,7 @@ void find2_cb(void) {
|
||||
}
|
||||
</PRE>
|
||||
</UL>
|
||||
If the search string cannot be found we use the <A href=#fl_alert><TT>
|
||||
If the search string cannot be found we use the <A href="functions.html#fl_alert"><TT>
|
||||
fl_alert()</TT></A> convenience function to display a message to that
|
||||
effect.
|
||||
<H3>new_cb()</H3>
|
||||
|
@ -9,12 +9,12 @@ useful to know when programming.
|
||||
constants:
|
||||
<UL>
|
||||
<LI><TT>FL_MAJOR_VERSION</TT> - The major release number, currently 1. </LI>
|
||||
<LI><TT>FL_MINOR_VERSION</TT> - The minor release number, currently 0. </LI>
|
||||
<LI><TT>FL_MINOR_VERSION</TT> - The minor release number, currently 1. </LI>
|
||||
<LI><TT>FL_PATCH_VERSION</TT> - The patch release number, currently 0. </LI>
|
||||
<LI><TT>FL_VERSION</TT> - A combined floating-point version number for
|
||||
the major and minor release numbers, currently 1.0. </LI>
|
||||
the major, minor, and patch release numbers, currently 1.0100. </LI>
|
||||
</UL>
|
||||
<H2>Events</H2>
|
||||
<H2><A NAME="events">Events</A></H2>
|
||||
Events are identified by an <TT>Fl_Event</TT> enumeration value. The
|
||||
following events are currently defined:
|
||||
<UL>
|
||||
|
@ -9,7 +9,7 @@ a key, an event is generated and sent to your application. Events can also
|
||||
come from other programs like the window manager.
|
||||
|
||||
<P>Events are identified by the integer argument passed to the
|
||||
<A href=functions.html#handle> <TT>Fl_Widget::handle()</TT></A> virtual
|
||||
<A href="subclassing.html#handle"> <TT>Fl_Widget::handle()</TT></A> virtual
|
||||
method. Other information about the most recent event is stored in
|
||||
static locations and acquired by calling the <A
|
||||
href=#event_xxx><TT>Fl::event_*()</TT></A> methods. This static
|
||||
@ -20,28 +20,28 @@ method).
|
||||
<H2>Mouse Events</H2>
|
||||
<H3>FL_PUSH</H3>
|
||||
A mouse button has gone down with the mouse pointing at this widget.
|
||||
You can find out what button by calling <A href=#event_button><TT>
|
||||
You can find out what button by calling <A href="functions.html#event_button"><TT>
|
||||
Fl::event_button()</TT></A>. You find out the mouse position by
|
||||
calling <A href=#event_x><TT>Fl::event_x()</TT></A> and <A href=functions.html#event_y>
|
||||
calling <A href="functions.html#event_x"><TT>Fl::event_x()</TT></A> and <A href="functions.html#event_y">
|
||||
<TT>Fl::event_y()</TT></A>.
|
||||
<P>A widget indicates that it "wants" the mouse click by returning
|
||||
non-zero from its <A href=functions.html#handle><TT>handle()</TT></A>
|
||||
method. It will then become the <A href=functions.html#pushed><TT>
|
||||
non-zero from its <A href="subclassing.html#handle"><TT>handle()</TT></A>
|
||||
method. It will then become the <A href="functions.html#pushed"><TT>
|
||||
Fl::pushed()</TT></A> widget and will get <TT>FL_DRAG</TT> and the
|
||||
matching <TT>FL_RELEASE</TT> events. If <TT>handle()</TT> returns zero
|
||||
then FLTK will try sending the <TT>FL_PUSH</TT> to another widget. </P>
|
||||
<H3>FL_DRAG</H3>
|
||||
The mouse has moved with a button held down. The current button state is
|
||||
in <a href="#event_state"><tt>Fl::event_state()</tt></a>. The mouse position
|
||||
is in <a href="#event_x"><tt>Fl::event_x()</tt></a> and
|
||||
<a href="#event_y"><tt>Fl::event_y()</tt></a>.
|
||||
in <a href="functions.html#event_state"><tt>Fl::event_state()</tt></a>. The mouse position
|
||||
is in <a href="functions.html#event_x"><tt>Fl::event_x()</tt></a> and
|
||||
<a href="functions.html#event_y"><tt>Fl::event_y()</tt></a>.
|
||||
|
||||
<P>To receive <CODE>FL_DRAG</CODE> events you must also respond to the
|
||||
<CODE>FL_PUSH</CODE> and <CODE>FL_RELEASE</CODE> events.
|
||||
|
||||
<H3>FL_RELEASE</H3>
|
||||
A mouse button has been released. You can find out what button by
|
||||
calling <A href=#event_button><TT>Fl::event_button()</TT></A>.
|
||||
calling <A href="functions.html#event_button"><TT>Fl::event_button()</TT></A>.
|
||||
<H3>FL_MOVE</H3>
|
||||
The mouse has moved without any mouse buttons held down. This event
|
||||
is sent to the <A href="functions.html#belowmouse"><TT>Fl::belowmouse()</TT></A>
|
||||
@ -187,7 +187,7 @@ to leaf widgets. These procedures control those leaf widgets: </P>
|
||||
<LI><A href=functions.html#grab><TT>Fl::grab</TT></A></LI>
|
||||
<LI><A href=functions.html#modal><TT>Fl::modal</TT></A></LI>
|
||||
<LI><A href=functions.html#pushed><TT>Fl::pushed</TT></A></LI>
|
||||
<LI><A href=functions.html#release><TT>Fl::release</TT></A></LI>
|
||||
<LI><TT>Fl::release</TT></LI>
|
||||
<LI><A href=Fl_Widget.html#Fl_Widget.take_focus><TT>Fl_Widget::take_focus</TT></A>
|
||||
</LI>
|
||||
</UL>
|
||||
|
@ -661,7 +661,7 @@ easiest way is by typing Ctrl+j. </P>
|
||||
<H4>Label style (pull down menu)</H4>
|
||||
How to draw the label. Normal, shadowed, engraved, and embossed
|
||||
change the appearance of the text. "symbol" requires the label to
|
||||
start with an '@' sign to draw a named <A href=Labeltypes.html#symbols>
|
||||
start with an '@' sign to draw a named <A href="common.html#symbols">
|
||||
symbol</A>.
|
||||
<P>From this menu you can also pick <A href=drawing.html#images>
|
||||
"Image..."</A>. This lets you use the contents of a GIF, XPM, or
|
||||
|
@ -33,14 +33,14 @@ zero and leaves RGB unchanged.
|
||||
|
||||
<P>If you use the color chooser on an 8-bit screen, it will allocate
|
||||
all the available colors, leaving you no space to exactly represent the
|
||||
color the user picks! You can however use <A href=#fl_rectf><tt>
|
||||
color the user picks! You can however use <A href="drawing.html#fast"><tt>
|
||||
fl_rectf()</tt></A> to fill a region with a simulated color using
|
||||
dithering.
|
||||
|
||||
<h3><A name=fl_show_colormap>int fl_show_colormap(int oldcol)</A></h3>
|
||||
|
||||
<tt>fl_show_colormap()</tt> pops up a panel of the 256 colors you can
|
||||
access with <A href=#fl_color><tt>fl_color()</tt></A> and lets the user
|
||||
access with <A href="drawing.html#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
|
||||
the user types ESC or clicks outside the window.
|
||||
<P ALIGN=CENTER><IMG src="fl_show_colormap.gif" ALT="The fl_show_colormap dialog">
|
||||
@ -53,7 +53,7 @@ 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" ALT="The fl_message window.">
|
||||
|
||||
<h3><A name=fl_>void fl_alert(const char *, ...)</A></h3>
|
||||
<h3><A name="fl_alert">void fl_alert(const char *, ...)</A></h3>
|
||||
|
||||
Same as <tt>fl_message()</tt> except for the "!" symbol.
|
||||
<P ALIGN=CENTER><IMG src="fl_alert.gif" ALT="The fl_alert window">
|
||||
@ -585,7 +585,7 @@ FL_Left, FL_Up, FL_Right, FL_Down, FL_Shift_L, FL_Shift_R,
|
||||
FL_Control_L, FL_Control_R, FL_Caps_Lock, FL_Alt_L, FL_Alt_R,
|
||||
FL_Meta_L, FL_Meta_R, FL_Menu, FL_Num_Lock, FL_KP_Enter</tt>. Be
|
||||
careful not to confuse these with the very similar, but all-caps,
|
||||
symbols used by <A href=events.html#event_state><tt>Fl::event_state()</tt>
|
||||
symbols used by <A href="#event_state"><tt>Fl::event_state()</tt>
|
||||
</A>. </LI>
|
||||
</UL>
|
||||
|
||||
@ -631,7 +631,7 @@ after</I> the shift key is pressed or released.
|
||||
<h3><A name=event_text>char *Fl::event_text()</A></h3>
|
||||
|
||||
Returns the ASCII text (in the future this may be UTF-8) produced by
|
||||
the last <tt>FL_KEYBOARD</tt> or <tt>FL_PASTEM</tt> or possibly other
|
||||
the last <tt>FL_KEYBOARD</tt> or <tt>FL_PASTE</tt> or possibly other
|
||||
event. A zero-length string is returned for any keyboard function keys
|
||||
that do not produce text. This pointer points at a static buffer and is
|
||||
only valid until the next event is processed.
|
||||
@ -831,7 +831,7 @@ However the colors may flash as you move the cursor between windows.
|
||||
|
||||
<h3><A name=paste>static void Fl::paste(Fl_Widget *receiver)</A></h3>
|
||||
|
||||
Set things up so the receiver widget will be called with an <A href=#FL_PASTE>
|
||||
Set things up so the receiver widget will be called with an <A href="enumerations.html#events">
|
||||
<tt>FL_PASTE</tt></A> event some time in the future. The reciever
|
||||
should be prepared to be called <I>directly</I> by this, or for it to
|
||||
happen <I>later</I>, or possibly <I>not at all</I>. This allows the
|
||||
@ -1001,7 +1001,7 @@ specific labeltype.
|
||||
Test the current event, which must be an <tt>FL_KEYBOARD</tt> or <tt>
|
||||
FL_SHORTCUT</tt>, against a shortcut value (described in <A href=Fl_Button.html#Fl_Button.shortcut>
|
||||
<tt>Fl_Button</tt></A>). Returns non-zero if there is a match. Not to
|
||||
be confused with <A href=#Fl_Widge.test_shortcut><tt>
|
||||
be confused with <A href="subclassing.html#test_shortcut"><tt>
|
||||
Fl_Widget::test_shortcut()</tt></A>.
|
||||
|
||||
<h3><A name=visual>static int Fl::visual(int)</A></h3>
|
||||
@ -1017,7 +1017,7 @@ brain-dead notions.
|
||||
<UL>
|
||||
<LI><tt>Fl::visual(FL_RGB)</tt>
|
||||
<BR>Full/true color (if there are several depths FLTK chooses the
|
||||
largest). Do this if you use <A href=#fl_draw_image><tt>fl_draw_image</tt>
|
||||
largest). Do this if you use <A href="drawing.html#fl_draw_image"><tt>fl_draw_image</tt>
|
||||
</A> for much better (non-dithered) output.
|
||||
<BR> </LI>
|
||||
<LI><tt>Fl::visual(FL_RGB8)</tt>
|
||||
|
@ -88,7 +88,7 @@ foreign letter compose!</LI>
|
||||
</UL>
|
||||
<H2>Licensing</H2>
|
||||
FLTK comes with complete free source code. FLTK is available under the
|
||||
terms of the <A href=#licensing>GNU Library General Public License</A>.
|
||||
terms of the <A href="license.html">GNU Library General Public License</A>.
|
||||
Contrary to popular belief, it can be used in commercial software!
|
||||
(Even Bill Gates could use it.)
|
||||
<H2>What Does "FLTK" Mean?</H2>
|
||||
|
@ -21,7 +21,7 @@ To make a subclass of Fl_Gl_Window, you must provide:
|
||||
<UL>
|
||||
<LI>A class definition. </LI>
|
||||
<LI>A <TT>draw()</TT> method. </LI>
|
||||
<LI>A <TT>handle()</TT> method (if you need to recieve input from the
|
||||
<LI>A <TT>handle()</TT> method (if you need to receive input from the
|
||||
user). </LI>
|
||||
</UL>
|
||||
If your subclass provides static controls in the window, they must be
|
||||
@ -142,7 +142,7 @@ the FLUID output file will compile. </LI>
|
||||
You must put <TT>glwindow->show()</TT> in your main code after calling <TT>
|
||||
show()</TT> on the window containing the OpenGL window.
|
||||
<H2>Using OpenGL in Normal FLTK Windows</H2>
|
||||
You can put OpenGL code into an <A href=#draw><TT>Fl_Widget::draw()</TT>
|
||||
You can put OpenGL code into an <A href="subclassing.html#draw"><TT>Fl_Widget::draw()</TT>
|
||||
</A> method or into the code for a <A href=common.html#boxtypes>boxtype</A>
|
||||
or other places with some care.
|
||||
<P>Most importantly, before you show <I>any</I> windows (including those
|
||||
@ -223,7 +223,7 @@ the current OpenGL font at the given position.
|
||||
<H4>void gl_draw(const char *, int x, int y, int w, int h, Fl_Align)</H4>
|
||||
Draw a string formatted into a box, with newlines and tabs expanded,
|
||||
other control characters changed to ^X, and aligned with the edges or
|
||||
center. Exactly the same output as <A href=#fl_draw><TT>fl_draw()</TT></A>
|
||||
center. Exactly the same output as <A href="drawing.html#text"><TT>fl_draw()</TT></A>
|
||||
.
|
||||
|
||||
|
||||
|
@ -48,7 +48,7 @@ until they complete. In particular if a callback pops up a modal
|
||||
window (by calling <A href=functions.html#fl_ask><TT>fl_ask()</TT></A>,
|
||||
for instance) it will not return until the modal function returns. </P>
|
||||
<H3>Drawing using Xlib</H3>
|
||||
The following global variables are set before <TT>Fl_Widget::draw()</TT>
|
||||
The following global variables are set before <A HREF="subclassing.html#draw"><TT>Fl_Widget::draw()</TT></A>
|
||||
is called, or by <A href=Fl_Window.html#Fl_Window.make_current><TT>
|
||||
Fl_Window::make_current()</TT></A>:
|
||||
<UL>
|
||||
@ -75,12 +75,12 @@ Fl_Window</TT> being drawn.
|
||||
<H4><A name=fl_xpixel>unsigned long fl_xpixel(Fl_Color i)
|
||||
<BR> unsigned long fl_xpixel(uchar r, uchar g, uchar b)</A></H4>
|
||||
Returns the X pixel number used to draw the given FLTK color index or
|
||||
RGB color. This is the X pixel that <A href=#fl_color><TT>fl_color()</TT>
|
||||
RGB color. This is the X pixel that <A href="drawing.html#fl_color"><TT>fl_color()</TT>
|
||||
</A> would use.
|
||||
<H4><A name=fl_xfont>extern XFontStruct *fl_xfont</A></H4>
|
||||
Points at the font selected by the most recent <A href=drawing.html#fl_font>
|
||||
<TT>fl_font()</TT></A>. This is not necessarily the current font of <TT>
|
||||
fl_gc</TT>, which is not set until <A href=#fl_draw><TT>fl_draw()</TT></A>
|
||||
fl_gc</TT>, which is not set until <A href="drawing.html#text"><TT>fl_draw()</TT></A>
|
||||
is called.
|
||||
<H3>Changing the Display, Screen, or X Visual</H3>
|
||||
FLTK uses only a single display, screen, X visual, and X colormap.
|
||||
@ -296,7 +296,7 @@ shown()</TT>.
|
||||
handle, or <TT>NULL</TT> if not found. This uses a cache so it is
|
||||
slightly faster than iterating through the windows yourself.
|
||||
<H3>Drawing Things Using the WIN32 GDI</H3>
|
||||
When the virtual function <TT>Fl_Widget::draw()</TT> is called, FLTK
|
||||
When the virtual function <A HREF="subclassing.html#draw"><TT>Fl_Widget::draw()</TT></A> is called, FLTK
|
||||
has stashed in some global variables all the silly extra arguments you
|
||||
need to make a proper GDI call. These are:
|
||||
<UL>
|
||||
|
@ -164,7 +164,7 @@ Look through the header files for <TT>FL_RESERVED_TYPE</TT> to find an
|
||||
unused number. If you make a subclass of <TT>Fl_Window</TT>
|
||||
you must use <TT>FL_WINDOW + n</TT> (<TT>n</tt> must be in the
|
||||
range 1 to 7). </P>
|
||||
<H2>Handling Events</H2>
|
||||
<H2><A NAME="handle">Handling Events</A></H2>
|
||||
The virtual method <TT>int Fl_Widget::handle(int event)</TT> is called
|
||||
to handle each event passed to the widget. It can:
|
||||
<UL>
|
||||
@ -173,7 +173,7 @@ to handle each event passed to the widget. It can:
|
||||
</A> if the widget needs to be redisplayed. </LI>
|
||||
<LI>Call <A href=Fl_Widget.html#Fl_Widget.damage><TT>
|
||||
Fl_Widget::damage(n)</TT></A> if the widget needs a partial-update
|
||||
(assumming you provide support for this in your <TT>Fl_Widget::draw()</TT>
|
||||
(assuming you provide support for this in your <A HREF="#draw"><TT>Fl_Widget::draw()</TT></A>
|
||||
method). </LI>
|
||||
<LI>Call <A href=Fl_Widget.html#Fl_Widget.do_callback><TT>
|
||||
Fl_Widget::do_callback()</TT></A> if a callback should be generated. </LI>
|
||||
@ -226,7 +226,7 @@ int MyClass::handle(int event) {
|
||||
You must return non-zero if your <TT>handle()</TT> method uses the
|
||||
event. If you return zero it indicates to the parent widget that it can
|
||||
try sending the event to another widget.
|
||||
<H2>Drawing the Widget</H2>
|
||||
<H2><A NAME="draw">Drawing the Widget</A></H2>
|
||||
The <TT>draw()</TT> virtual method is called when FLTK wants you to
|
||||
redraw your widget. It will be called if and only if <TT>damage()</TT>
|
||||
is non-zero, and <TT>damage()</TT> will be cleared to zero after it
|
||||
@ -366,7 +366,7 @@ may be UTF-8) between applications:
|
||||
<UL>
|
||||
<LI><A href=functions.html#paste><TT>Fl::paste</TT></A></LI>
|
||||
<LI><A href=functions.html#selection><TT>Fl::selection</TT></A></LI>
|
||||
<LI><A href=#selection_length><TT>Fl::selection_length</TT></A></LI>
|
||||
<LI><A href=functions.html#selection_length><TT>Fl::selection_length</TT></A></LI>
|
||||
<LI><A href=functions.html#selection_owner><TT>Fl::selection_owner</TT></A></LI>
|
||||
</UL>
|
||||
It may be possible to cut/paste non-text data by using <A href=osissues.html#add_handler>
|
||||
|
Loading…
Reference in New Issue
Block a user