OWLNext 6.32
Public Member Functions
owl::TEdgeConstraint Struct Reference

#include <layoutco.h>

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

List of all members.

Public Member Functions

void Set (TEdge edge, TRelationship rel, TWindow *otherWin, TEdge otherEdge, int value=0)
void LeftOf (TWindow *sibling, int margin=0)
void RightOf (TWindow *sibling, int margin=0)
void Above (TWindow *sibling, int margin=0)
void Below (TWindow *sibling, int margin=0)
void SameAs (TWindow *otherWin, TEdge edge)
void PercentOf (TWindow *otherWin, TEdge edge, int percent)
void Absolute (TEdge edge, int value)
void AsIs (TEdge edge)

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.


Member Function Documentation

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.

References owl::lmBottom, owl::lmTop, and Set().

void owl::TEdgeConstraint::Absolute ( TEdge  edge,
int  value 
) [inline]
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.

References owl::lmBottom, owl::lmTop, and Set().

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.

References owl::lmLeft, owl::lmRight, and Set().

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.

Reimplemented in owl::TEdgeOrSizeConstraint, owl::TEdgeOrWidthConstraint, and owl::TEdgeOrHeightConstraint.

References Set().

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.

References owl::lmLeft, owl::lmRight, and Set().

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.

Reimplemented in owl::TEdgeOrSizeConstraint, owl::TEdgeOrWidthConstraint, and owl::TEdgeOrHeightConstraint.

References Set().

void owl::TEdgeConstraint::Set ( TEdge  edge,
TRelationship  rel,
TWindow otherWin,
TEdge  otherEdge,
int  value = 0 
) [inline]

For setting arbitrary edge constraints. use it like this:

   metrics->X.Set(lmLeft, lmRightOf, lmParent, lmLeft, 10);

Used for setting arbitrary edge constraints, Set specifies that your window's edge should be of a specified relationship to otherWin's specified edge.

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: