diff --git a/LATEST_RELEASE_NOTES.md b/LATEST_RELEASE_NOTES.md index 698ae8b..337441d 100644 --- a/LATEST_RELEASE_NOTES.md +++ b/LATEST_RELEASE_NOTES.md @@ -21,4 +21,6 @@ Other changes: * [#89](../../issues/89) Change stack to sizer * [#92](../../issues/92) Need a Bitmap * [#95](../../issues/95) Text needs to customize font +* [#104](../../issues/104) Proxy objects +* [#108](../../issues/108) make attachToAndFit the default diff --git a/README.md b/README.md index 3442396..4b775b7 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ ExampleDialog::ExampleDialog(wxWindow* parent) Generic { CreateStdDialogButtonSizer(wxOK) }, } - .attachToAndFit(this); + .attachTo(this); } ``` @@ -147,7 +147,7 @@ ExampleDialog::ExampleDialog(wxWindow* parent) }, // ... } - .attachToAndFit(this); + .attachTo(this); } ``` diff --git a/docs/ProgrammersGuide.md b/docs/ProgrammersGuide.md index 9d90631..608c74c 100644 --- a/docs/ProgrammersGuide.md +++ b/docs/ProgrammersGuide.md @@ -108,7 +108,7 @@ The basics of `wxUI` layout is the *Layout*. You use a specific type of *Layout "Text examples", // ... } - .attachToAndFit(this); + .attachTo(this); ``` In the above example we have constructed a vertical layout sizer that will use a `wxSizer` with the `wxSizerFlags` set to expand with a default border. Then the first item in the sizer is a second layer sizer with horizontal layout. The `wxSizerFlags` are propogated to each layer so the horizontal layout in this example would also be set to expand with a default border. The second sizer would be created as a "named" box horizonal sizer. @@ -147,7 +147,7 @@ One special type of *Layout* is `Generic`. There are cases where you may have a // ... Generic { CreateStdDialogButtonSizer(wxOK) }, } - .attachToAndFit(this); + .attachTo(this); ``` ### Controllers diff --git a/examples/HelloWorld/ExtendedExample.cpp b/examples/HelloWorld/ExtendedExample.cpp index 4c0569a..1ac3425 100644 --- a/examples/HelloWorld/ExtendedExample.cpp +++ b/examples/HelloWorld/ExtendedExample.cpp @@ -121,5 +121,5 @@ ExtendedExample::ExtendedExample(wxWindow* parent) Generic { CreateStdDialogButtonSizer(wxOK) }, // endsnippet CustomExample } - .attachToAndFit(this); + .attachTo(this); } diff --git a/examples/HelloWorld/HelloWorld.cpp b/examples/HelloWorld/HelloWorld.cpp index 5c493b4..1961b6a 100644 --- a/examples/HelloWorld/HelloWorld.cpp +++ b/examples/HelloWorld/HelloWorld.cpp @@ -330,7 +330,7 @@ ExampleDialog::ExampleDialog(wxWindow* parent) // snippet withwxUI // snippet wxUILayoutBasic } - .attachToAndFit(this); + .attachTo(this); // endsnippet wxUIGeneric // endsnippet wxUILayoutBasic } diff --git a/include/wxUI/Layout.h b/include/wxUI/Layout.h index f09f6c5..a67e8a6 100644 --- a/include/wxUI/Layout.h +++ b/include/wxUI/Layout.h @@ -66,7 +66,7 @@ namespace details { return sizer; } - auto attachTo(wxWindow* parent) -> auto& + auto attachToWithoutSizeHints(wxWindow* parent) -> auto& { auto sizer = constructSizer(parent); auto currentFlags = flags ? *flags : wxSizerFlags {}; @@ -76,9 +76,9 @@ namespace details { return *this; } - auto attachToAndFit(wxWindow* parent) -> auto& + auto attachTo(wxWindow* parent) -> auto& { - attachTo(parent); + attachToWithoutSizeHints(parent); auto* sizer = parent->GetSizer(); sizer->SetSizeHints(parent); return *this;