Style

Contains a style for a node.

Constructors

this
this()
Undocumented in source.
this
this(Style[] styles)

Create a style by copying params of others.

Members

Enums

Side
enum Side
Undocumented in source.

Functions

contentBox
Vector2 contentBox(Vector2 size)

Remove padding from the vector representing size of a box.

contentBox
Rectangle contentBox(Rectangle rect)

Remove padding from the given rect.

drawBackground
void drawBackground(Rectangle rect)

Draw the background

drawText
void drawText(Rectangle rect, string text, bool wrap)

Draw text using the same params as measureText.

getFont
inout(Font) getFont()

Get the current font

measureText
Vector2 measureText(Vector2 availableSpace, string text, bool wrap)
Rectangle measureText(Rectangle availableSpace, string text, bool wrap)

Measure space given text will use.

update
void update()

Update the style with given D code.

wrapText
TextLine[] wrapText(double width, string text, bool lineFeedsOnly)

Split the text into multiple lines in order to fit within given width.

Static functions

init
Style init()

Get the default, empty style.

Static variables

_currentTheme
Theme _currentTheme;
Undocumented in source.
_styleStack
Style[] _styleStack;
Undocumented in source.

Structs

__anonymous
struct __anonymous
Undocumented in source.
__anonymous
struct __anonymous
Undocumented in source.
__anonymous
struct __anonymous
Undocumented in source.
__anonymous
struct __anonymous
Undocumented in source.

Meta