source: rtems-graphics-toolkit/fltk-1.1.10/documentation/Fl_Tabs.html @ 513eea1

Last change on this file since 513eea1 was 513eea1, checked in by Joel Sherrill <joel.sherrill@…>, on 01/09/10 at 22:43:24

2010-01-08 Joel Sherrill <joel.sherrill@…>

fltk 1.1.10. imported

  • ORIGIN: Updated.
  • Property mode set to 100644
File size: 2.8 KB
Line 
1<HTML>
2<HEAD>
3        <TITLE>Fl_Tabs</TITLE>
4</HEAD>
5<BODY>
6
7<!-- NEW PAGE -->
8
9<H2><A name=Fl_Tabs>class Fl_Tabs</A></H2>
10
11<HR>
12
13<H3>Class Hierarchy</H3>
14
15<UL><PRE>
16<A href=Fl_Group.html#Fl_Group>Fl_Group</A>
17   |
18   +----<B>Fl_Tabs</B>
19</PRE></UL>
20
21<H3>Include Files</H3>
22
23<UL><PRE>
24#include &lt;FL/Fl_Tabs.H&gt;
25</PRE></UL>
26
27<H3>Description</H3>
28
29<P>The <TT>Fl_Tabs</TT> widget is the &quot;file card tabs&quot;
30interface that allows you to put lots and lots of buttons and
31switches in a panel, as popularized by many toolkits.
32
33<P ALIGN=CENTER><IMG src="tabs.gif" ALT="Fl_Tabs widget."></P>
34
35<P>Clicking the tab makes a child <TT>visible()</TT> by calling
36<TT>show()</TT> on it, and all other children are made invisible
37by calling <TT>hide()</TT> on them. Usually the children are <A
38href="Fl_Group.html#Fl_Group"><TT>Fl_Group</TT></A> widgets
39containing several widgets themselves.
40
41<P>Each child makes a card, and it's <TT>label()</TT> is printed
42on the card tab, including the label font and style.  The
43selection color of that child is used to color the tab, while
44the color of the child determines the background color of the
45pane.
46
47<P>The size of the tabs is controlled by the bounding box of the
48children (there should be some space between the children and
49the edge of the <TT>Fl_Tabs</TT>), and the tabs may be placed
50&quot;inverted&quot; on the bottom, this is determined by which
51gap is larger. It is easiest to lay this out in fluid, using the
52fluid browser to select each child group and resize them until
53the tabs look the way you want them to.
54
55<H3>Methods</H3>
56
57<UL>
58        <LI><A href="#Fl_Tabs.Fl_Tabs">Fl_Tabs</A></LI>
59        <LI><A href="#Fl_Tabs.~Fl_Tabs">~Fl_Tabs</A></LI>
60        <LI><A href="#Fl_Tabs.value">value</A></LI>
61</UL>
62
63<H4><A name="Fl_Tabs.Fl_Tabs">Fl_Tabs::Fl_Tabs(int x, int y, int w, int h,
64const char *label = 0)</A></H4>
65
66<P>Creates a new <TT>Fl_Tabs</TT> widget using the given position, size,
67and label string. The default boxtype is <TT>FL_THIN_UP_BOX</TT>.
68
69<P>Use <A href="Fl_Group.html#Fl_Group.add"><TT>add(Fl_Widget
70*)</TT></A> to add each child, which are usually
71<TT>Fl_Group</TT> widgets. The children should be sized to stay
72away from the top or bottom edge of the <TT>Fl_Tabs</TT> widget,
73which is where the tabs will be drawn.
74
75<H4><A name="Fl_Tabs.~Fl_Tabs">virtual Fl_Tabs::~Fl_Tabs()</A></H4>
76
77<P>The destructor <I>also deletes all the children</I>. This
78allows a whole tree to be deleted at once, without having to
79keep a pointer to all the children in the user code. A kludge
80has been done so the <TT>Fl_Tabs</TT> and all of it's children
81can be automatic (local) variables, but you must declare the
82<TT>Fl_Tabs</TT> widget <I>first</I> so that it is destroyed
83last.
84
85<H4><A name="Fl_Tabs.value">Fl_Widget* Fl_Tabs::value()
86<BR>int Fl_Tabs::value(Fl_Widget*)</A></H4>
87
88<P>Gets or sets the currently visible widget/tab.
89
90</BODY>
91</HTML>
Note: See TracBrowser for help on using the repository browser.