diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-11-22 14:45:07 +0100 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2023-11-22 14:45:13 +0100 |
| commit | 81e26b9089f83a608768fdb39aa63f33ce169521 (patch) | |
| tree | e07955ac9c6299184f1a9e557174efd2b2ce2039 /test | |
| parent | 9383f172a88f847192e0082e080c0855316b794a (diff) | |
Adding size range settings to Fl_Tile, initial commit.
- some documentation missing
- Fl_Tile::resize() not satisfying yet
- minimums work, maximums currently ignored
- 0 size children may make program hang
Diffstat (limited to 'test')
| -rw-r--r-- | test/tile.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/tile.cxx b/test/tile.cxx index e8b1d6318..8d6ad9ed4 100644 --- a/test/tile.cxx +++ b/test/tile.cxx @@ -20,6 +20,7 @@ #include <FL/Fl_Box.H> // #define TEST_INACTIVE +// #define CLASSIC_MODE int main(int argc, char** argv) { Fl_Double_Window window(300, 300); @@ -27,19 +28,27 @@ int main(int argc, char** argv) { window.resizable(window); Fl_Tile tile(0, 0, 300, 300); +#ifndef CLASSIC_MODE + tile.init_size_range(30, 30); // all children's size shall be at least 30x30 +#endif // create the symmetrical resize box with dx and dy pixels distance, resp. // from the borders of the Fl_Tile widget before all other children +#ifdef CLASSIC_MODE int dx = 20, dy = dx; // border width of resizable() Fl_Box r(tile.x()+dx,tile.y()+dy,tile.w()-2*dx,tile.h()-2*dy); tile.resizable(r); +#endif Fl_Box box0(0,0,150,150,"0"); box0.box(FL_DOWN_BOX); box0.color(9); box0.labelsize(36); box0.align(FL_ALIGN_CLIP); +#ifndef CLASSIC_MODE + tile.resizable(&box0); +#endif Fl_Double_Window w1(150,0,150,150,"1"); w1.box(FL_NO_BOX); |
