X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f303d69f934a76c56e14713a0748fdd10635e462..dd4e6da0e0abb643e10d3a2c83b063138bec0d69:/include/wx/sizer.h diff --git a/include/wx/sizer.h b/include/wx/sizer.h index 49c6c2817c..14726daa0f 100644 --- a/include/wx/sizer.h +++ b/include/wx/sizer.h @@ -229,9 +229,11 @@ public: bool IsSizer() const { return m_kind == Item_Sizer; } bool IsSpacer() const { return m_kind == Item_Spacer; } +#if WXWIN_COMPATIBILITY_2_6 // Deprecated in 2.6, use {G,S}etProportion instead. wxDEPRECATED( void SetOption( int option ) ); wxDEPRECATED( int GetOption() const ); +#endif // WXWIN_COMPATIBILITY_2_6 void SetProportion( int proportion ) { m_proportion = proportion; } @@ -252,6 +254,10 @@ public: { return m_kind == Item_Sizer ? m_sizer : NULL; } wxSize GetSpacer() const; + // this function behaves obviously for the windows and spacers but for the + // sizers it returns true if any sizer element is shown and only returns + // false if all of them are hidden + bool IsShown() const; void Show(bool show); void SetUserData(wxObject* userData) @@ -268,11 +274,6 @@ public: void SetSpacer(const wxSize& size); void SetSpacer(int width, int height) { SetSpacer(wxSize(width, height)); } - // this function is deprecated because if this item is a sizer, then it - // doesn't really make sense: sizer is neither shown nor hidden, because - // some of its elements may be hidden while others are shown - wxDEPRECATED( bool IsShown() const ); - protected: // common part of several ctors void Init() { m_userData = NULL; } @@ -410,9 +411,12 @@ public: inline wxSizerItem* PrependStretchSpacer(int prop = 1); +#if WXWIN_COMPATIBILITY_2_6 // Deprecated in 2.6 since historically it does not delete the window, // use Detach instead. wxDEPRECATED( virtual bool Remove( wxWindow *window ) ); +#endif // WXWIN_COMPATIBILITY_2_6 + virtual bool Remove( wxSizer *sizer ); virtual bool Remove( int index ); @@ -766,7 +770,9 @@ class WXDLLEXPORT wxBookCtrlBase; class WXDLLEXPORT wxBookCtrlSizer : public wxSizer { public: +#if WXWIN_COMPATIBILITY_2_6 wxDEPRECATED( wxBookCtrlSizer(wxBookCtrlBase *bookctrl) ); +#endif // WXWIN_COMPATIBILITY_2_6 wxBookCtrlBase *GetControl() const { return m_bookctrl; } @@ -795,7 +801,9 @@ class WXDLLEXPORT wxNotebook; class WXDLLEXPORT wxNotebookSizer : public wxBookCtrlSizer { public: +#if WXWIN_COMPATIBILITY_2_6 wxDEPRECATED( wxNotebookSizer(wxNotebook *nb) ); +#endif // WXWIN_COMPATIBILITY_2_6 wxNotebook *GetNotebook() const { return (wxNotebook *)m_bookctrl; }