// 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 #include #include #include class Splitter_Container : public Fl_Group { public: Splitter_Container(int x, int y, int w, int h, char *l = NULL) : Fl_Group(x, y, w, h, l) { box(FL_NO_BOX); // do not draw the background } }; class Fl_HSplitter : public Fl_Group { int hCtnl; // window coord's of the horzontal splitter int border; // splitter divider height int yPos; // window posn where divider was last draw bool splitFl; // set if split cursor is enabled bool stretchTopFl; // set to make top container stretch when splitter is resized //int hh2; virtual void draw(); int handle(int e); public: Splitter_Container *c0, *c1; Fl_HSplitter(int x, int y, int w, int h, int h1, const char *l=NULL, bool stretchBotFl=false); virtual void resize(int x, int y, int w, int h); }; class Fl_VSplitter : public Fl_Group { int wCtn1, border, xPos; bool splitFl; void draw(); int handle(int e); public: Splitter_Container *c0, *c1; 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