2002-07-25 16:46:12 +04:00
|
|
|
<HTML>
|
|
|
|
<BODY>
|
|
|
|
|
2001-11-28 21:00:17 +03:00
|
|
|
<!-- NEW PAGE -->
|
2002-07-25 16:46:12 +04:00
|
|
|
|
1999-01-13 22:28:54 +03:00
|
|
|
<H2><A name=Fl_Tabs>class Fl_Tabs</A></H2>
|
2002-07-25 16:46:12 +04:00
|
|
|
|
1999-01-13 22:28:54 +03:00
|
|
|
<HR>
|
2002-07-25 16:46:12 +04:00
|
|
|
|
1999-01-13 22:28:54 +03:00
|
|
|
<H3>Class Hierarchy</H3>
|
2002-07-25 16:46:12 +04:00
|
|
|
|
|
|
|
<UL><PRE>
|
1999-01-13 22:28:54 +03:00
|
|
|
<A href=Fl_Group.html#Fl_Group>Fl_Group</A>
|
1998-12-29 17:21:17 +03:00
|
|
|
|
|
1999-01-13 22:28:54 +03:00
|
|
|
+----<B>Fl_Tabs</B>
|
2002-07-25 16:46:12 +04:00
|
|
|
</PRE></UL>
|
|
|
|
|
1999-01-13 22:28:54 +03:00
|
|
|
<H3>Include Files</H3>
|
2002-07-25 16:46:12 +04:00
|
|
|
|
|
|
|
<UL><PRE>
|
1999-01-18 02:17:34 +03:00
|
|
|
#include <FL/Fl_Tabs.H>
|
2002-07-25 16:46:12 +04:00
|
|
|
</PRE></UL>
|
|
|
|
|
1999-01-13 22:28:54 +03:00
|
|
|
<H3>Description</H3>
|
2002-07-25 16:46:12 +04:00
|
|
|
|
|
|
|
<P>The <TT>Fl_Tabs</TT> widget is the "file card tabs"
|
|
|
|
interface that allows you to put lots and lots of buttons and
|
|
|
|
switches in a panel, as popularized by many toolkits.
|
|
|
|
|
2001-05-06 20:25:05 +04:00
|
|
|
<P ALIGN=CENTER><IMG src="tabs.gif" ALT="Fl_Tabs widget."></P>
|
2002-07-25 16:46:12 +04:00
|
|
|
|
|
|
|
<P>Clicking the tab makes a child <TT>visible()</TT> by calling
|
|
|
|
<TT>show()</TT> on it, and all other children are made invisible
|
|
|
|
by calling <TT>hide()</TT> on them. Usually the children are <A
|
|
|
|
href="Fl_Group.html#Fl_Group"><TT>Fl_Group</TT></A> widgets
|
|
|
|
containing several widgets themselves.
|
|
|
|
|
|
|
|
<P>Each child makes a card, and it's <TT>label()</TT> is printed
|
|
|
|
on the card tab, including the label font and style. The
|
|
|
|
selection color of that child is used to color the tab, while
|
|
|
|
the color of the child determines the background color of the
|
|
|
|
pane.
|
|
|
|
|
2001-11-29 22:24:00 +03:00
|
|
|
<P>The size of the tabs is controlled by the bounding box of the
|
2002-07-25 16:46:12 +04:00
|
|
|
children (there should be some space between the children and
|
|
|
|
the edge of the <TT>Fl_Tabs</TT>), and the tabs may be placed
|
|
|
|
"inverted" on the bottom, this is determined by which
|
|
|
|
gap is larger. It is easiest to lay this out in fluid, using the
|
|
|
|
fluid browser to select each child group and resize them until
|
|
|
|
the tabs look the way you want them to.
|
|
|
|
|
1999-01-13 22:28:54 +03:00
|
|
|
<H3>Methods</H3>
|
2002-07-25 16:46:12 +04:00
|
|
|
|
1999-01-13 22:28:54 +03:00
|
|
|
<UL>
|
2002-07-25 16:46:12 +04:00
|
|
|
<LI><A href="#Fl_Tabs.Fl_Tabs">Fl_Tabs</A></LI>
|
|
|
|
<LI><A href="#Fl_Tabs.~Fl_Tabs">~Fl_Tabs</A></LI>
|
|
|
|
<LI><A href="#Fl_Tabs.value">value</A></LI>
|
1999-01-13 22:28:54 +03:00
|
|
|
</UL>
|
2002-07-25 16:46:12 +04:00
|
|
|
|
|
|
|
<H4><A name="Fl_Tabs.Fl_Tabs">Fl_Tabs::Fl_Tabs(int x, int y, int w, int h,
|
1999-01-13 22:28:54 +03:00
|
|
|
const char *label = 0)</A></H4>
|
2002-07-25 16:46:12 +04:00
|
|
|
|
|
|
|
<P>Creates a new <TT>Fl_Tabs</TT> widget using the given position, size,
|
2001-11-29 22:24:00 +03:00
|
|
|
and label string. The default boxtype is <TT>FL_THIN_UP_BOX</TT>.
|
2002-07-25 16:46:12 +04:00
|
|
|
|
|
|
|
<P>Use <A href="Fl_Group.html#Fl_Group.add"><TT>add(Fl_Widget
|
|
|
|
*)</TT></A> to add each child, which are usually
|
|
|
|
<TT>Fl_Group</TT> widgets. The children should be sized to stay
|
|
|
|
away from the top or bottom edge of the <TT>Fl_Tabs</TT> widget,
|
|
|
|
which is where the tabs will be drawn.
|
|
|
|
|
|
|
|
<H4><A name="Fl_Tabs.~Fl_Tabs">virtual Fl_Tabs::~Fl_Tabs()</A></H4>
|
|
|
|
|
|
|
|
<P>The destructor <I>also deletes all the children</I>. This
|
|
|
|
allows a whole tree to be deleted at once, without having to
|
|
|
|
keep a pointer to all the children in the user code. A kludge
|
|
|
|
has been done so the <TT>Fl_Tabs</TT> and all of it's children
|
|
|
|
can be automatic (local) variables, but you must declare the
|
|
|
|
<TT>Fl_Tabs</TT> widget <I>first</I> so that it is destroyed
|
|
|
|
last.
|
|
|
|
|
|
|
|
<H4><A name="Fl_Tabs.value">Fl_Widget* Fl_Tabs::value() const
|
|
|
|
<BR>int Fl_Tabs::value(Fl_Widget*)</A></H4>
|
|
|
|
|
|
|
|
<P>Gets or sets the currently visible widget/tab.
|
|
|
|
|
|
|
|
</BODY>
|
|
|
|
</HTML>
|