]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/layout.h
don't define WINVER as 0x0400 in configure, it's defined in the headers as 0x0600...
[wxWidgets.git] / include / wx / layout.h
index 0fcd64ecd8ff38766d60f02d9356345e41ba520a..62655782b8a6692d70b1fd3d9d0a5b0634c58c72 100644 (file)
@@ -1,26 +1,22 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// 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
 // 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
 // ----------------------------------------------------------------------------
 
 
 // ----------------------------------------------------------------------------
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
-    #pragma interface "layout.h"
-#endif
-
-#include "wx/defs.h"
+#include "wx/object.h"
 
 // X stupidly defines these in X.h
 #ifdef Above
 
 // X stupidly defines these in X.h
 #ifdef Above
@@ -30,6 +26,8 @@
     #undef Below
 #endif
 
     #undef Below
 #endif
 
+#if wxUSE_CONSTRAINTS
+
 // ----------------------------------------------------------------------------
 // forward declrations
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // forward declrations
 // ----------------------------------------------------------------------------
@@ -68,26 +66,12 @@ enum wxRelationship
 
 class WXDLLEXPORT wxIndividualLayoutConstraint : public wxObject
 {
 
 class WXDLLEXPORT 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();
 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);
 
 
     void Set(wxRelationship rel, wxWindowBase *otherW, wxEdge otherE, int val = 0, int marg = wxLAYOUT_DEFAULT_MARGIN);
 
@@ -148,6 +132,23 @@ public:
     // Get the value of this edge or dimension, or if this
     // is not determinable, -1.
     int GetEdge(wxEdge which, wxWindowBase *thisWin, wxWindowBase *other) const;
     // Get the value of this edge or dimension, or if this
     // is not determinable, -1.
     int GetEdge(wxEdge which, wxWindowBase *thisWin, wxWindowBase *other) const;
+
+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)
 };
 
 // ----------------------------------------------------------------------------
 };
 
 // ----------------------------------------------------------------------------
@@ -156,8 +157,6 @@ public:
 
 class WXDLLEXPORT wxLayoutConstraints : public wxObject
 {
 
 class WXDLLEXPORT wxLayoutConstraints : public wxObject
 {
-    DECLARE_DYNAMIC_CLASS(wxLayoutConstraints)
-
 public:
     // Edge constraints
     wxIndividualLayoutConstraint left;
 public:
     // Edge constraints
     wxIndividualLayoutConstraint left;
@@ -172,7 +171,10 @@ public:
     wxIndividualLayoutConstraint centreY;
 
     wxLayoutConstraints();
     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
 
     bool SatisfyConstraints(wxWindowBase *win, int *noChanges);
     bool AreSatisfied() const
@@ -180,7 +182,10 @@ public:
         return left.GetDone() && top.GetDone() &&
                width.GetDone() && height.GetDone();
     }
         return left.GetDone() && top.GetDone() &&
                width.GetDone() && height.GetDone();
     }
+
+    DECLARE_DYNAMIC_CLASS(wxLayoutConstraints)
 };
 
 };
 
-#endif
-    // _WX_LAYOUTH__
+#endif // wxUSE_CONSTRAINTS
+
+#endif // _WX_LAYOUT_H_