Drag[en]gine Script Module DragonScript  1.23
Dragengine.Utils.StyledText.Definition.STDStyle Class Reference

Styled text definition style. More...

Inheritance diagram for Dragengine.Utils.StyledText.Definition.STDStyle:

Classes

enum  Align
 Text alignment. More...
 

Public Member Functions

Align getAlignment ()
 Align. More...
 
Color getBackgroundColor ()
 Background color. More...
 
int getCharacterSpacing ()
 Spacing between characters in pixels. More...
 
int getFirstLineIndent ()
 Indention of the first line in pixels. More...
 
Font getFont ()
 Font. More...
 
int getLineSpacing ()
 Spacing between lines in pixels. More...
 
RectArea getMargins ()
 Margins in pixels. More...
 
String getName ()
 Name of style. More...
 
Color getTextColor ()
 Text color. More...
 
STDStyle new (STDStyle style)
 Create copy of style. More...
 
STDStyle new (String name)
 Create style. More...
 
STDStyle new (String name, DefaultLabelDesigner.LabelStateDesign design)
 Create style using parameters from label designer state design. More...
 
STDStyle new (String name, DefaultWidgetDesigner.StateDesign design)
 Create style using parameters from widget designer state design. More...
 
STDStyle new (String name, STDStyle style)
 Create copy of style with different name. More...
 
void setAlignment (Align alignment)
 Set alignment. More...
 
void setBackgroundColor (Color color)
 Set background color. More...
 
void setCharacterSpacing (int spacing)
 Set spacing between characters in pixels. More...
 
void setFirstLineIndent (int indent)
 Set indention of the first line in pixels. More...
 
void setFont (Font font)
 Set font. More...
 
void setLineSpacing (int spacing)
 Set spacing between lines in pixels. More...
 
void setMargins (RectArea margins)
 Set margins in pixels. More...
 
void setTextColor (Color color)
 Set text color. More...
 

Public Attributes

Align pAlignment
 
Color pBackgroundColor
 
int pCharacterSpacing
 
int pFirstLineIndent
 
Font pFont
 
int pLineSpacing
 
RectArea pMargins
 
String pName
 
Color pTextColor
 

Detailed Description

Styled text definition style.

Defines a style for nodes in a styled text definition. The left and right margins are relative to the left and right page margins of the parent styled text definition object. The top margin is relative to the previous node lower position augmented by the previous node bottom margin. Hence the starting position of a node is the lower boundary of the previous node plus a gap equal to the sum of the previous nodes style bottom margin and this styles top margin.

Member Function Documentation

◆ getAlignment()

Align Dragengine.Utils.StyledText.Definition.STDStyle.getAlignment ( )

◆ getBackgroundColor()

Color Dragengine.Utils.StyledText.Definition.STDStyle.getBackgroundColor ( )

Background color.

◆ getCharacterSpacing()

int Dragengine.Utils.StyledText.Definition.STDStyle.getCharacterSpacing ( )

Spacing between characters in pixels.

◆ getFirstLineIndent()

int Dragengine.Utils.StyledText.Definition.STDStyle.getFirstLineIndent ( )

Indention of the first line in pixels.

◆ getFont()

Font Dragengine.Utils.StyledText.Definition.STDStyle.getFont ( )

Font.

◆ getLineSpacing()

int Dragengine.Utils.StyledText.Definition.STDStyle.getLineSpacing ( )

Spacing between lines in pixels.

◆ getMargins()

RectArea Dragengine.Utils.StyledText.Definition.STDStyle.getMargins ( )

Margins in pixels.

◆ getName()

String Dragengine.Utils.StyledText.Definition.STDStyle.getName ( )

Name of style.

◆ getTextColor()

Color Dragengine.Utils.StyledText.Definition.STDStyle.getTextColor ( )

Text color.

◆ new() [1/5]

STDStyle Dragengine.Utils.StyledText.Definition.STDStyle.new ( STDStyle  style)

Create copy of style.

◆ new() [2/5]

STDStyle Dragengine.Utils.StyledText.Definition.STDStyle.new ( String  name)

Create style.

◆ new() [3/5]

STDStyle Dragengine.Utils.StyledText.Definition.STDStyle.new ( String  name,
DefaultLabelDesigner.LabelStateDesign  design 
)

Create style using parameters from label designer state design.

Allows to derive a style from a designer obtained from a widget.

Uses the parameters "padding", "font", "textColor" and "alignment".

Todo:
Support canvas designer as background. This way the canvas creator from the design can be used. Right now Color.transparent is used.

◆ new() [4/5]

STDStyle Dragengine.Utils.StyledText.Definition.STDStyle.new ( String  name,
DefaultWidgetDesigner.StateDesign  design 
)

Create style using parameters from widget designer state design.

Allows to derive a style from a designer obtained from a widget.

Uses the parameters "padding", "font" and "textColor".

Todo:
Support canvas designer as background. This way the canvas creator from the design can be used. Right now Color.transparent is used.

◆ new() [5/5]

STDStyle Dragengine.Utils.StyledText.Definition.STDStyle.new ( String  name,
STDStyle  style 
)

Create copy of style with different name.

◆ setAlignment()

void Dragengine.Utils.StyledText.Definition.STDStyle.setAlignment ( Align  alignment)

Set alignment.

◆ setBackgroundColor()

void Dragengine.Utils.StyledText.Definition.STDStyle.setBackgroundColor ( Color  color)

Set background color.

◆ setCharacterSpacing()

void Dragengine.Utils.StyledText.Definition.STDStyle.setCharacterSpacing ( int  spacing)

Set spacing between characters in pixels.

◆ setFirstLineIndent()

void Dragengine.Utils.StyledText.Definition.STDStyle.setFirstLineIndent ( int  indent)

Set indention of the first line in pixels.

◆ setFont()

void Dragengine.Utils.StyledText.Definition.STDStyle.setFont ( Font  font)

Set font.

◆ setLineSpacing()

void Dragengine.Utils.StyledText.Definition.STDStyle.setLineSpacing ( int  spacing)

Set spacing between lines in pixels.

◆ setMargins()

void Dragengine.Utils.StyledText.Definition.STDStyle.setMargins ( RectArea  margins)

Set margins in pixels.

◆ setTextColor()

void Dragengine.Utils.StyledText.Definition.STDStyle.setTextColor ( Color  color)

Set text color.

Member Data Documentation

◆ pAlignment

Align Dragengine.Utils.StyledText.Definition.STDStyle.pAlignment

◆ pBackgroundColor

Color Dragengine.Utils.StyledText.Definition.STDStyle.pBackgroundColor

◆ pCharacterSpacing

int Dragengine.Utils.StyledText.Definition.STDStyle.pCharacterSpacing

◆ pFirstLineIndent

int Dragengine.Utils.StyledText.Definition.STDStyle.pFirstLineIndent

◆ pFont

Font Dragengine.Utils.StyledText.Definition.STDStyle.pFont

◆ pLineSpacing

int Dragengine.Utils.StyledText.Definition.STDStyle.pLineSpacing

◆ pMargins

RectArea Dragengine.Utils.StyledText.Definition.STDStyle.pMargins

◆ pName

String Dragengine.Utils.StyledText.Definition.STDStyle.pName

◆ pTextColor

Color Dragengine.Utils.StyledText.Definition.STDStyle.pTextColor

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