diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-11-23 17:19:15 +0100 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2023-11-23 17:19:20 +0100 |
| commit | 0beab855a053275b41368d3f32cddd2d6389ca2c (patch) | |
| tree | 7d55d70b540d5cdab8461fa3366bf262e1f2ebd1 /test | |
| parent | b6be421a1f2e512f22080cb3b86a8f3a7aa61306 (diff) | |
Stabilizes Fl_Tile size_range mode.
- improved documentation
- new tile resize strategy
- robust against zero sized children
Diffstat (limited to 'test')
| -rw-r--r-- | test/tile.cxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/tile.cxx b/test/tile.cxx index 8d6ad9ed4..d5cb2439d 100644 --- a/test/tile.cxx +++ b/test/tile.cxx @@ -23,6 +23,31 @@ // #define CLASSIC_MODE int main(int argc, char** argv) { +#if 0 // Sample code form Fl_Tile documentation + Fl_Window win(400, 300, "My App"); + + Fl_Tile tile(0, 0, 400, 300); + + Fl_Box left_tool_box(0, 0, 100, 300, "Tools"); + left_tool_box.box(FL_DOWN_BOX); + tile.size_range(&left_tool_box, 50, 50); + + Fl_Box document(100, 0, 200, 300, "Document"); + document.box(FL_DOWN_BOX); + tile.size_range(&document, 100, 50); + + Fl_Box right_tool_box(300, 0, 100, 300, "More\nTools"); + right_tool_box.box(FL_DOWN_BOX); + tile.size_range(&right_tool_box, 50, 50); + + tile.end(); + tile.resizable(document); + + win.end(); + win.resizable(tile); + win.show(argc,argv); + win.size_range(200, 50); +#else Fl_Double_Window window(300, 300); window.box(FL_NO_BOX); window.resizable(window); @@ -97,5 +122,6 @@ int main(int argc, char** argv) { w1.show(); window.show(argc,argv); +#endif return Fl::run(); } |
