OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
owl::TEdgeConstraint Struct Reference

TEdgeConstraint adds member functions that set edge (but not size) constraints. More...

#include <owl/layoutco.h>

Inheritance diagram for owl::TEdgeConstraint:
owl::TLayoutConstraint owl::TEdgeOrSizeConstraint owl::TEdgeOrHeightConstraint owl::TEdgeOrWidthConstraint

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
TWindowRelWin
 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.
 

Detailed Description

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.

Member Function Documentation

◆ Above()

void owl::TEdgeConstraint::Above ( TWindow * sibling,
int margin = 0 )
inline

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().

◆ Absolute()

void owl::TEdgeConstraint::Absolute ( TEdge edge,
int value )
inline

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.

◆ AsIs()

void owl::TEdgeConstraint::AsIs ( TEdge edge)
inline

◆ Below()

void owl::TEdgeConstraint::Below ( TWindow * sibling,
int margin = 0 )
inline

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().

◆ LeftOf()

void owl::TEdgeConstraint::LeftOf ( TWindow * sibling,
int margin = 0 )
inline

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().

◆ PercentOf()

void owl::TEdgeConstraint::PercentOf ( TWindow * otherWin,
TEdge edge,
int percent )
inline

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().

◆ RightOf()

void owl::TEdgeConstraint::RightOf ( TWindow * sibling,
int margin = 0 )
inline

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().

◆ SameAs()

void owl::TEdgeConstraint::SameAs ( TWindow * otherWin,
TEdge edge )
inline

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().

◆ Set()

void owl::TEdgeConstraint::Set ( TEdge edge,
TRelationship rel,
TWindow * otherWin,
TEdge otherEdge,
int value = 0 )
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:

#define lmParent
Use to represent the parent in layout metrics.
Definition layoutco.h:31
@ lmLeft
The left edge of the window.
Definition layoutco.h:37
@ lmRightOf
Definition layoutco.h:72

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.


The documentation for this struct was generated from the following file: