NTK 1.3.0
Fl_Tabs.H
1//
2// "$Id: Fl_Tabs.H 8101 2010-12-22 13:06:03Z AlbrechtS $"
3//
4// Tab header file for the Fast Light Tool Kit (FLTK).
5//
6// Copyright 1998-2010 by Bill Spitzak and others.
7//
8// This library is free software; you can redistribute it and/or
9// modify it under the terms of the GNU Library General Public
10// License as published by the Free Software Foundation; either
11// version 2 of the License, or (at your option) any later version.
12//
13// This library is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16// Library General Public License for more details.
17//
18// You should have received a copy of the GNU Library General Public
19// License along with this library; if not, write to the Free Software
20// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21// USA.
22//
23// Please report all bugs and problems on the following page:
24//
25// http://www.fltk.org/str.php
26//
27
28/* \file
29 Fl_Tabs widget . */
30
31#ifndef Fl_Tabs_H
32#define Fl_Tabs_H
33
34#include "Fl_Group.H"
35
62class FL_EXPORT Fl_Tabs : public Fl_Group {
63 Fl_Widget *value_;
64 Fl_Widget *push_;
65 int *tab_pos; // array of x-offsets of tabs per child + 1
66 int *tab_width; // array of widths of tabs per child + 1
67 int tab_count; // array size
68 int tab_positions(); // allocate and calculate tab positions
69 void clear_tab_positions();
70 int tab_height();
71 void draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int sel=0);
72protected:
73 void redraw_tabs();
74 void draw();
75
76public:
77 int handle(int);
78 Fl_Widget *value();
79 int value(Fl_Widget *);
80 Fl_Widget *push() const {return push_;}
81 int push(Fl_Widget *);
82 Fl_Tabs(int,int,int,int,const char * = 0);
83 Fl_Widget *which(int event_x, int event_y);
84 ~Fl_Tabs();
85 void client_area(int &rx, int &ry, int &rw, int &rh, int tabh=0);
86};
87
88#endif
89
90//
91// End of "$Id: Fl_Tabs.H 8101 2010-12-22 13:06:03Z AlbrechtS $".
92//
int handle(int)
Handles the specified event.
Definition Fl_Group.cxx:150
void draw()
Draws the widget.
Definition Fl_Group.cxx:742
void client_area(int &rx, int &ry, int &rw, int &rh, int tabh=0)
Returns the position and size available to be used by its children.
Definition Fl_Tabs.cxx:484
Fl_Widget * value()
Gets the currently visible widget/tab.
Definition Fl_Tabs.cxx:284
Fl_Tabs(int, int, int, int, const char *=0)
Creates a new Fl_Tabs widget using the given position, size, and label string.
Definition Fl_Tabs.cxx:447