FLTK 1.3.9
Loading...
Searching...
No Matches
Fl_Tabs.H
1//
2// "$Id$"
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
201class FL_EXPORT Fl_Tabs : public Fl_Group {
202#if FLTK_ABI_VERSION >= 10304
203 // NEW (nothing)
204#else
205 // OLD (maintained for ABI compat)
206 Fl_Widget *value_; // NOTE: this member no longer used -- STR #3169
207#endif
208 Fl_Widget *push_;
209 int *tab_pos; // array of x-offsets of tabs per child + 1
210 int *tab_width; // array of widths of tabs per child + 1
211 int tab_count; // array size
212 int tab_positions(); // allocate and calculate tab positions
213 void clear_tab_positions();
214 int tab_height();
215 void draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int sel=0);
216protected:
217 void redraw_tabs();
218 void draw();
219
220public:
221 int handle(int);
222 Fl_Widget *value();
223 int value(Fl_Widget *);
234 Fl_Widget *push() const {return push_;}
235 int push(Fl_Widget *);
236 Fl_Tabs(int,int,int,int,const char * = 0);
237 Fl_Widget *which(int event_x, int event_y);
238 ~Fl_Tabs();
239 void client_area(int &rx, int &ry, int &rw, int &rh, int tabh=0);
240};
241
242#endif
243
244//
245// End of "$Id$".
246//
The Fl_Group class is the FLTK container widget.
Definition Fl_Group.H:41
int handle(int)
Handles the specified event.
Definition Fl_Group.cxx:147
void draw()
Draws the widget.
Definition Fl_Group.cxx:738
The Fl_Tabs widget is the "file card tabs" interface that allows you to put lots and lots of buttons ...
Definition Fl_Tabs.H:201
Fl_Widget * push() const
Returns the tab group for the tab the user has currently down-clicked on and remains over until FL_RE...
Definition Fl_Tabs.H:234
Fl_Widget is the base class for all widgets in FLTK.
Definition Fl_Widget.H:101