Programmable real-time audio signal processing application
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

Fl_Splitter.h 1.5KB

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