FLTK 1.3.2
Fl_Tabs.H
1 //
2 // "$Id: Fl_Tabs.H 9955 2013-08-05 18:21:58Z greg.ercolano $"
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. Distribution and use rights are outlined in
9 // the file "COPYING" which should have been included with this file. If this
10 // file is missing or damaged, see the license at:
11 //
12 // http://www.fltk.org/COPYING.php
13 //
14 // Please report all bugs and problems on the following page:
15 //
16 // http://www.fltk.org/str.php
17 //
18 
19 /* \file
20  Fl_Tabs widget . */
21 
22 #ifndef Fl_Tabs_H
23 #define Fl_Tabs_H
24 
25 #include "Fl_Group.H"
26 
115 class FL_EXPORT Fl_Tabs : public Fl_Group {
116  Fl_Widget *value_;
117  Fl_Widget *push_;
118  int *tab_pos; // array of x-offsets of tabs per child + 1
119  int *tab_width; // array of widths of tabs per child + 1
120  int tab_count; // array size
121  int tab_positions(); // allocate and calculate tab positions
122  void clear_tab_positions();
123  int tab_height();
124  void draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int sel=0);
125 protected:
126  void redraw_tabs();
127  void draw();
128 
129 public:
130  int handle(int);
131  Fl_Widget *value();
132  int value(Fl_Widget *);
143  Fl_Widget *push() const {return push_;}
144  int push(Fl_Widget *);
145  Fl_Tabs(int,int,int,int,const char * = 0);
146  Fl_Widget *which(int event_x, int event_y);
147  ~Fl_Tabs();
148  void client_area(int &rx, int &ry, int &rw, int &rh, int tabh=0);
149 };
150 
151 #endif
152 
153 //
154 // End of "$Id: Fl_Tabs.H 9955 2013-08-05 18:21:58Z greg.ercolano $".
155 //