wx(Individual)LayoutConstraints may be copied
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -68,25 +68,11 @@ 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:
|
public:
|
||||||
wxIndividualLayoutConstraint();
|
wxIndividualLayoutConstraint();
|
||||||
|
|
||||||
|
// note that default copy ctor and assignment operators are ok
|
||||||
|
|
||||||
~wxIndividualLayoutConstraint();
|
~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);
|
||||||
@@ -149,7 +135,20 @@ public:
|
|||||||
// is not determinable, -1.
|
// is not determinable, -1.
|
||||||
int GetEdge(wxEdge which, wxWindowBase *thisWin, wxWindowBase *other) const;
|
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;
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -158,8 +157,6 @@ public:
|
|||||||
|
|
||||||
class WXDLLEXPORT wxLayoutConstraints : public wxObject
|
class WXDLLEXPORT wxLayoutConstraints : public wxObject
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxLayoutConstraints)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Edge constraints
|
// Edge constraints
|
||||||
wxIndividualLayoutConstraint left;
|
wxIndividualLayoutConstraint left;
|
||||||
@@ -174,6 +171,9 @@ public:
|
|||||||
wxIndividualLayoutConstraint centreY;
|
wxIndividualLayoutConstraint centreY;
|
||||||
|
|
||||||
wxLayoutConstraints();
|
wxLayoutConstraints();
|
||||||
|
|
||||||
|
// note that default copy ctor and assignment operators are ok
|
||||||
|
|
||||||
~wxLayoutConstraints();
|
~wxLayoutConstraints();
|
||||||
|
|
||||||
bool SatisfyConstraints(wxWindowBase *win, int *noChanges);
|
bool SatisfyConstraints(wxWindowBase *win, int *noChanges);
|
||||||
@@ -182,6 +182,8 @@ public:
|
|||||||
return left.GetDone() && top.GetDone() &&
|
return left.GetDone() && top.GetDone() &&
|
||||||
width.GetDone() && height.GetDone();
|
width.GetDone() && height.GetDone();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxLayoutConstraints)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user