1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- // Code based on: http://www.mail-archive.com/fltk@easysw.com/msg04573.html
- // Lucas Sanner/Ian MacArthur
-
- #ifndef Fl_Splitter_h
- #define Fl_Splitter_h
-
- #include <FL/Fl.H>
- #include <FL/Fl_Group.H>
- #include <FL/Fl_Box.H>
- #include <FL/fl_draw.H>
-
-
- class Splitter_Container : public Fl_Group
- {
- void draw()
- {
- fl_push_clip(x(), y(), w(), h());
- Fl_Group::draw();
- fl_pop_clip();
- }
-
- public:
-
- Splitter_Container(int x, int y, int w, int h, char *l = NULL)
- : Fl_Group(x, y, w, h, l)
- {
- //box(FL_DOWN_BOX);
- }
- };
-
- class Fl_HSplitter : public Fl_Group
- {
- int hCtnl, border, yPos;
- bool bSplit;
- bool stretchTopFl; // set to make top container stretch when splitter is resized
- int hh2;
-
- void draw();
-
- int handle(int e);
-
- public:
-
- Splitter_Container *container1, *container2;
-
- Fl_HSplitter(int x, int y, int w, int h, int h1, const char *l=NULL, bool stretchBotFl=false);
-
- void resize_splitter(int x, int y, int w, int h);
-
- };
-
-
- class Fl_VSplitter : public Fl_Group
- {
-
- int wCtn1, border, xPos;
- bool bSplit;
-
- void draw();
- int handle(int e);
-
- public:
-
- Splitter_Container *container1, *container2;
-
- Fl_VSplitter(int x, int y, int w, int h, const char *l = NULL);
-
- void resize_splitter(int x, int y, int w, int h);
-
-
-
- };
-
- #endif
|