|
FLTK 1.3.2
|
00001 // 00002 // "$Id: Fl_Tabs.H 9867 2013-04-08 20:18:40Z greg.ercolano $" 00003 // 00004 // Tab header file for the Fast Light Tool Kit (FLTK). 00005 // 00006 // Copyright 1998-2010 by Bill Spitzak and others. 00007 // 00008 // This library is free software. Distribution and use rights are outlined in 00009 // the file "COPYING" which should have been included with this file. If this 00010 // file is missing or damaged, see the license at: 00011 // 00012 // http://www.fltk.org/COPYING.php 00013 // 00014 // Please report all bugs and problems on the following page: 00015 // 00016 // http://www.fltk.org/str.php 00017 // 00018 00019 /* \file 00020 Fl_Tabs widget . */ 00021 00022 #ifndef Fl_Tabs_H 00023 #define Fl_Tabs_H 00024 00025 #include "Fl_Group.H" 00026 00096 class FL_EXPORT Fl_Tabs : public Fl_Group { 00097 Fl_Widget *value_; 00098 Fl_Widget *push_; 00099 int *tab_pos; // array of x-offsets of tabs per child + 1 00100 int *tab_width; // array of widths of tabs per child + 1 00101 int tab_count; // array size 00102 int tab_positions(); // allocate and calculate tab positions 00103 void clear_tab_positions(); 00104 int tab_height(); 00105 void draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int sel=0); 00106 protected: 00107 void redraw_tabs(); 00108 void draw(); 00109 00110 public: 00111 int handle(int); 00112 Fl_Widget *value(); 00113 int value(Fl_Widget *); 00124 Fl_Widget *push() const {return push_;} 00125 int push(Fl_Widget *); 00126 Fl_Tabs(int,int,int,int,const char * = 0); 00127 Fl_Widget *which(int event_x, int event_y); 00128 ~Fl_Tabs(); 00129 void client_area(int &rx, int &ry, int &rw, int &rh, int tabh=0); 00130 }; 00131 00132 #endif 00133 00134 // 00135 // End of "$Id: Fl_Tabs.H 9867 2013-04-08 20:18:40Z greg.ercolano $". 00136 //