X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/22f3361e1cf25c52a2da8fdfc5cb081809e18fb9..ac1013c060bf83e0ef83f3ef4a5f6296e88157d2:/include/wx/layout.h?ds=sidebyside diff --git a/include/wx/layout.h b/include/wx/layout.h index 736c16c9a3..accc8836eb 100644 --- a/include/wx/layout.h +++ b/include/wx/layout.h @@ -1,25 +1,21 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: layout.h -// Purpose: Layout classes +// Name: wx/layout.h +// Purpose: OBSOLETE layout constraint classes, use sizers instead // Author: Julian Smart // Modified by: // Created: 29/01/98 // RCS-ID: $Id$ // Copyright: (c) 1998 Julian Smart -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef _WX_LAYOUTH__ -#define _WX_LAYOUTH__ +#ifndef _WX_LAYOUT_H_ +#define _WX_LAYOUT_H_ // ---------------------------------------------------------------------------- // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(__APPLE__) - #pragma interface "layout.h" -#endif - #include "wx/object.h" // X stupidly defines these in X.h @@ -30,12 +26,14 @@ #undef Below #endif +#if wxUSE_CONSTRAINTS + // ---------------------------------------------------------------------------- // forward declrations // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxWindowBase; -class WXDLLEXPORT wxLayoutConstraints; +class WXDLLIMPEXP_FWD_CORE wxWindowBase; +class WXDLLIMPEXP_FWD_CORE wxLayoutConstraints; // ---------------------------------------------------------------------------- // constants @@ -66,28 +64,14 @@ enum wxRelationship // wxIndividualLayoutConstraint: a constraint on window position // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxIndividualLayoutConstraint : public wxObject +class WXDLLIMPEXP_CORE wxIndividualLayoutConstraint : public wxObject { - DECLARE_DYNAMIC_CLASS(wxIndividualLayoutConstraint) - -protected: - // To be allowed to modify the internal variables - friend class wxIndividualLayoutConstraint_Serialize; - - // 'This' window is the parent or sibling of otherWin - wxWindowBase *otherWin; - - wxEdge myEdge; - wxRelationship relationship; - int margin; - int value; - int percent; - wxEdge otherEdge; - bool done; - public: wxIndividualLayoutConstraint(); - ~wxIndividualLayoutConstraint(); + + // note that default copy ctor and assignment operators are ok + + virtual ~wxIndividualLayoutConstraint(){} void Set(wxRelationship rel, wxWindowBase *otherW, wxEdge otherE, int val = 0, int marg = wxLAYOUT_DEFAULT_MARGIN); @@ -149,17 +133,30 @@ public: // is not determinable, -1. int GetEdge(wxEdge which, wxWindowBase *thisWin, wxWindowBase *other) const; - DECLARE_NO_COPY_CLASS(wxIndividualLayoutConstraint) +protected: + // To be allowed to modify the internal variables + friend class wxIndividualLayoutConstraint_Serialize; + + // 'This' window is the parent or sibling of otherWin + wxWindowBase *otherWin; + + wxEdge myEdge; + wxRelationship relationship; + int margin; + int value; + int percent; + wxEdge otherEdge; + bool done; + + DECLARE_DYNAMIC_CLASS(wxIndividualLayoutConstraint) }; // ---------------------------------------------------------------------------- // wxLayoutConstraints: the complete set of constraints for a window // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxLayoutConstraints : public wxObject +class WXDLLIMPEXP_CORE wxLayoutConstraints : public wxObject { - DECLARE_DYNAMIC_CLASS(wxLayoutConstraints) - public: // Edge constraints wxIndividualLayoutConstraint left; @@ -174,7 +171,10 @@ public: wxIndividualLayoutConstraint centreY; wxLayoutConstraints(); - ~wxLayoutConstraints(); + + // note that default copy ctor and assignment operators are ok + + virtual ~wxLayoutConstraints(){} bool SatisfyConstraints(wxWindowBase *win, int *noChanges); bool AreSatisfied() const @@ -182,7 +182,10 @@ public: return left.GetDone() && top.GetDone() && width.GetDone() && height.GetDone(); } + + DECLARE_DYNAMIC_CLASS(wxLayoutConstraints) }; -#endif - // _WX_LAYOUTH__ +#endif // wxUSE_CONSTRAINTS + +#endif // _WX_LAYOUT_H_