void wxIndividualLayoutConstraint::Set(wxRelationship rel, wxWindowBase *otherW, wxEdge otherE, int val, int marg)
{
+ if (rel == wxSameAs)
+ {
+ // If Set is called by the user with wxSameAs then call SameAs to do
+ // it since it will actually use wxPercent instead.
+ SameAs(otherW, otherE, marg);
+ return;
+ }
+
relationship = rel;
otherWin = otherW;
otherEdge = otherE;
if ( rel == wxPercentOf )
{
- percentage = val;
+ percent = val;
}
else
{
// 'Same edge' alignment
//
void wxIndividualLayoutConstraint::SameAs(wxWindowBase *otherW, wxEdge edge, int marg)
-{
+{
Set(wxPercentOf, otherW, edge, 100, marg);
}
// The edge is a percentage of the other window's edge
void wxIndividualLayoutConstraint::PercentOf(wxWindowBase *otherW, wxEdge wh, int per)
-{
+{
Set(wxPercentOf, otherW, wh, per);
}
//
void wxIndividualLayoutConstraint::Absolute(int val)
{
- value = val; relationship = wxAbsolute;
+ value = val;
+ relationship = wxAbsolute;
}
// Reset constraint if it mentions otherWin
otherWin = (wxWindowBase *) NULL;
return TRUE;
}
- else
- return FALSE;
+
+ return FALSE;
}
// Try to satisfy constraint
Set each calculated position and size
*/
-
+
#if WXWIN_COMPATIBILITY
bool wxOldDoLayout(wxWindowBase *win)
{