Programmable real-time audio signal processing application
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

Fl_Splitter.h 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. void draw()
  12. {
  13. fl_push_clip(x(), y(), w(), h());
  14. Fl_Group::draw();
  15. fl_pop_clip();
  16. }
  17. public:
  18. Splitter_Container(int x, int y, int w, int h, char *l = NULL)
  19. : Fl_Group(x, y, w, h, l)
  20. {
  21. //box(FL_DOWN_BOX);
  22. }
  23. };
  24. class Fl_HSplitter : public Fl_Group
  25. {
  26. int hCtnl, border, yPos;
  27. bool bSplit;
  28. bool stretchTopFl; // set to make top container stretch when splitter is resized
  29. int hh2;
  30. void draw();
  31. int handle(int e);
  32. public:
  33. Splitter_Container *container1, *container2;
  34. Fl_HSplitter(int x, int y, int w, int h, int h1, const char *l=NULL, bool stretchBotFl=false);
  35. void resize_splitter(int x, int y, int w, int h);
  36. };
  37. class Fl_VSplitter : public Fl_Group
  38. {
  39. int wCtn1, border, xPos;
  40. bool bSplit;
  41. void draw();
  42. int handle(int e);
  43. public:
  44. Splitter_Container *container1, *container2;
  45. Fl_VSplitter(int x, int y, int w, int h, const char *l = NULL);
  46. void resize_splitter(int x, int y, int w, int h);
  47. };
  48. #endif