![]() |
Gorgon Game Engine
|
This class stores visual information about a widget template. More...
Public Types | |
| enum | SizeMode { Free, Fixed, Multiples } |
| Size mode of the template, will be applied separately to X and Y dimensions. More... | |
Public Member Functions | |
| Template () | |
| Template (Template &&)=default | |
| ~Template () | |
| Destructor. More... | |
| ContainerTemplate & | AddContainer (int index, ComponentCondition cond) |
| This will create a new drawable and return it. More... | |
| ContainerTemplate & | AddContainer (int index, ComponentCondition from, ComponentCondition to) |
| This will create a new drawable and return it. More... | |
| GraphicsTemplate & | AddGraphics (int index, ComponentCondition cond) |
| This will create a new drawable and return it. More... | |
| GraphicsTemplate & | AddGraphics (int index, ComponentCondition from, ComponentCondition to) |
| This will create a new drawable and return it. More... | |
| IgnoredTemplate & | AddIgnored (int index, ComponentCondition cond) |
| This will create a new ignored template. More... | |
| IgnoredTemplate & | AddIgnored (int index, ComponentCondition from, ComponentCondition to) |
| This will create a new ignored template. More... | |
| PlaceholderTemplate & | AddPlaceholder (int index, ComponentCondition cond) |
| This will create a new placeholder and return it. More... | |
| PlaceholderTemplate & | AddPlaceholder (int index, ComponentCondition from, ComponentCondition to) |
| This will create a new placeholder and return it. More... | |
| TextholderTemplate & | AddTextholder (int index, ComponentCondition cond) |
| This will create a new textholder and return it. More... | |
| TextholderTemplate & | AddTextholder (int index, ComponentCondition from, ComponentCondition to) |
| This will create a new textholder and return it. More... | |
| void | Assume (ComponentTemplate &component) |
| Adds a previously created component to the template, the ownership of the object is transferred to the template object. More... | |
| ComponentTemplate & | Get (int index) const |
| Returns the component at the given index. More... | |
| Geometry::Size | GetAdditionalSize () const |
| Returns the additional size. More... | |
| int | GetConditionDuration (ComponentCondition from, ComponentCondition to) const |
| Returns the duration of the component condition. More... | |
| int | GetCount () const |
| Returns the number of components in the template. More... | |
| int | GetHeight () const |
| Returns the size of the template. More... | |
| Geometry::Size | GetSize () const |
| Returns the size of the template. More... | |
| int | GetSpacing () const |
| Returns the spacing required for this template. More... | |
| int | GetWidth () const |
| Returns the size of the template. More... | |
| SizeMode | GetXSizing () const |
| Returns the sizing mode. More... | |
| SizeMode | GetYSizing () const |
| Returns the sizing mode. More... | |
| Template & | operator= (Template &&)=default |
| ComponentTemplate & | operator[] (int index) const |
| Returns the component at the given index. More... | |
| ComponentTemplate & | Release (int index) |
| Releases the component and its ownership. More... | |
| void | Remove (int index) |
| Removes the component at the given index. More... | |
| void | SetAdditionalSize (Geometry::Size value) |
| Changes the additional size of the template. More... | |
| void | SetAdditionalSize (int w, int h) |
| Changes the additional size of the template. More... | |
| void | SetConditionDuration (ComponentCondition from, ComponentCondition to, int duration) |
| Changes the duration of a component condition. More... | |
| void | SetSize (Geometry::Size value) |
| Changes the size of the template. More... | |
| void | SetSize (int w, int h) |
| Changes the size of the template. More... | |
| void | SetSizing (SizeMode x, SizeMode y) |
| Changes the size mode of the template. More... | |
| void | SetSpacing (int value) |
| Sets the spacing required for this template. More... | |
Public Attributes | |
| Event< Template > | ChangedEvent |
| This event is fired whenever template or its components are changed. More... | |
| std::string | Name |
This class stores visual information about a widget template.
| enum SizeMode |
Size mode of the template, will be applied separately to X and Y dimensions.
| Template | ( | ) |
| ~Template | ( | ) |
Destructor.
| ContainerTemplate& AddContainer | ( | int | index, |
| ComponentCondition | cond | ||
| ) |
This will create a new drawable and return it.
The ownership will stay with the template. Index is the component index not the order in the template.
References Template::AddContainer(), and Gorgon::UI::None.
| ContainerTemplate & AddContainer | ( | int | index, |
| ComponentCondition | from, | ||
| ComponentCondition | to | ||
| ) |
This will create a new drawable and return it.
The ownership will stay with the template. Index is the component index not the order in the template.
References Template::ChangedEvent.
| GraphicsTemplate& AddGraphics | ( | int | index, |
| ComponentCondition | cond | ||
| ) |
This will create a new drawable and return it.
The ownership will stay with the template. Index is the component index not the order in the template.
References Template::AddGraphics(), and Gorgon::UI::None.
| GraphicsTemplate & AddGraphics | ( | int | index, |
| ComponentCondition | from, | ||
| ComponentCondition | to | ||
| ) |
This will create a new drawable and return it.
The ownership will stay with the template. Index is the component index not the order in the template.
References Template::ChangedEvent.
| IgnoredTemplate& AddIgnored | ( | int | index, |
| ComponentCondition | cond | ||
| ) |
This will create a new ignored template.
Ignored templates are used to erase templates that are set to Always
References Template::AddIgnored(), and Gorgon::UI::None.
| IgnoredTemplate & AddIgnored | ( | int | index, |
| ComponentCondition | from, | ||
| ComponentCondition | to | ||
| ) |
This will create a new ignored template.
Ignored templates are used to erase templates that are set to Always
References Template::ChangedEvent.
| PlaceholderTemplate& AddPlaceholder | ( | int | index, |
| ComponentCondition | cond | ||
| ) |
This will create a new placeholder and return it.
The ownership will stay with the template. Index is the component index not the order in the template.
References Template::AddPlaceholder(), and Gorgon::UI::None.
| PlaceholderTemplate & AddPlaceholder | ( | int | index, |
| ComponentCondition | from, | ||
| ComponentCondition | to | ||
| ) |
This will create a new placeholder and return it.
The ownership will stay with the template. Index is the component index not the order in the template.
References Template::ChangedEvent.
| TextholderTemplate& AddTextholder | ( | int | index, |
| ComponentCondition | cond | ||
| ) |
This will create a new textholder and return it.
The ownership will stay with the template. Index is the component index not the order in the template.
References Template::AddTextholder(), and Gorgon::UI::None.
| TextholderTemplate & AddTextholder | ( | int | index, |
| ComponentCondition | from, | ||
| ComponentCondition | to | ||
| ) |
This will create a new textholder and return it.
The ownership will stay with the template. Index is the component index not the order in the template.
References Template::ChangedEvent.
| void Assume | ( | ComponentTemplate & | component | ) |
Adds a previously created component to the template, the ownership of the object is transferred to the template object.
References Template::ChangedEvent, and ComponentTemplate::ChangedEvent.
| ComponentTemplate& Get | ( | int | index | ) | const |
Returns the component at the given index.
This index is not component index, but rather the location of the component in the template.
| Geometry::Size GetAdditionalSize | ( | ) | const |
Returns the additional size.
This value should only be set and used if the size mode is multiple
| int GetConditionDuration | ( | ComponentCondition | from, |
| ComponentCondition | to | ||
| ) | const |
Returns the duration of the component condition.
| int GetCount | ( | ) | const |
Returns the number of components in the template.
| int GetHeight | ( | ) | const |
Returns the size of the template.
References basic_Size< T_ >::Height.
| Geometry::Size GetSize | ( | ) | const |
Returns the size of the template.
| int GetSpacing | ( | ) | const |
Returns the spacing required for this template.
Organizer widgets uses this spacing in order to layout the widgets.
| int GetWidth | ( | ) | const |
Returns the size of the template.
References basic_Size< T_ >::Width.
| SizeMode GetXSizing | ( | ) | const |
Returns the sizing mode.
| SizeMode GetYSizing | ( | ) | const |
Returns the sizing mode.
| ComponentTemplate& operator[] | ( | int | index | ) | const |
Returns the component at the given index.
This index is not component index, but rather the location of the component in the template.
| ComponentTemplate & Release | ( | int | index | ) |
Releases the component and its ownership.
References Template::ChangedEvent.
| void Remove | ( | int | index | ) |
Removes the component at the given index.
References Template::ChangedEvent.
| void SetAdditionalSize | ( | Geometry::Size | value | ) |
Changes the additional size of the template.
This value should only be set and used if the size mode is multiple
References Template::ChangedEvent.
| void SetAdditionalSize | ( | int | w, |
| int | h | ||
| ) |
Changes the additional size of the template.
This value should only be set and used if the size mode is multiple
References Template::ChangedEvent.
| void SetConditionDuration | ( | ComponentCondition | from, |
| ComponentCondition | to, | ||
| int | duration | ||
| ) |
Changes the duration of a component condition.
Durations on final conditions are ignored, only transition condition durations are used. Duration is in milliseconds
References Template::ChangedEvent.
| void SetSize | ( | Geometry::Size | value | ) |
Changes the size of the template.
References Template::ChangedEvent.
| void SetSize | ( | int | w, |
| int | h | ||
| ) |
Changes the size of the template.
References Template::ChangedEvent.
Changes the size mode of the template.
References Template::ChangedEvent.
| void SetSpacing | ( | int | value | ) |
Sets the spacing required for this template.
Organizer widgets uses this spacing in order to layout the widgets.
References Template::ChangedEvent.
| std::string Name |