Programmable real-time audio signal processing application
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Fl_Splitter.h 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. // Code based on: http://www.mail-archive.com/fltk@easysw.com/msg04573.html
  2. // Lucas Sanner/Ian MacArthur
  3. #ifndef Fl_Splitter_h
  4. #define Fl_Splitter_h
  5. #include <FL/Fl.H>
  6. #include <FL/Fl_Group.H>
  7. #include <FL/Fl_Box.H>
  8. #include <FL/fl_draw.H>
  9. class Splitter_Container : public Fl_Group
  10. {
  11. public:
  12. Splitter_Container(int x, int y, int w, int h, char *l = NULL)
  13. : Fl_Group(x, y, w, h, l)
  14. {
  15. box(FL_NO_BOX); // do not draw the background
  16. }
  17. };
  18. class Fl_HSplitter : public Fl_Group
  19. {
  20. int hCtnl; // window coord's of the horzontal splitter
  21. int border; // splitter divider height
  22. int yPos; // window posn where divider was last draw
  23. bool splitFl; // set if split cursor is enabled
  24. bool stretchTopFl; // set to make top container stretch when splitter is resized
  25. //int hh2;
  26. virtual void draw();
  27. int handle(int e);
  28. public:
  29. Splitter_Container *c0, *c1;
  30. Fl_HSplitter(int x, int y, int w, int h, int h1, const char *l=NULL, bool stretchBotFl=false);
  31. virtual void resize(int x, int y, int w, int h);
  32. };
  33. class Fl_VSplitter : public Fl_Group
  34. {
  35. int wCtn1, border, xPos;
  36. bool splitFl;
  37. void draw();
  38. int handle(int e);
  39. public:
  40. Splitter_Container *c0, *c1;
  41. Fl_VSplitter(int x, int y, int w, int h, const char *l = NULL);
  42. void resize_splitter(int x, int y, int w, int h);
  43. };
  44. #endif