added wxSizer::Get/SetContainingWindow()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-09-04 12:05:49 +00:00
parent 7f5426f09c
commit e8cfff879e
4 changed files with 54 additions and 8 deletions

View File

@@ -329,7 +329,7 @@ WX_DECLARE_EXPORTED_LIST( wxSizerItem, wxSizerItemList );
class WXDLLEXPORT wxSizer: public wxObject, public wxClientDataContainer
{
public:
wxSizer() { }
wxSizer() { m_containingWindow = NULL; }
~wxSizer();
// methods for adding elements to the sizer: there are Add/Insert/Prepend
@@ -410,6 +410,10 @@ public:
inline wxSizerItem* PrependSpacer(int size);
inline wxSizerItem* PrependStretchSpacer(int prop = 1);
// set (or possibly unset if window is NULL) or get the window this sizer
// is used in
void SetContainingWindow(wxWindow *window);
wxWindow *GetContainingWindow() const { return m_containingWindow; }
#if WXWIN_COMPATIBILITY_2_6
// Deprecated in 2.6 since historically it does not delete the window,
@@ -508,6 +512,9 @@ protected:
wxPoint m_position;
wxSizerItemList m_children;
// the window this sizer is used in, can be NULL
wxWindow *m_containingWindow;
wxSize GetMaxWindowSize( wxWindow *window ) const;
wxSize GetMinWindowSize( wxWindow *window );
wxSize GetMaxClientSize( wxWindow *window ) const;