![]() |
Gorgon Game Engine
|
Generators create templates for widgets. More...
Public Member Functions | |
Generator (bool activate=true) | |
virtual | ~Generator () |
virtual UI::Template | BlankLayerbox ()=0 |
virtual UI::Template | BlankPanel ()=0 |
virtual UI::Template | BottomPanel ()=0 |
virtual UI::Template | Button ()=0 |
Generates a button template. More... | |
virtual UI::Template | Checkbox ()=0 |
virtual UI::Template | CheckboxButton ()=0 |
virtual UI::Template | Dropdown ()=0 |
virtual UI::Template | ErrorLabel ()=0 |
virtual UI::Template | HScrollbar ()=0 |
virtual UI::Template | IconButton (Geometry::Size iconsize={-1, -1})=0 |
Generates a button template with the given default size. More... | |
virtual UI::Template | Inputbox ()=0 |
virtual UI::Template | Label ()=0 |
virtual UI::Template | Layerbox ()=0 |
virtual UI::Template | LeftPanel ()=0 |
virtual UI::Template | Listbox ()=0 |
virtual UI::Template | Panel ()=0 |
virtual UI::Template | Progressbar ()=0 |
virtual UI::Template | RadioButton ()=0 |
virtual UI::Template | RightPanel ()=0 |
virtual UI::Template | TopPanel ()=0 |
virtual UI::Template | VScrollbar ()=0 |
![]() | |
Registry (bool activate=false) | |
Default constructor. More... | |
virtual | ~Registry () |
Destroys all stored templates. More... | |
void | Activate () |
Activates this registry to be used to provide templates. More... | |
virtual int | GetEmSize () const =0 |
virtual int | GetSpacing () const =0 |
const UI::Template & | operator[] (TemplateType type) |
Returns the template for the requested type. More... | |
Protected Member Functions | |
virtual UI::Template & | generate (Gorgon::Widgets::Registry::TemplateType type) override |
This function should return a template for the given type. More... | |
Additional Inherited Members | |
![]() | |
enum | TemplateType { Button_Regular, Button_Icon, Label_Regular, Label_Error, Checkbox_Regular, Checkbox_Button, Radio_Regular, Inputbox_Regular, Panel_Regular, Panel_Blank, Panel_Top, Panel_Left, Panel_Bottom, Panel_Right, Progress_Regular, Layerbox_Regular, Layerbox_Blank, Scrollbar_Horizontal, Scrollbar_Vertical, Listbox_Regular, Dropdown_Regular, Max } |
This enum lists all possible template types. More... | |
![]() | |
static Registry & | Active () |
![]() | |
std::array< UI::Template *, Max > | templates |
Stores the templates. Mutable to allow late loading. More... | |
Generators create templates for widgets.
First setup a generator, then call specific generation functions.
|
virtual |
Generator | ( | bool | activate = true | ) |
|
pure virtual |
Implemented in SimpleGenerator.
|
pure virtual |
Implemented in SimpleGenerator.
|
pure virtual |
Implemented in SimpleGenerator.
|
pure virtual |
Generates a button template.
Implemented in SimpleGenerator.
|
pure virtual |
Implemented in SimpleGenerator.
|
pure virtual |
Implemented in SimpleGenerator.
|
pure virtual |
Implemented in SimpleGenerator.
|
pure virtual |
Implemented in SimpleGenerator.
|
overrideprotectedvirtual |
This function should return a template for the given type.
Due to being used in constructors you are not allowed to reject template type. If the generator is capable of generating a similar template, simply return that one instead of throwing (ie. return Panel_Regular instead of Panel_Top if Panel_Top is not supported). If that is not possible as well, return a template with a fixed error image/text.
Implements Registry.
|
pure virtual |
Implemented in SimpleGenerator.
|
pure virtual |
Generates a button template with the given default size.
Implemented in SimpleGenerator.
|
pure virtual |
Implemented in SimpleGenerator.
|
pure virtual |
Implemented in SimpleGenerator.
|
pure virtual |
Implemented in SimpleGenerator.
|
pure virtual |
Implemented in SimpleGenerator.
|
pure virtual |
Implemented in SimpleGenerator.
|
pure virtual |
Implemented in SimpleGenerator.
|
pure virtual |
Implemented in SimpleGenerator.
|
pure virtual |
Implemented in SimpleGenerator.
|
pure virtual |
Implemented in SimpleGenerator.
|
pure virtual |
Implemented in SimpleGenerator.
|
pure virtual |
Implemented in SimpleGenerator.