OWLNext 7.0
Borland's Object Windows Library for the modern age
|
When specifying the layout metrics for a window, four layout constraints are needed. More...
#include <owl/layoutwi.h>
Public Member Functions | |
TLayoutMetrics () | |
Defaults each co: RelWin=0, MyEdge=(1st from above), Relationship=AsIs. | |
void | SetMeasurementUnits (TMeasurementUnits units) |
Public Attributes | |
TEdgeConstraint | X |
X contains the X (left, center, right) edge constraint of the window. | |
TEdgeConstraint | Y |
Y contains the Y (top, center, bottom) edge constraint of the window. | |
TEdgeOrWidthConstraint | Width |
Contains the width size constraint, center edge constraint, or right edge (lmRight) constraint of the window. | |
TEdgeOrHeightConstraint | Height |
Contains the height size constraint, center edge constraint, or bottom edge constraint of the window. | |
When specifying the layout metrics for a window, four layout constraints are needed.
TLayoutMetrics contains the four layout constraints used to define the layout metrics for a window. The following table lists the constraints you can use for the X, Y, Height, and Width fields.
X lmLeft
, lmCenter, lmRightY lmTop
, lmCenter, lmBottomHeight lmCenter
, lmRight, lmWidthWidth lmCenter
, lmBottom, lmHeightIf the metrics for the child window are relative to the parent window, the relation window pointer needs to be lmParent (not the actual parent window pointer). For example,
The parent window pointer (this) should not be used as the relation window pointer of the child window.
Definition at line 54 of file layoutwi.h.
owl::TLayoutMetrics::TLayoutMetrics | ( | ) |
Defaults each co: RelWin=0, MyEdge=(1st from above), Relationship=AsIs.
Creates a TLayoutMetrics object and initializes the object.
It sets the units for the child and parent window to the specified layout units, and the relationship between the two windows to what is defined in ImAsIs (of TRelationship). TLayoutMetrics sets the following default values:
The following program creates two child windows and a frame into which you can add layout constraints.
Definition at line 1591 of file layoutwi.cpp.
References owl::lmAsIs, owl::lmHeight, owl::lmLayoutUnits, owl::lmLeft, owl::lmTop, and owl::lmWidth.
void owl::TLayoutMetrics::SetMeasurementUnits | ( | TMeasurementUnits | units | ) |
Definition at line 1622 of file layoutwi.cpp.
TEdgeOrHeightConstraint owl::TLayoutMetrics::Height |
Contains the height size constraint, center edge constraint, or bottom edge constraint of the window.
Vert2 can be lmHeight, lmCenter, lmBottom
Definition at line 68 of file layoutwi.h.
TEdgeOrWidthConstraint owl::TLayoutMetrics::Width |
Contains the width size constraint, center edge constraint, or right edge (lmRight) constraint of the window.
Horz2 can be lmWidth, lmCenter, lmRight
Definition at line 64 of file layoutwi.h.
TEdgeConstraint owl::TLayoutMetrics::X |
X contains the X (left, center, right) edge constraint of the window.
Horz1 can be lmLeft, lmCenter, lmRight
Definition at line 57 of file layoutwi.h.
TEdgeConstraint owl::TLayoutMetrics::Y |
Y contains the Y (top, center, bottom) edge constraint of the window.
Vert1 can be lmTop, lmCenter, lmBottom
Definition at line 60 of file layoutwi.h.