X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce7208d49d5ce2ca1dc0b3b83f14f1d04f29c4bf..68a9527d5185cdd9d3fef3d9421415c50de8794d:/include/wx/sizer.h?ds=sidebyside diff --git a/include/wx/sizer.h b/include/wx/sizer.h index f05a5e3e66..5cceec9ca8 100644 --- a/include/wx/sizer.h +++ b/include/wx/sizer.h @@ -75,8 +75,10 @@ public: // some shortcuts for Align() wxSizerFlags& Centre() { return Align(wxCENTRE); } wxSizerFlags& Center() { return Centre(); } + wxSizerFlags& Top() { return Align(wxALIGN_TOP); } wxSizerFlags& Left() { return Align(wxALIGN_LEFT); } wxSizerFlags& Right() { return Align(wxALIGN_RIGHT); } + wxSizerFlags& Bottom() { return Align(wxALIGN_BOTTOM); } // default border size used by Border() below static int GetDefaultBorder() @@ -153,6 +155,21 @@ public: #endif } + // setters for the others flags + wxSizerFlags& Shaped() + { + m_flags |= wxSHAPED; + + return *this; + } + + wxSizerFlags& FixedMinSize() + { + m_flags |= wxFIXED_MINSIZE; + + return *this; + } + // accessors for wxSizer only int GetProportion() const { return m_proportion; } int GetFlags() const { return m_flags; } @@ -533,6 +550,8 @@ public: wxSizerItemList& GetChildren() { return m_children; } + const wxSizerItemList& GetChildren() const + { return m_children; } void SetDimension( int x, int y, int width, int height ); @@ -575,7 +594,6 @@ protected: wxSize GetMinWindowSize( wxWindow *window ); wxSize GetMaxClientSize( wxWindow *window ) const; wxSize GetMinClientSize( wxWindow *window ); - wxSize FitSize( wxWindow *window ); wxSize VirtualFitSize( wxWindow *window ); virtual void DoSetMinSize( int width, int height ); @@ -825,70 +843,6 @@ private: #endif // wxUSE_BUTTON -#if WXWIN_COMPATIBILITY_2_4 -// NB: wxBookCtrlSizer and wxNotebookSizer are deprecated, they -// don't do anything. wxBookCtrlBase::DoGetBestSize does the job now. - -// ---------------------------------------------------------------------------- -// wxBookCtrlSizer -// ---------------------------------------------------------------------------- - -#if wxUSE_BOOKCTRL - -// this sizer works with wxNotebook/wxListbook/... and sizes the control to -// fit its pages -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; } - - virtual void RecalcSizes(); - virtual wxSize CalcMin(); - -protected: - // this protected ctor lets us mark the real one above as deprecated - // and still have warning-free build of the library itself: - wxBookCtrlSizer() {} - - wxBookCtrlBase *m_bookctrl; - -private: - DECLARE_CLASS(wxBookCtrlSizer) - DECLARE_NO_COPY_CLASS(wxBookCtrlSizer) -}; - - -#if wxUSE_NOTEBOOK - -// before wxBookCtrlBase we only had wxNotebookSizer, keep it for backwards -// compatibility -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; } - -private: - DECLARE_CLASS(wxNotebookSizer) - DECLARE_NO_COPY_CLASS(wxNotebookSizer) -}; - -#endif // wxUSE_NOTEBOOK - -#endif // wxUSE_BOOKCTRL - -#endif // WXWIN_COMPATIBILITY_2_4 // ---------------------------------------------------------------------------- // inline functions implementation