summaryrefslogtreecommitdiff
path: root/src/Fl_Tabs.cxx
diff options
context:
space:
mode:
authorFabien Costantini <fabien@onepost.net>2008-09-14 15:45:27 +0000
committerFabien Costantini <fabien@onepost.net>2008-09-14 15:45:27 +0000
commitce4d0fd5d86a1f725aba6093d9674b993d437d6c (patch)
tree4839ae652332f4ec80de23a21fb0ddd702a20330 /src/Fl_Tabs.cxx
parent7f4e2867e84826d237e48f01f25de168cfdb986b (diff)
Doxygen Documentation WP4 Done. Has all documentation content but should be completed in increment 2. Registered for WP5.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6239 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Tabs.cxx')
-rw-r--r--src/Fl_Tabs.cxx36
1 files changed, 30 insertions, 6 deletions
diff --git a/src/Fl_Tabs.cxx b/src/Fl_Tabs.cxx
index 7260de4df..623e3d3cf 100644
--- a/src/Fl_Tabs.cxx
+++ b/src/Fl_Tabs.cxx
@@ -25,6 +25,7 @@
// http://www.fltk.org/str.php
//
+
// This is the "file card tabs" interface to allow you to put lots and lots
// of buttons and switches in a panel, as popularized by many toolkits.
@@ -248,10 +249,13 @@ int Fl_Tabs::push(Fl_Widget *o) {
return 1;
}
-// The value() is the first visible child (or the last child if none
-// are visible) and this also hides any other children.
-// This allows the tabs to be deleted, moved to other groups, and
-// show()/hide() called without it screwing up.
+/**
+ Gets the currently visible widget/tab.
+ The value() is the first visible child (or the last child if none
+ are visible) and this also hides any other children.
+ This allows the tabs to be deleted, moved to other groups, and
+ show()/hide() called without it screwing up.
+*/
Fl_Widget* Fl_Tabs::value() {
Fl_Widget* v = 0;
Fl_Widget*const* a = array();
@@ -264,8 +268,11 @@ Fl_Widget* Fl_Tabs::value() {
return v;
}
-// Setting the value hides all other children, and makes this one
-// visible, iff it is really a child:
+/**
+ Sets the widget to become the current visible widget/tab.
+ Setting the value hides all other children, and makes this one
+ visible, if it is really a child.
+*/
int Fl_Tabs::value(Fl_Widget *newvalue) {
Fl_Widget*const* a = array();
int ret = 0;
@@ -391,6 +398,23 @@ void Fl_Tabs::draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int what) {
fl_draw_shortcut = prev_draw_shortcut;
}
+/**
+ Creates a new Fl_Tabs widget using the given position, size,
+ and label string. The default boxtype is FL_THIN_UP_BOX.
+
+ <P>Use add(Fl_Widget
+ *) to add each child, which are usually
+ Fl_Group widgets. The children should be sized to stay
+ away from the top or bottom edge of the Fl_Tabs widget,
+ which is where the tabs will be drawn.
+
+ <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 Fl_Tabs and all of it's children
+ can be automatic (local) variables, but you must declare the
+ Fl_Tabs widget <I>first</I> so that it is destroyed last.
+*/
Fl_Tabs::Fl_Tabs(int X,int Y,int W, int H, const char *l) :
Fl_Group(X,Y,W,H,l)
{