+ case wxLeft:
+ {
+ wxLayoutConstraints *constr = other->GetConstraints();
+ // If no constraints, it means the window is not dependent
+ // on anything, and therefore we know its value immediately
+ if (constr)
+ {
+ if (constr->left.GetDone())
+ return constr->left.GetValue();
+ else
+ return -1;
+ }
+ else
+ {
+ int x, y;
+ other->GetPosition(&x, &y);
+ return x;
+ }
+ }
+ case wxTop:
+ {
+ wxLayoutConstraints *constr = other->GetConstraints();
+ // If no constraints, it means the window is not dependent
+ // on anything, and therefore we know its value immediately
+ if (constr)
+ {
+ if (constr->top.GetDone())
+ return constr->top.GetValue();
+ else
+ return -1;
+ }
+ else
+ {
+ int x, y;
+ other->GetPosition(&x, &y);
+ return y;
+ }
+ }
+ case wxRight:
+ {
+ wxLayoutConstraints *constr = other->GetConstraints();
+ // If no constraints, it means the window is not dependent
+ // on anything, and therefore we know its value immediately
+ if (constr)
+ {
+ if (constr->right.GetDone())
+ return constr->right.GetValue();
+ else
+ return -1;
+ }
+ else
+ {
+ int x, y, w, h;
+ other->GetPosition(&x, &y);
+ other->GetSize(&w, &h);
+ return (int)(x + w);
+ }
+ }
+ case wxBottom:
+ {
+ wxLayoutConstraints *constr = other->GetConstraints();
+ // If no constraints, it means the window is not dependent
+ // on anything, and therefore we know its value immediately
+ if (constr)
+ {
+ if (constr->bottom.GetDone())
+ return constr->bottom.GetValue();
+ else
+ return -1;
+ }
+ else
+ {
+ int x, y, w, h;
+ other->GetPosition(&x, &y);
+ other->GetSize(&w, &h);
+ return (int)(y + h);
+ }
+ }
+ case wxWidth:
+ {
+ wxLayoutConstraints *constr = other->GetConstraints();
+ // If no constraints, it means the window is not dependent
+ // on anything, and therefore we know its value immediately
+ if (constr)
+ {
+ if (constr->width.GetDone())
+ return constr->width.GetValue();
+ else
+ return -1;
+ }
+ else
+ {
+ int w, h;
+ other->GetSize(&w, &h);
+ return w;
+ }
+ }
+ case wxHeight:
+ {
+ wxLayoutConstraints *constr = other->GetConstraints();
+ // If no constraints, it means the window is not dependent
+ // on anything, and therefore we know its value immediately
+ if (constr)
+ {
+ if (constr->height.GetDone())
+ return constr->height.GetValue();
+ else
+ return -1;
+ }
+ else
+ {
+ int w, h;
+ other->GetSize(&w, &h);
+ return h;
+ }
+ }
+ case wxCentreX:
+ {
+ wxLayoutConstraints *constr = other->GetConstraints();
+ // If no constraints, it means the window is not dependent
+ // on anything, and therefore we know its value immediately
+ if (constr)
+ {
+ if (constr->centreX.GetDone())
+ return constr->centreX.GetValue();
+ else
+ return -1;
+ }
+ else
+ {
+ int x, y, w, h;
+ other->GetPosition(&x, &y);
+ other->GetSize(&w, &h);
+ return (int)(x + (w/2));
+ }
+ }
+ case wxCentreY:
+ {
+ wxLayoutConstraints *constr = other->GetConstraints();
+ // If no constraints, it means the window is not dependent
+ // on anything, and therefore we know its value immediately
+ if (constr)
+ {
+ if (constr->centreY.GetDone())
+ return constr->centreY.GetValue();
+ else
+ return -1;
+ }
+ else
+ {
+ int x, y, w, h;
+ other->GetPosition(&x, &y);
+ other->GetSize(&w, &h);
+ return (int)(y + (h/2));
+ }
+ }
+ default:
+ break;