Update wxWindow and wxTopLevelWindow::Layout() documentation
Explain how these methods actually work, remove a very (from wx 1.x days?) outdated reference to wxPanel always calling Layout() and mention the special case of wxTopLevelWindow in the overview too.
This commit is contained in:
@@ -283,8 +283,20 @@ public:
|
||||
bool IsUsingNativeDecorations() const;
|
||||
|
||||
/**
|
||||
See wxWindow::SetAutoLayout(): when auto layout is on, this function gets
|
||||
called automatically when the window is resized.
|
||||
Lays out the children using the window sizer or resizes the only child
|
||||
of the window to cover its entire area.
|
||||
|
||||
This class overrides the base class Layout() method to check if this
|
||||
window contains exactly one child -- which is commonly the case, with
|
||||
wxPanel being often created as the only child of wxTopLevelWindow --
|
||||
and, if this is the case, resizes this child window to cover the entire
|
||||
client area.
|
||||
|
||||
Note that if you associate a sizer with this window, the sizer takes
|
||||
precedence and the only-child-resizing is only used as fallback.
|
||||
|
||||
@returns @false if nothing was done because the window doesn't have
|
||||
neither a sizer nor a single child, @true otherwise.
|
||||
*/
|
||||
virtual bool Layout();
|
||||
|
||||
|
Reference in New Issue
Block a user