Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
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.
void forEachWidgetDesigner (Block ablock)
 Visit widget designers with block.
GuiTheme getNamedGuiTheme (String name)
 Get named gui theme or null if absent.
int getNamedGuiThemeCount ()
 Number of named gui themes.
WidgetDesigner getNamedWidgetDesigner (String name)
 Set named widget designer.
WidgetDesigner getWidgetDesigner (String selector)
 Widget designer matching selector.
int getWidgetDesignerCount ()
 Number of widget designers.
Font getWidgetFont ()
 Font for widgets.
GuiTheme new ()
 Creates default gui theme.
GuiTheme new (GuiTheme guitheme)
 Create copy of gui theme.
void removeAllNamedGuiThemes ()
 Remove all named gui themes.
void removeNamedGuiTheme (String name)
 Remove named gui theme.
void setNamedGuiTheme (String name, GuiTheme guitheme)
 Set named gui theme.
void setWidgetDesigner (String name, WidgetDesigner designer)
 Set widget designer.
void setWidgetFont (Font font)
 Set font for widgets.

Public Attributes

Font pFontWidget
Dictionary pNamedGuiThemes
Dictionary pWidgetDesigners

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()

◆ forEachWidgetDesigner()

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

Visit widget designers with block.

First parameter String name. Second parameter WidgetDesigner designer.

Referenced by forEachNamedGuiTheme().

◆ getNamedGuiTheme()

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

Get named gui theme or null if absent.

Referenced by forEachNamedGuiTheme().

◆ getNamedGuiThemeCount()

int Dragengine.Gui.GuiTheme.getNamedGuiThemeCount ( )

Number of named gui themes.

Referenced by forEachNamedGuiTheme().

◆ getNamedWidgetDesigner()

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

Set named widget designer.

References getWidgetFont(), and pFontWidget.

Referenced by forEachNamedGuiTheme().

◆ 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().

References pNamedGuiThemes, and pWidgetDesigners.

Referenced by removeAllNamedGuiThemes().

◆ getWidgetDesignerCount()

int Dragengine.Gui.GuiTheme.getWidgetDesignerCount ( )

Number of widget designers.

Referenced by forEachNamedGuiTheme().

◆ getWidgetFont()

Font Dragengine.Gui.GuiTheme.getWidgetFont ( )

Font for widgets.

References pWidgetDesigners.

Referenced by getNamedWidgetDesigner().

◆ new() [1/2]

GuiTheme Dragengine.Gui.GuiTheme.new ( )

Creates default gui theme.

References new(), and pWidgetDesigners.

Referenced by new().

◆ 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.

References pWidgetDesigners.

◆ removeAllNamedGuiThemes()

void Dragengine.Gui.GuiTheme.removeAllNamedGuiThemes ( )

Remove all named gui themes.

References getWidgetDesigner().

Referenced by forEachNamedGuiTheme().

◆ removeNamedGuiTheme()

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

Remove named gui theme.

Referenced by forEachNamedGuiTheme().

◆ setNamedGuiTheme()

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

Set named gui theme.

Referenced by forEachNamedGuiTheme().

◆ setWidgetDesigner()

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

Set widget designer.

References pFontWidget, and setWidgetFont().

Referenced by forEachNamedGuiTheme().

◆ setWidgetFont()

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

Set font for widgets.

References pFontWidget, pNamedGuiThemes, and pWidgetDesigners.

Referenced by setWidgetDesigner().

Member Data Documentation

◆ pFontWidget

Font Dragengine.Gui.GuiTheme.pFontWidget

◆ pNamedGuiThemes

Dictionary Dragengine.Gui.GuiTheme.pNamedGuiThemes

◆ pWidgetDesigners

Dictionary Dragengine.Gui.GuiTheme.pWidgetDesigners

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