X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7edcafa467269b15e0e967e9fe9ee08c6696b8a7..d1fe917ba097fd8039a4340d1d82115f72cbbd91:/include/wx/window.h diff --git a/include/wx/window.h b/include/wx/window.h index af98d65c85..90611c917b 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -327,7 +327,7 @@ public: // extra style: the less often used style bits which can't be set with // SetWindowStyleFlag() - void SetExtraStyle(long exStyle) { m_exStyle = exStyle; } + virtual void SetExtraStyle(long exStyle) { m_exStyle = exStyle; } long GetExtraStyle() const { return m_exStyle; } // make the window modal (all other windows unresponsive) @@ -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; @@ -865,7 +870,7 @@ protected: wxString m_windowName; bool m_themeEnabled; -#ifdef wxUSE_PALETTE +#if wxUSE_PALETTE wxPalette m_palette; bool m_hasCustomPalette; #endif // wxUSE_PALETTE @@ -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;