123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- //| Copyright: (C) 2019-2020 Kevin Larke <contact AT larke DOT org>
- //| License: GNU GPL version 3.0 or above. See the accompanying LICENSE file.
- // 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
- {
-
- 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
|