Flmm_Tabs.H 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //
  2. // "$Id$"
  3. //
  4. // Flmm_Tabs header file for the FLMM extension to FLTK.
  5. //
  6. // Copyright 2002-2004 by Matthias Melcher.
  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 to "[email protected]".
  24. //
  25. #ifndef Flmm_Tabs_H
  26. #define Flmm_Tabs_H
  27. #include <FL/Fl_Tabs.H>
  28. struct Fl_Menu_Item;
  29. class FL_EXPORT Flmm_Tabs : public Fl_Tabs {
  30. int xoff;
  31. int leftmost, rightmost;
  32. int *tab_position_array, *tab_width_array, array_size;
  33. char overlapping;
  34. void allocate_arrays();
  35. protected:
  36. char create_menu(Fl_Menu_Item *&menu, Fl_Menu_Item *&picked);
  37. void draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int sel=0);
  38. int tab_positions(int*, int*);
  39. int tab_height();
  40. int handle(int);
  41. void draw();
  42. public:
  43. Flmm_Tabs(int x, int y, int w, int h, const char *l=0);
  44. ~Flmm_Tabs();
  45. Fl_Widget *which(int event_x, int event_y);
  46. };
  47. #endif
  48. //
  49. // End of "$Id: Fl_Tabs.H 4288 2005-04-16 00:13:17Z mike $".
  50. //