As per the wx-dev discussion in early Jan, replaced

wxWindow::m_parentSizer with m_containingSizer which is used to track
which sizer this window is a member of.  Windows will now remove
themselves from a sizer when destroyed.  Also added accessors so
window classes can find out if they are in a sizer and do things like
reset their min size, etc.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14221 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-02-14 23:34:46 +00:00
parent 9990cb50e4
commit be90c029fd
7 changed files with 134 additions and 14 deletions

View File

@@ -734,9 +734,13 @@ public:
virtual void GetPositionConstraint(int *x, int *y) const ;
// sizers
// TODO: what are they and how do they work??
void SetSizer( wxSizer *sizer );
wxSizer *GetSizer() const { return m_windowSizer; }
// Track if this window is a member of a sizer
void SetContainingSizer(wxSizer* sizer) { m_containingSizer = sizer; }
wxSizer *GetContainingSizer() const { return m_containingSizer; }
#endif // wxUSE_CONSTRAINTS
// backward compatibility
@@ -840,10 +844,11 @@ protected:
// constraints this window is involved in
wxWindowList *m_constraintsInvolvedIn;
// top level and the parent sizers
// TODO what's this and how does it work?)
// this window's sizer
wxSizer *m_windowSizer;
wxWindowBase *m_sizerParent;
// The sizer this window is a member of, if any
wxSizer *m_containingSizer;
// Layout() window automatically when its size changes?
bool m_autoLayout:1;
@@ -923,7 +928,7 @@ protected:
// capture/release the mouse, used by Capture/ReleaseMouse()
virtual void DoCaptureMouse() = 0;
virtual void DoReleaseMouse() = 0;
// retrieve the position/size of the window
virtual void DoGetPosition( int *x, int *y ) const = 0;
virtual void DoGetSize( int *width, int *height ) const = 0;