Objects of this class are stored in the wxLayoutConstraint class as one of eight possible constraints that a window can be involved in.
Constraints are initially set to have the relationship wxUnconstrained, which means that their values should be calculated by looking at known constraints.
Derived from
Include files
<wx/layout.h>
See also
Overview and examples, wxLayoutConstraints, wxWindow::SetConstraints.
Members
Edges and relationships
wxIndividualLayoutConstraint::wxIndividualLayoutConstraint
wxIndividualLayoutConstraint::Above
wxIndividualLayoutConstraint::Absolute
wxIndividualLayoutConstraint::AsIs
wxIndividualLayoutConstraint::Below
wxIndividualLayoutConstraint::Unconstrained
wxIndividualLayoutConstraint::LeftOf
wxIndividualLayoutConstraint::PercentOf
wxIndividualLayoutConstraint::RightOf
wxIndividualLayoutConstraint::SameAs
wxIndividualLayoutConstraint::Set
The wxEdge enumerated type specifies the type of edge or dimension of a window.
wxLeft | The left edge. |
wxTop | The top edge. |
wxRight | The right edge. |
wxBottom | The bottom edge. |
wxCentreX | The x-coordinate of the centre of the window. |
wxCentreY | The y-coordinate of the centre of the window. |
The wxRelationship enumerated type specifies the relationship that this edge or dimension has with another specified edge or dimension. Normally, the user doesn't use these directly because functions such as Below and RightOf are a convenience for using the more general Set function.
wxUnconstrained | The edge or dimension is unconstrained (the default for edges. |
wxAsIs | The edge or dimension is to be taken from the current window position or size (the default for dimensions. |
wxAbove | The edge should be above another edge. |
wxBelow | The edge should be below another edge. |
wxLeftOf | The edge should be to the left of another edge. |
wxRightOf | The edge should be to the right of another edge. |
wxSameAs | The edge or dimension should be the same as another edge or dimension. |
wxPercentOf | The edge or dimension should be a percentage of another edge or dimension. |
wxAbsolute | The edge or dimension should be a given absolute value. |
void wxIndividualLayoutConstraint()
Constructor. Not used by the end-user.
void Above(wxWindow *otherWin, int margin = 0)
Constrains this edge to be above the given window, with an optional margin. Implicitly, this is relative to the top edge of the other window.
void Absolute(int value)
Constrains this edge or dimension to be the given absolute value.
void AsIs()
Sets this edge or constraint to be whatever the window's value is at the moment. If either of the width and height constraints are as is, the window will not be resized, but moved instead. This is important when considering panel items which are intended to have a default size, such as a button, which may take its size from the size of the button label.
void Below(wxWindow *otherWin, int margin = 0)
Constrains this edge to be below the given window, with an optional margin. Implicitly, this is relative to the bottom edge of the other window.
void Unconstrained()
Sets this edge or dimension to be unconstrained, that is, dependent on other edges and dimensions from which this value can be deduced.
void LeftOf(wxWindow *otherWin, int margin = 0)
Constrains this edge to be to the left of the given window, with an optional margin. Implicitly, this is relative to the left edge of the other window.
void PercentOf(wxWindow *otherWin, wxEdge edge, int per)
Constrains this edge or dimension to be to a percentage of the given window, with an optional margin.
void RightOf(wxWindow *otherWin, int margin = 0)
Constrains this edge to be to the right of the given window, with an optional margin. Implicitly, this is relative to the right edge of the other window.
void SameAs(wxWindow *otherWin, wxEdge edge, int margin = 0)
Constrains this edge or dimension to be to the same as the edge of the given window, with an optional margin.
void Set(wxRelationship rel, wxWindow *otherWin, wxEdge otherEdge, int value = 0, int margin = 0)
Sets the properties of the constraint. Normally called by one of the convenience functions such as Above, RightOf, SameAs.