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 <FL/Fl_Tabs.H> |
---|
25 | </PRE></UL> |
---|
26 | |
---|
27 | <H3>Description</H3> |
---|
28 | |
---|
29 | <P>The <TT>Fl_Tabs</TT> widget is the "file card tabs" |
---|
30 | interface that allows you to put lots and lots of buttons and |
---|
31 | switches 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 |
---|
37 | by calling <TT>hide()</TT> on them. Usually the children are <A |
---|
38 | href="Fl_Group.html#Fl_Group"><TT>Fl_Group</TT></A> widgets |
---|
39 | containing several widgets themselves. |
---|
40 | |
---|
41 | <P>Each child makes a card, and it's <TT>label()</TT> is printed |
---|
42 | on the card tab, including the label font and style. The |
---|
43 | selection color of that child is used to color the tab, while |
---|
44 | the color of the child determines the background color of the |
---|
45 | pane. |
---|
46 | |
---|
47 | <P>The size of the tabs is controlled by the bounding box of the |
---|
48 | children (there should be some space between the children and |
---|
49 | the edge of the <TT>Fl_Tabs</TT>), and the tabs may be placed |
---|
50 | "inverted" on the bottom, this is determined by which |
---|
51 | gap is larger. It is easiest to lay this out in fluid, using the |
---|
52 | fluid browser to select each child group and resize them until |
---|
53 | the 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, |
---|
64 | const char *label = 0)</A></H4> |
---|
65 | |
---|
66 | <P>Creates a new <TT>Fl_Tabs</TT> widget using the given position, size, |
---|
67 | and 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 |
---|
72 | away from the top or bottom edge of the <TT>Fl_Tabs</TT> widget, |
---|
73 | which 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 |
---|
78 | allows a whole tree to be deleted at once, without having to |
---|
79 | keep a pointer to all the children in the user code. A kludge |
---|
80 | has been done so the <TT>Fl_Tabs</TT> and all of it's children |
---|
81 | can be automatic (local) variables, but you must declare the |
---|
82 | <TT>Fl_Tabs</TT> widget <I>first</I> so that it is destroyed |
---|
83 | last. |
---|
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> |
---|