Drag[en]gine Script Module DragonScript  1.21
Dragengine.Gui.GuiTheme Class Reference

Gui theme. More...

Inheritance diagram for Dragengine.Gui.GuiTheme:

Public Member Functions

void forEachNamedGuiTheme (Block ablock)
 Visit named gui themes with block with parameters String and GuiTheme. More...
 
void forEachWidgetDesigner (Block ablock)
 Visit widget designers with block. More...
 
GuiTheme getNamedGuiTheme (String name)
 Get named gui theme or null if absent. More...
 
int getNamedGuiThemeCount ()
 Number of named gui themes. More...
 
WidgetDesigner getNamedWidgetDesigner (String name)
 Set named widget designer. More...
 
WidgetDesigner getWidgetDesigner (String selector)
 Widget designer matching selector. More...
 
int getWidgetDesignerCount ()
 Number of widget designers. More...
 
Font getWidgetFont ()
 Font for widgets. More...
 
GuiTheme new ()
 Creates default gui theme. More...
 
GuiTheme new (GuiTheme guitheme)
 Create copy of gui theme. More...
 
void removeAllNamedGuiThemes ()
 Remove all named gui themes. More...
 
void removeNamedGuiTheme (String name)
 Remove named gui theme. More...
 
void setNamedGuiTheme (String name, GuiTheme guitheme)
 Set named gui theme. More...
 
void setWidgetDesigner (String name, WidgetDesigner designer)
 Set widget designer. More...
 
void setWidgetFont (Font font)
 Set font for widgets. More...
 

Detailed Description

Gui theme.

Contains widget designers and some global parameters to design widgets. Gui themes are shared both while loading and while assigning to widgets. Do not directly modify gui themes attached to widgets or received from LoadGuiTheme. If you need to modify them create a copy first using copy constructor.

Member Function Documentation

◆ forEachNamedGuiTheme()

void Dragengine.Gui.GuiTheme.forEachNamedGuiTheme ( Block  ablock)

Visit named gui themes with block with parameters String and GuiTheme.

◆ forEachWidgetDesigner()

void Dragengine.Gui.GuiTheme.forEachWidgetDesigner ( Block  ablock)

Visit widget designers with block.

First parameter String name. Second parameter WidgetDesigner designer.

◆ getNamedGuiTheme()

GuiTheme Dragengine.Gui.GuiTheme.getNamedGuiTheme ( String  name)

Get named gui theme or null if absent.

◆ getNamedGuiThemeCount()

int Dragengine.Gui.GuiTheme.getNamedGuiThemeCount ( )

Number of named gui themes.

◆ getNamedWidgetDesigner()

WidgetDesigner Dragengine.Gui.GuiTheme.getNamedWidgetDesigner ( String  name)

Set named widget designer.

◆ getWidgetDesigner()

WidgetDesigner Dragengine.Gui.GuiTheme.getWidgetDesigner ( String  selector)

Widget designer matching selector.

Selector composes of alphanumeric identifier. A chain of identifiers can be specified separated by periods. If a chain is defined the full chain is first checked to find the designer. If not found the right most identifier is stripped and the remaining chain checked for a match. The first match is used. This allows to add optional quallifier identifers at the end of the chain for future use while still matching broader designers in the mean time.

As rule of thumb selector is the widget class name (for example Button) with optional qualifiers appended if necessary.

Returned widget designer is shared. Do not modify directly. If you need to modify using setParameter() call first copyDesigner().

◆ getWidgetDesignerCount()

int Dragengine.Gui.GuiTheme.getWidgetDesignerCount ( )

Number of widget designers.

◆ getWidgetFont()

Font Dragengine.Gui.GuiTheme.getWidgetFont ( )

Font for widgets.

◆ new() [1/2]

GuiTheme Dragengine.Gui.GuiTheme.new ( )

Creates default gui theme.

◆ new() [2/2]

GuiTheme Dragengine.Gui.GuiTheme.new ( GuiTheme  guitheme)

Create copy of gui theme.

Widget designers are shared across copied gui themes. If you need to modify a widget designer using setParameter() you have to call copyDesigner() first and replace the entry in this dictionary.

◆ removeAllNamedGuiThemes()

void Dragengine.Gui.GuiTheme.removeAllNamedGuiThemes ( )

Remove all named gui themes.

◆ removeNamedGuiTheme()

void Dragengine.Gui.GuiTheme.removeNamedGuiTheme ( String  name)

Remove named gui theme.

◆ setNamedGuiTheme()

void Dragengine.Gui.GuiTheme.setNamedGuiTheme ( String  name,
GuiTheme  guitheme 
)

Set named gui theme.

◆ setWidgetDesigner()

void Dragengine.Gui.GuiTheme.setWidgetDesigner ( String  name,
WidgetDesigner  designer 
)

Set widget designer.

◆ setWidgetFont()

void Dragengine.Gui.GuiTheme.setWidgetFont ( Font  font)

Set font for widgets.


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