FLTK 1.3.0
Fl_Tabs.H
00001 //
00002 // "$Id$"
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 
00053 class FL_EXPORT Fl_Tabs : public Fl_Group {
00054   Fl_Widget *value_;
00055   Fl_Widget *push_;
00056   int *tab_pos;         // array of x-offsets of tabs per child + 1
00057   int *tab_width;       // array of widths of tabs per child + 1
00058   int tab_count;        // array size
00059   int tab_positions();  // allocate and calculate tab positions
00060   void clear_tab_positions();
00061   int tab_height();
00062   void draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int sel=0);
00063 protected:
00064   void redraw_tabs();
00065   void draw();
00066 
00067 public:
00068   int handle(int);
00069   Fl_Widget *value();
00070   int value(Fl_Widget *);
00071   Fl_Widget *push() const {return push_;}
00072   int push(Fl_Widget *);
00073   Fl_Tabs(int,int,int,int,const char * = 0);
00074   Fl_Widget *which(int event_x, int event_y);
00075   ~Fl_Tabs();
00076   void client_area(int &rx, int &ry, int &rw, int &rh, int tabh=0);
00077 };
00078 
00079 #endif
00080 
00081 //
00082 // End of "$Id$".
00083 //