ControlSizing

Engine/source/gui/core/guiTypes.h

Represents the Sizing Options for a GuiControl.

More...

Anchoring

Anchors are applied to ONLY controls that are children of any derivative of a GuiContainer control.

Anchors are applied when a parent is resized and a child element should be resized to accommodate the new parent extent

Anchors are specified as true or false and control whether a certain edge of a control will be locked to a certain edge of a parent, when the parent resizes. Anchors are specified as a Mask and therefore you may lock any number of edges to a parent container and when the parent is resized, any locked edges on a control will remain the same distance from the parent edge it is locked to, after the resize happens.

bool

Anchor to the Top edge of the parent when created.

bool

Anchor to the Bottom edge of the parent when created.

bool

Anchor to the Left edge of the parent when created.

bool

Anchor to the Right edge of the parent when created.

Public Attributes

For example 1,1,1,1 would mean one pixel at least of spacing between this control and the one next to it.

Padding for each side of the control to have as spacing between other controls.

Public Functions

Detailed Description

Represents the Sizing Options for a GuiControl.

Anchoring

Anchors are applied to ONLY controls that are children of any derivative of a GuiContainer control.

Anchors are applied when a parent is resized and a child element should be resized to accommodate the new parent extent

Anchors are specified as true or false and control whether a certain edge of a control will be locked to a certain edge of a parent, when the parent resizes. Anchors are specified as a Mask and therefore you may lock any number of edges to a parent container and when the parent is resized, any locked edges on a control will remain the same distance from the parent edge it is locked to, after the resize happens.

bool mAnchorTop 

Anchor to the Top edge of the parent when created.

bool mAnchorBottom 

Anchor to the Bottom edge of the parent when created.

bool mAnchorLeft 

Anchor to the Left edge of the parent when created.

bool mAnchorRight 

Anchor to the Right edge of the parent when created.

Public Attributes

S32 mDocking 

Docking Flag.

RectSpacingI mInternalPadding 

For example 1,1,1,1 would mean one pixel at least of spacing between this control and the one next to it.


Interior Spacing of the control

RectSpacingI mPadding 

Padding for each side of the control to have as spacing between other controls.

Public Functions

ControlSizing()