GUIElementStyle Struct Reference

Description

GUI element style that determines the look of a GUI element, as well as the element's default layout options.

Different looks can be provided for different element states.

Inherits IReflectable.

Methods

RTTITypeBasegetRTTI () const override
 Returns an interface you can use to access class' Run Time Type Information. More...
 
- Methods inherited from IReflectable
bool isDerivedFrom (RTTITypeBase *base)
 Returns true if current RTTI class is derived from base (Or if it is the same type as base). More...
 
UINT32 getTypeId () const
 Returns an unique type identifier of the class. More...
 
const StringgetTypeName () const
 Returns the type name of the class. More...
 

Static methods

static RTTITypeBasegetRTTIStatic ()
 
- Static methods inherited from IReflectable
static Vector< RTTITypeBase * > & getDerivedClasses ()
 Returns all classes deriving directly from IReflectable. More...
 
static SPtr< IReflectablecreateInstanceFromTypeId (UINT32 rttiTypeId)
 Creates an empty instance of a class from a type identifier. More...
 
static void _registerDerivedClass (RTTITypeBase *derivedClass)
 Called by each type deriving from IReflectable, on program load. More...
 
static RTTITypeBase_getRTTIfromTypeId (UINT32 rttiTypeId)
 Returns class' RTTI type from type id. More...
 
static bool _isTypeIdDuplicate (UINT32 typeId)
 Checks if the provided type id is unique. More...
 
static void _checkForCircularReferences ()
 Iterates over all RTTI types and reports any circular references (for example one type having a field referencing another type, and that type having a field referencing the first type). More...
 
static RTTITypeBasegetRTTIStatic ()
 Returns an interface you can use to access class' Run Time Type Information. More...
 

Fields

HFont font
 Font to use for all text within the GUI element. More...
 
UINT32 fontSize
 Font size to use for all text within the GUI element. More...
 
TextHorzAlign textHorzAlign
 Horizontal alignment of text within the GUI element. More...
 
TextVertAlign textVertAlign
 Vertical alignment of text within the GUI element. More...
 
GUIImagePosition imagePosition
 Position of content image relative to text. More...
 
bool wordWrap
 Should the text word wrap if it doesn't fit. More...
 
GUIElementStateStyle normal
 Style used when element is in normal state and off. More...
 
GUIElementStateStyle hover
 Style used when element is in hover state and off. More...
 
GUIElementStateStyle active
 Style used when element is in active state and off. More...
 
GUIElementStateStyle focused
 Style used when element is in focused state and off. More...
 
GUIElementStateStyle normalOn
 Style used when element is in normal state and on. More...
 
GUIElementStateStyle hoverOn
 Style used when element is in hover state and on. More...
 
GUIElementStateStyle activeOn
 Style used when element is in active state and on. More...
 
GUIElementStateStyle focusedOn
 Style used when element is in focused state and on. More...
 
RectOffset border
 Determines how the element is scaled (using the typical Scale9Grid approach). More...
 
RectOffset margins
 Determines offset from the background graphics to the content. More...
 
RectOffset contentOffset
 Additional offset to the content, that doesn't effect the bounds. More...
 
RectOffset padding
 Determines extra distance between this and other elements in a layout. More...
 
UINT32 width
 Wanted width of the GUI element in pixels. More...
 
UINT32 height
 Wanted height of the GUI element in pixels. More...
 
UINT32 minWidth
 Minimum width allowed for the GUI element. More...
 
UINT32 maxWidth
 Maximum width allowed for the GUI element. More...
 
UINT32 minHeight
 Minimum height allowed for the GUI element. More...
 
UINT32 maxHeight
 Maximum height allowed for the GUI element. More...
 
bool fixedWidth
 Determines should the layout resize the element depending on available size. More...
 
bool fixedHeight
 Determines should the layout resize the element depending on available size. More...
 
Map< String, StringsubStyles
 Sub-styles used by certain more complex elements. More...
 

Method documentation

RTTITypeBase* getRTTI ( ) const
overridevirtual

Returns an interface you can use to access class' Run Time Type Information.

Note
You must derive your own version of RTTITypeBase, in which you may encapsulate all reflection specific operations.

Implements IReflectable.

Member Data Documentation

Style used when element is in active state and off.

Style used when element is in active state and on.

RectOffset border

Determines how the element is scaled (using the typical Scale9Grid approach).

RectOffset contentOffset

Additional offset to the content, that doesn't effect the bounds.

Applied on top of the margins offsets.

bool fixedHeight

Determines should the layout resize the element depending on available size.

If true no resizing will be done.

bool fixedWidth

Determines should the layout resize the element depending on available size.

If true no resizing will be done.

Style used when element is in focused state and off.

Style used when element is in focused state and on.

HFont font

Font to use for all text within the GUI element.

UINT32 fontSize

Font size to use for all text within the GUI element.

UINT32 height

Wanted height of the GUI element in pixels.

Only used if fixedHeight is enabled.

Style used when element is in hover state and off.

Style used when element is in hover state and on.

GUIImagePosition imagePosition

Position of content image relative to text.

RectOffset margins

Determines offset from the background graphics to the content.

Input uses bounds offset by this value.

UINT32 maxHeight

Maximum height allowed for the GUI element.

Used by the layout only when exact height is not specified.

UINT32 maxWidth

Maximum width allowed for the GUI element.

Used by the layout only when exact width is not specified.

UINT32 minHeight

Minimum height allowed for the GUI element.

Used by the layout only when exact height is not specified.

UINT32 minWidth

Minimum width allowed for the GUI element.

Used by the layout only when exact width is not specified.

Style used when element is in normal state and off.

Style used when element is in normal state and on.

RectOffset padding

Determines extra distance between this and other elements in a layout.

Map<String, String> subStyles

Sub-styles used by certain more complex elements.

TextHorzAlign textHorzAlign

Horizontal alignment of text within the GUI element.

TextVertAlign textVertAlign

Vertical alignment of text within the GUI element.

UINT32 width

Wanted width of the GUI element in pixels.

Only used if fixedWidth is enabled.

bool wordWrap

Should the text word wrap if it doesn't fit.