Drag[en]gine Script Module DragonScript
1.23
|
Default implementation of WidgetDesigner. More...
Classes | |
class | StateDesign |
Design for a particular widget state. More... | |
Public Member Functions | |
WidgetDesigner | copyDesigner () |
Create copy of designer. More... | |
void | designWidget (Widget widget) |
Design widget. More... | |
StateDesign | getDesignDisabled () |
Design for disabled state. More... | |
StateDesign | getDesignFocused () |
Design for focused state. More... | |
StateDesign | getDesignFocusedHover () |
Design for focused hover state. More... | |
StateDesign | getDesignHover () |
Design for hover state. More... | |
StateDesign | getDesignNormal () |
Design for normal state. More... | |
Widget | getStateTrackWidget (Widget widget) |
Find state track widget. More... | |
DefaultWidgetDesigner | new () |
Create new widget designer. More... | |
DefaultWidgetDesigner | new (DefaultWidgetDesigner designer) |
Create copy of widget designer. More... | |
void | setParameter (String name, Object value) |
Set parameter. More... | |
Protected Member Functions | |
StateDesign | getNamedStateDesign (String stateName) |
Get state for parameter name selector component or null if not found. More... | |
void | setDesignDisabled (StateDesign design) |
Set design for disabled state. More... | |
void | setDesignFocused (StateDesign design) |
Set design for focused state. More... | |
void | setDesignFocusedHover (StateDesign design) |
Set design for focused hover state. More... | |
void | setDesignHover (StateDesign design) |
Set design for hover state. More... | |
void | setDesignNormal (StateDesign design) |
Set design for normal state. More... | |
StateDesign | widgetStateFindDesign (Widget widget) |
Get design to apply to widget. More... | |
Default implementation of WidgetDesigner.
Changes canvas creator and border depending on widget. Supports desigining widget for normal state, disabled state, hovering state and focused state. Default implementation chooses design depending on widget enabled, has focus and hover state. Subclass can overwrite to use a different logi.
WidgetDesigner Dragengine.Gui.Designers.DefaultWidgetDesigner.copyDesigner | ( | ) |
Create copy of designer.
Implements Dragengine.Gui.Designers.WidgetDesigner.
Reimplemented in Dragengine.Gui.Designers.DefaultWindowDesigner, Dragengine.Gui.Designers.DefaultVideoDesigner, Dragengine.Gui.Designers.DefaultSpinButtonDesigner, Dragengine.Gui.Designers.DefaultSliderDesigner, Dragengine.Gui.Designers.DefaultScrollBarDesigner, Dragengine.Gui.Designers.DefaultProgressBarDesigner, Dragengine.Gui.Designers.DefaultOptionBoxDesigner, Dragengine.Gui.Designers.DefaultMenuItemToggleDesigner, Dragengine.Gui.Designers.DefaultMenuItemSubMenuDesigner, Dragengine.Gui.Designers.DefaultLabelDesigner, Dragengine.Gui.Designers.DefaultImageDesigner, Dragengine.Gui.Designers.DefaultComboBoxDesigner, Dragengine.Gui.Designers.DefaultCheckBoxDesigner, Dragengine.Gui.Designers.DefaultButtonWidgetDesigner, and Dragengine.Gui.Designers.DefaultButtonDesigner.
void Dragengine.Gui.Designers.DefaultWidgetDesigner.designWidget | ( | Widget | widget | ) |
Design widget.
Implements Dragengine.Gui.Designers.WidgetDesigner.
Reimplemented in Dragengine.Gui.Designers.DefaultWindowDesigner, Dragengine.Gui.Designers.DefaultVideoDesigner, Dragengine.Gui.Designers.DefaultSpinButtonDesigner, Dragengine.Gui.Designers.DefaultSliderDesigner, Dragengine.Gui.Designers.DefaultScrollBarDesigner, Dragengine.Gui.Designers.DefaultProgressBarDesigner, Dragengine.Gui.Designers.DefaultOptionBoxDesigner, Dragengine.Gui.Designers.DefaultMenuItemToggleDesigner, Dragengine.Gui.Designers.DefaultMenuItemSubMenuDesigner, Dragengine.Gui.Designers.DefaultComboBoxDesigner, and Dragengine.Gui.Designers.DefaultCheckBoxDesigner.
StateDesign Dragengine.Gui.Designers.DefaultWidgetDesigner.getDesignDisabled | ( | ) |
Design for disabled state.
StateDesign Dragengine.Gui.Designers.DefaultWidgetDesigner.getDesignFocused | ( | ) |
Design for focused state.
StateDesign Dragengine.Gui.Designers.DefaultWidgetDesigner.getDesignFocusedHover | ( | ) |
Design for focused hover state.
StateDesign Dragengine.Gui.Designers.DefaultWidgetDesigner.getDesignHover | ( | ) |
Design for hover state.
StateDesign Dragengine.Gui.Designers.DefaultWidgetDesigner.getDesignNormal | ( | ) |
Design for normal state.
|
protected |
Get state for parameter name selector component or null if not found.
Reimplemented in Dragengine.Gui.Designers.DefaultComboBoxDesigner, Dragengine.Gui.Designers.DefaultButtonWidgetDesigner, and Dragengine.Gui.Designers.DefaultButtonDesigner.
Find state track widget.
Finds the widget highest up in the parent widget chain with getStateChangeNotifyChildren() set to true. If not found returns widget.
DefaultWidgetDesigner Dragengine.Gui.Designers.DefaultWidgetDesigner.new | ( | ) |
Create new widget designer.
Reimplemented in Dragengine.Gui.Designers.DefaultWindowDesigner, Dragengine.Gui.Designers.DefaultVideoDesigner, Dragengine.Gui.Designers.DefaultSpinButtonDesigner, Dragengine.Gui.Designers.DefaultSliderDesigner, Dragengine.Gui.Designers.DefaultScrollBarDesigner, Dragengine.Gui.Designers.DefaultProgressBarDesigner, Dragengine.Gui.Designers.DefaultOptionBoxDesigner, Dragengine.Gui.Designers.DefaultMenuItemToggleDesigner, Dragengine.Gui.Designers.DefaultMenuItemSubMenuDesigner, Dragengine.Gui.Designers.DefaultLabelDesigner, Dragengine.Gui.Designers.DefaultImageDesigner, Dragengine.Gui.Designers.DefaultComboBoxDesigner, Dragengine.Gui.Designers.DefaultCheckBoxDesigner, Dragengine.Gui.Designers.DefaultButtonWidgetDesigner, and Dragengine.Gui.Designers.DefaultButtonDesigner.
DefaultWidgetDesigner Dragengine.Gui.Designers.DefaultWidgetDesigner.new | ( | DefaultWidgetDesigner | designer | ) |
Create copy of widget designer.
|
protected |
Set design for disabled state.
|
protected |
Set design for focused state.
|
protected |
Set design for focused hover state.
|
protected |
Set design for hover state.
|
protected |
Set design for normal state.
void Dragengine.Gui.Designers.DefaultWidgetDesigner.setParameter | ( | String | name, |
Object | value | ||
) |
Set parameter.
Supported parameters:
| name | value | Setter | | {state}.canvas | CanvasCreator | getDesign{state}.setCanvasCreator | | {state}.border | BorderFactory | getDesign{state}.setBorderFactory | | {state}.font | Font | getDesign{state}.setFont | | {state}.textColor | Color | getDesign{state}.setTextColor | | {state}.padding | BorderSize | getDesign{state}.setPadding | | {state}.minimumSize | Point | getDesign{state}.setMinimumSize | | {state}.mousePointer | MousePointerFactory | getDesign{state}.setMousePointerFactory |
Whereas {state} can be: | name | value | | normal | Widget is in normal state | | disabled | Widget is disabled | | focused | Widget has focus | | hover | Mouse pointer hover over widget or children thereof | | focusedHover | Mouse pointer hover over widget or children thereof while focused |
Implements Dragengine.Gui.Designers.WidgetDesigner.
Reimplemented in Dragengine.Gui.Designers.DefaultWindowDesigner, Dragengine.Gui.Designers.DefaultVideoDesigner, Dragengine.Gui.Designers.DefaultSpinButtonDesigner, Dragengine.Gui.Designers.DefaultSliderDesigner, Dragengine.Gui.Designers.DefaultScrollBarDesigner, Dragengine.Gui.Designers.DefaultProgressBarDesigner, Dragengine.Gui.Designers.DefaultOptionBoxDesigner, Dragengine.Gui.Designers.DefaultMenuItemToggleDesigner, Dragengine.Gui.Designers.DefaultMenuItemSubMenuDesigner, Dragengine.Gui.Designers.DefaultLabelDesigner, Dragengine.Gui.Designers.DefaultImageDesigner, Dragengine.Gui.Designers.DefaultComboBoxDesigner, Dragengine.Gui.Designers.DefaultCheckBoxDesigner, and Dragengine.Gui.Designers.DefaultButtonDesigner.
|
protected |
Get design to apply to widget.
Determines the state of the widget and the appropriate state design to use. The returned state design can be a set state design or a merge of multiple state designs using a fallback logic.
Reimplemented in Dragengine.Gui.Designers.DefaultComboBoxDesigner, Dragengine.Gui.Designers.DefaultButtonWidgetDesigner, and Dragengine.Gui.Designers.DefaultButtonDesigner.