diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2022-12-15 16:46:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-15 16:46:40 +0100 |
| commit | 44a2547394a3b4f8b0177c2f33aa8ed47a2c1051 (patch) | |
| tree | d0611bedf1be051c9e5b2183314bc7e17648c5ad /test/flex_demo.cxx | |
| parent | 2fd1866f492daa4caa7fdad6c05cd34bc79ba913 (diff) | |
Rename some Fl_Flex methods for FLTK compliance (#594)
Change some method names to comply with FLTK style as discussed
in fltk.coredev, thread "Fl_Flex method name question".
* Rename Fl_Flex::margins(...) to Fl_Flex::margin(...)
(use singular form for all margin related methods)
* Remove Fl_Flex::setSize() and isSetSize() "backwards compatibility" methods
* Rename Fl_Flex::set_size(...) to fixed(...)
Note: the latter affects existing (pre-release) fluid (.fl) files: you may
want to edit and replace "set_size_tuples" with "fixed_size_tuples"
Diffstat (limited to 'test/flex_demo.cxx')
| -rw-r--r-- | test/flex_demo.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/flex_demo.cxx b/test/flex_demo.cxx index 67726910a..811a34def 100644 --- a/test/flex_demo.cxx +++ b/test/flex_demo.cxx @@ -95,8 +95,8 @@ Fl_Flex *create_row() { col2->color(fl_rgb_color(255, 128, 128)); } - row->set_size(box2, 50); - row->set_size(col2, 100); + row->fixed(box2, 50); + row->fixed(col2, 100); row->end(); // TEST @@ -128,7 +128,7 @@ int main(int argc, char **argv) { col1->end(); row1->end(); - col->set_size(create_row(), 90); // sets height of created (anonymous) row #2 + col->fixed(create_row(), 90); // sets height of created (anonymous) row #2 create_button("Something1"); // "row" #3 @@ -136,13 +136,13 @@ int main(int argc, char **argv) { Fl_Button *cancel = create_button("Cancel"); Fl_Button *ok = create_button("OK"); new Fl_Input(0, 0, 120, 10, ""); - row4->set_size(cancel, 100); - row4->set_size(ok, 100); + row4->fixed(cancel, 100); + row4->fixed(ok, 100); row4->end(); create_button("Something2"); // "row" #5 - col->set_size(row4, 30); + col->fixed(row4, 30); col->margin(6, 10, 6, 10); col->gap(6); col->end(); |
