1999-01-13 22:28:54 +03:00
|
|
|
<HTML><BODY>
|
2001-11-28 21:00:17 +03:00
|
|
|
<!-- NEW PAGE -->
|
1999-01-13 22:28:54 +03:00
|
|
|
<H2><A name=Fl_Tabs>class Fl_Tabs</A></H2>
|
|
|
|
<HR>
|
|
|
|
<H3>Class Hierarchy</H3>
|
|
|
|
<UL>
|
|
|
|
<PRE>
|
|
|
|
<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>
|
|
|
|
</PRE>
|
|
|
|
</UL>
|
|
|
|
<H3>Include Files</H3>
|
|
|
|
<UL>
|
|
|
|
<PRE>
|
1999-01-18 02:17:34 +03:00
|
|
|
#include <FL/Fl_Tabs.H>
|
1999-01-13 22:28:54 +03:00
|
|
|
</PRE>
|
|
|
|
</UL>
|
|
|
|
<H3>Description</H3>
|
2001-11-29 22:24:00 +03:00
|
|
|
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>
|
1999-01-13 22:28:54 +03:00
|
|
|
<P>Clicking the tab makes a child <TT>visible()</TT> (by calling <TT>
|
|
|
|
show()</TT> on it) and all other children are invisible (by calling <TT>
|
|
|
|
hide()</TT> on them). Usually the children are <A href=Fl_Group.html#Fl_Group>
|
2001-11-29 22:24:00 +03:00
|
|
|
<TT>Fl_Group</TT></A> widgets containing several widgets
|
1999-01-13 22:28:54 +03:00
|
|
|
themselves. </P>
|
2001-11-29 22:24:00 +03:00
|
|
|
<P>Each child makes a card, and it's <TT>label()</TT> is printed on the
|
|
|
|
card tab (including the label font and style). The color of that child
|
|
|
|
is used to color the card as well. Currently this only draws nicely if
|
|
|
|
you set <A href=Fl_Widget.html#Fl_Widget.box><TT>box()</TT></A> to the
|
|
|
|
default <TT>FL_THIN_UP_BOX</TT> or to <TT>FL_FLAT_BOX</TT>, which gets
|
1999-01-13 22:28:54 +03:00
|
|
|
rid of the edges drawn on the sides and bottom. </P>
|
2001-11-29 22:24:00 +03:00
|
|
|
<P>The size of the tabs is controlled by the bounding box of the
|
|
|
|
children (there should be some space between the children and the edge
|
|
|
|
of the <TT>Fl_Tabs</TT>), and the tabs may be placed "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
|
1999-01-13 22:28:54 +03:00
|
|
|
group and resize them until the tabs look the way you want them to. </P>
|
|
|
|
<H3>Methods</H3>
|
|
|
|
<UL>
|
2001-07-10 03:59:52 +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>
|
2001-11-29 22:24:00 +03: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>
|
2001-11-29 22:24:00 +03:00
|
|
|
Creates a new <TT>Fl_Tabs</TT> widget using the given position, size,
|
|
|
|
and label string. The default boxtype is <TT>FL_THIN_UP_BOX</TT>.
|
1999-01-13 22:28:54 +03:00
|
|
|
<P>Use <A href=Fl_Group.html#Fl_Group.add><TT>add(Fl_Widget *)</TT></A>
|
2001-11-29 22:24:00 +03:00
|
|
|
to add each child (which is probably itself a <TT>Fl_Group</TT>). The
|
|
|
|
children should be sized to stay away from the top or bottom edge of
|
1999-01-13 22:28:54 +03:00
|
|
|
the <TT>Fl_Tabs</TT>, which is where the tabs are drawn. </P>
|
2001-07-10 03:59:52 +04:00
|
|
|
<H4><A name=Fl_Tabs.~Fl_Tabs>virtual Fl_Tabs::~Fl_Tabs()</A></H4>
|
2001-11-29 22:24:00 +03:00
|
|
|
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
|
1999-01-13 22:28:54 +03:00
|
|
|
all the children in the user code. A kludge has been done so the <TT>
|
2001-11-29 22:24:00 +03:00
|
|
|
Fl_Tabs</TT> and all of it's children can be automatic (local)
|
|
|
|
variables, but you must declare the <TT>Fl_Tabs</TT><I>first</I>, so
|
|
|
|
that it is destroyed last.
|
2001-07-10 03:59:52 +04:00
|
|
|
<H4><A name=Fl_Tabs.value>Fl_Widget* Fl_Tabs::value() const
|
1999-01-13 22:28:54 +03:00
|
|
|
<BR> int Fl_Tabs::value(Fl_Widget*)</A></H4>
|
1999-01-15 01:14:01 +03:00
|
|
|
Gets or sets the currently visible widget/tab. </BODY></HTML>
|