OWLNext 7.0
Borland's Object Windows Library for the modern age
|
TEdgeConstraint adds member functions that set edge (but not size) constraints. More...
#include <owl/layoutco.h>
Public Member Functions | |
void | Set (TEdge edge, TRelationship rel, TWindow *otherWin, TEdge otherEdge, int value=0) |
For setting arbitrary edge constraints. | |
void | LeftOf (TWindow *sibling, int margin=0) |
Positions one window with respect to a sibling window. | |
void | RightOf (TWindow *sibling, int margin=0) |
Positions one window with respect to a sibling window. | |
void | Above (TWindow *sibling, int margin=0) |
Positions your window above a sibling window. | |
void | Below (TWindow *sibling, int margin=0) |
Positions your window with respect to a sibling window. | |
void | SameAs (TWindow *otherWin, TEdge edge) |
Sets the edge of your window indicated by edge equivalent to the corresponding edge of the window in otherWin. | |
void | PercentOf (TWindow *otherWin, TEdge edge, int percent) |
Specifies that the edge of one window indicated in edge should be a percentage of the corresponding edge of another window (otherWin. | |
void | Absolute (TEdge edge, int value) |
Sets an edge of your window to a fixed value. | |
void | AsIs (TEdge edge) |
Additional Inherited Members | ||
Public Attributes inherited from owl::TLayoutConstraint | ||
TWindow * | RelWin | |
RelWin is a pointer to the sibling windows or lmParent if the child is a proportion of the parent's dimensions. | ||
uint | MyEdge: 4 | |
MyEdge contains the name of the edge or size constraint (lmTop, lmBottom, lmLeft, lmRight, lmCenter, lmWidth, or lmHeight) for your window. | ||
TRelationship | Relationship: 4 | |
Relationship specifies the type of relationship that exists between the two windows (that is, lmRightOf, lmLeftOf, lmAbove, lmBelow, lmSameAs, or lmPercentOf). | ||
TMeasurementUnits | Units: 4 | |
Units enumerates the units of measurement (either pixels or layout units) used to measure the height and width of the windows. | ||
uint | OtherEdge: 4 | |
OtherEdge contains the name of the edge or size constraint (lmTop, lmBottom, lmLeft, lmRight, lmCenter, lmWidth, or lmHeight) for the other window. | ||
union { | ||
int Margin | ||
used for "lmAbove", "lmBelow", "lmLeftOf", "lmRightOf" More... | ||
int Value | ||
used for "lmSameAs" and "lmAbsolute" More... | ||
int Percent | ||
used for "lmPercentOf" More... | ||
}; | ||
This union is included for the convenience of naming the layout constraints. | ||
TEdgeConstraint adds member functions that set edge (but not size) constraints.
TEdgeConstraint always places your window one pixel above the other window and then adds margins.
For example, if the margin is 4, TEdgeConstraint places your window 5 pixels above the other window. The margin, which does not need to be measured in pixels, is defined using the units specified by the constraint. Therefore, if the margin is specified as 8 layout units (which are then converted to 12 pixels), your window would be placed 13 pixels above the other window.
Definition at line 173 of file layoutco.h.
Positions your window above a sibling window.
You must specify the sibling window and an optional margin between the two windows. If no margin is specified, Above sets the bottom of one window one pixel above the top of the other window.
Definition at line 324 of file layoutco.h.
References owl::lmAbove, owl::lmBottom, owl::lmTop, and Set().
Sets an edge of your window to a fixed value.
Definition at line 357 of file layoutco.h.
References owl::lmAbsolute, owl::TLayoutConstraint::MyEdge, owl::TLayoutConstraint::Relationship, and owl::TLayoutConstraint::Value.
Definition at line 365 of file layoutco.h.
References owl::lmAsIs, owl::TLayoutConstraint::MyEdge, and owl::TLayoutConstraint::Relationship.
Positions your window with respect to a sibling window.
You must specify the sibling window and an optional margin between the two windows. If no margin is specified, Below sets the top of one window one pixel below the bottom of the other window.
Definition at line 334 of file layoutco.h.
References owl::lmBelow, owl::lmBottom, owl::lmTop, and Set().
Positions one window with respect to a sibling window.
You can specify the sibling window and an optional margin between the two windows.
Definition at line 306 of file layoutco.h.
References owl::lmLeft, owl::lmLeftOf, owl::lmRight, and Set().
Specifies that the edge of one window indicated in edge should be a percentage of the corresponding edge of another window (otherWin.
Definition at line 350 of file layoutco.h.
References owl::lmPercentOf, and Set().
Positions one window with respect to a sibling window.
You can specify the sibling window and an optional margin between the two windows.
Definition at line 314 of file layoutco.h.
References owl::lmLeft, owl::lmRight, owl::lmRightOf, and Set().
Sets the edge of your window indicated by edge equivalent to the corresponding edge of the window in otherWin.
Definition at line 342 of file layoutco.h.
References owl::lmSameAs, and Set().
|
inline |
For setting arbitrary edge constraints.
Used for setting arbitrary edge constraints, Set specifies that your window's edge should be of a specified relationship to otherWin's specified edge.
use it like this:
Definition at line 293 of file layoutco.h.
References owl::TLayoutConstraint::MyEdge, owl::TLayoutConstraint::OtherEdge, owl::TLayoutConstraint::Relationship, owl::TLayoutConstraint::RelWin, and owl::TLayoutConstraint::Value.