![]() |
Gorgon Game Engine
|
Defines an object according to the Box Model. More...
Public Member Functions | |
virtual | ~ComponentTemplate () |
Destructor. More... | |
int | GetBaseline () const |
Returns the baseline. If set to 0, it will be detected automatically. More... | |
Point | GetCenter () const |
Returns the center point that would be used for rotation. More... | |
bool | GetClip () const |
Returns whether currently clipping the contents. More... | |
ComponentCondition | GetCondition () const |
Returns the current component condition. More... | |
Anchor | GetContainerAnchor () const |
Returns the anchor point of the container that this component will attach to. More... | |
DataEffect | GetDataEffect () const |
Returns how the data will affect this component. More... | |
SizingMode | GetHorizontalSizing () const |
Returns the horizontal sizing mode of the component. More... | |
Margin | GetIndent () const |
Returns the current indent. More... | |
int | GetIndex () const |
Returns the component index. More... | |
Margin | GetMargin () const |
Returns the margin. More... | |
Anchor | GetMyAnchor () const |
Returns the anchor point of this component. More... | |
Point | GetPosition () const |
Returns the current position of the component. More... | |
PositionType | GetPositioning () const |
Returns the positioning method of the component. More... | |
Anchor | GetPreviousAnchor () const |
Returns the anchor point of the previous component that this component will attach to. More... | |
RepeatMode | GetRepeatMode () const |
Returns the repeat mode of this component. More... | |
Size | GetSize () const |
Returns the size of the component. More... | |
Tag | GetTag () const |
Returns the tag of the component. More... | |
ComponentCondition | GetTargetCondition () const |
Returns the target component condition. More... | |
virtual ComponentType | GetType () const noexcept=0 |
Returns the type of the component. More... | |
std::array< float, 4 > | GetValueMax () const |
Returns the value scale maximum. More... | |
float | GetValueMax (int channel) const |
Returns the value scale maximum. More... | |
std::array< float, 4 > | GetValueMin () const |
Returns the value scale minimum. More... | |
float | GetValueMin (int channel) const |
Returns the value scale minimum. More... | |
ValueModification | GetValueModification () const |
Returns which property of this component will be modified by the value. More... | |
std::array< int, 4 > | GetValueOrdering () const |
Returns the ordering of value channels. More... | |
std::array< float, 4 > | GetValueRange () const |
Returns the range of the value scale. More... | |
float | GetValueRange (int channel) const |
Returns the range of the value scale. More... | |
ValueSource | GetValueSource () const |
Returns the value source that will be used. More... | |
SizingMode | GetVerticalSizing () const |
Returns the horizontal sizing mode of the component. More... | |
bool | IsReversible () const |
Returns whether this component transition can be reversed. More... | |
bool | IsTransition () const |
Returns whether this component is a transition component. More... | |
void | SetAnchor (Anchor previous, Anchor container, Anchor my) |
Changes the anchor of the component to the given values. More... | |
void | SetBaseline (int value) |
Changes the baseline of the current component. If set to 0, it will be determined automatically. More... | |
void | SetCenter (Dimension x, Dimension y) |
Changes the center coordinate that will be used in rotation. More... | |
void | SetCenter (Geometry::Point pos, Dimension::Unit unit=Dimension::Pixel) |
Changes the center coordinate that will be used in rotation. More... | |
void | SetCenter (int x, int y, Dimension::Unit unit=Dimension::Pixel) |
Changes the center coordinate that will be used in rotation. More... | |
void | SetCenter (Point value) |
Changes the center coordinate that will be used in rotation. More... | |
void | SetClip (bool value) |
Whether to clip the contents of this container, default value is false. More... | |
void | SetCondition (ComponentCondition from, ComponentCondition to) |
Sets the condition when this component will be visible. This variant will create a transition condition. More... | |
void | SetCondition (ComponentCondition value) |
Sets the condition when this component will be visible. More... | |
void | SetDataEffect (DataEffect effect) |
Sets the data effect for this component. Default is None. More... | |
void | SetIndent (Dimension hor, Dimension ver) |
Changes the indent of the component. More... | |
void | SetIndent (Dimension left, Dimension top, Dimension right, Dimension bottom) |
Changes the indent of the component. More... | |
void | SetIndent (Dimension value) |
Changes the indent of the component. More... | |
void | SetIndent (Geometry::Margin value, Dimension::Unit unit=Dimension::Pixel) |
Changes the indent of the component. More... | |
void | SetIndent (int hor, int ver, Dimension::Unit unit=Dimension::Pixel) |
Changes the indent of the component. More... | |
void | SetIndent (int left, int top, int right, int bottom, Dimension::Unit unit=Dimension::Pixel) |
Changes the indent of the component. More... | |
void | SetIndent (int value, Dimension::Unit unit=Dimension::Pixel) |
Changes the indent of the component. More... | |
void | SetIndent (Margin value) |
Changes the indent of the component. More... | |
void | SetIndex (int value) |
Changes the index of the current component. More... | |
void | SetMargin (Dimension hor, Dimension ver) |
Changes the margin of the component. More... | |
void | SetMargin (Dimension left, Dimension top, Dimension right, Dimension bottom) |
Changes the margin of the component. More... | |
void | SetMargin (Dimension value) |
Changes the margin of the component. More... | |
void | SetMargin (Geometry::Margin value, Dimension::Unit unit=Dimension::Pixel) |
Changes the margin of the component. More... | |
void | SetMargin (int hor, int ver, Dimension::Unit unit=Dimension::Pixel) |
Changes the margin of the component. More... | |
void | SetMargin (int left, int top, int right, int bottom, Dimension::Unit unit=Dimension::Pixel) |
Changes the margin of the component. More... | |
void | SetMargin (int value, Dimension::Unit unit=Dimension::Pixel) |
Changes the margin of the component. More... | |
void | SetMargin (Margin value) |
Changes the margin of the component. More... | |
void | SetPosition (Dimension x, Dimension y) |
Changes the coordinates of the component to the given position. More... | |
void | SetPosition (Geometry::Point pos, Dimension::Unit unit=Dimension::Pixel) |
Changes the coordinates of the component to the given position. More... | |
void | SetPosition (int x, int y, Dimension::Unit unit=Dimension::Pixel) |
Changes the coordinates of the component to the given position. More... | |
void | SetPosition (Point value) |
Changes the coordinates of the component to the given position. More... | |
void | SetPositioning (PositionType value) |
Changes the positioning method of the component. More... | |
void | SetRepeatMode (RepeatMode value) |
Changes the repeat mode of this component. More... | |
void | SetReversible (bool value) |
Sets whether the component transition can be reversed. Can be used to simplify from - to - from animations. More... | |
void | SetSize (Dimension w, Dimension h) |
Changes the size of the component. If sizing mode is automatic, it will be set to fixed. More... | |
void | SetSize (Geometry::Size size, Dimension::Unit unit=Dimension::Pixel) |
Changes the size of the component. The given values are ignored if the sizing mode is Automatic. More... | |
void | SetSize (int w, int h, Dimension::Unit unit=Dimension::Pixel) |
Changes the size of the component. The given values are ignored if the sizing mode is Automatic. More... | |
void | SetSize (Size size) |
Changes the size of the component. If sizing mode is automatic, it will be set to fixed. More... | |
void | SetSizing (SizingMode hor, SizingMode vert) |
Changes the sizing mode of the component. More... | |
void | SetSizing (SizingMode value) |
Changes the sizing mode of the component. More... | |
void | SetTag (Tag value) |
Changes the tag of this component. More... | |
void | SetValueModification (ValueModification mod, ValueSource source=UseFirst, std::array< float, 4 > min={{0, 0, 0, 0}}, std::array< float, 4 > max={{1, 1, 1, 1}}) |
Sets the property that will be affected by the value of the widget. More... | |
void | SetValueOrdering (int first, int second, int third, int fourth) |
Changes the ordering of the values. This allows swaps like X-Y. You should specify which channel will receive which value. More... | |
void | SetValueRange (int channel, float min, float max) |
Changes the data range, which scales the data effect on the component. More... | |
void | SetValueRange (std::array< float, 4 > min, std::array< float, 4 > max) |
Changes the data range, which scales the data effect on the component. More... | |
void | SetValueSource (ValueSource value) |
Returns the value source that will be used. More... | |
Public Attributes | |
Event< ComponentTemplate > | ChangedEvent |
This event will be fired whenever any property is changed. More... | |
Protected Attributes | |
int | baseline |
Manually set baseline for this component. When 0, it will not be effective. More... | |
Point | center |
Center point for rotation. More... | |
bool | clip |
If set to true, will clip the contents of the component to the bounds. More... | |
ComponentCondition | condition |
Condition when this component will be visible. More... | |
ComponentCondition | condition_to |
Condition when this component will be visible, setting condition_to will create a transition component. More... | |
Anchor | container |
Anchor point of the container that this component will be attached to, if it is attaching to its parent. More... | |
DataEffect | dataeffect |
The effect that the data will have on this component. More... | |
Margin | indent |
Indent is added to the margin and padding on the edge of the container. More... | |
int | index |
Component index. More... | |
Margin | margin |
Margin around the object, will be collapsed with other object margins and padding. More... | |
Anchor | my |
Anchor point of the current component. More... | |
Point | position |
Position of the component. More... | |
PositionType | positioning |
Positioning mode. More... | |
Anchor | previous |
Anchor point of the previous component that this component will be attached to. More... | |
RepeatMode | repeat |
Whether the component will be repeated along an axis. More... | |
bool | reversible |
Size | size |
Size of the object. More... | |
SizingMode | sizingh |
SizingMode | sizingw |
Sizing mode. More... | |
ValueSource | source |
The value that will be used for this component. More... | |
Tag | tag |
Tag identifies a component for various modifications depending on the widget. More... | |
std::array< float, 4 > | valuemax |
std::array< float, 4 > | valuemin |
If required, can be used to scale incoming data. More... | |
ValueModification | valuemod |
The property of the component that will be affected by the value. More... | |
std::array< int, 4 > | valueordering |
Changes the ordering of the value source. More... | |
Defines an object according to the Box Model.
enum DataEffect |
Which property will the data of the widget affect.
Enumerator | |
---|---|
None | Nothing will be affected. |
Text | Works only for TextholderTemplate, data will affect the text that is displayed. |
Title | |
Label | |
ValueText1 | |
ValueText2 | |
ValueText3 | |
ValueText4 | |
State1Text | |
State2Text | |
State3Text | |
State4Text | |
AutoStart | |
AutoEnd | |
Icon | Data will effect the displayed graphics. |
Icon1 | |
Icon2 | |
State1Icon | |
State2Icon | |
State3Icon | |
State4Icon |
enum PositionType |
Controls where the component will be placed.
Enumerator | |
---|---|
Relative | Component will be placed relative to the previous component. |
AbsoluteSliding | Absolute positioning, coordinates will start from the container, percent based movement will move to stay within the container. If the component is filling the container, it cannot be moved. |
Absolute | Absolute positioning, coordinates will start from the container. Percent based movement is relative to the size of the component. |
PolarAbsolute | The given coordinates are polar coordinates, The radius is given in pixels and angle is specified in degrees. Parent's center point is used as pole. X component is used as radius and Y component is used as angle. |
enum RepeatMode |
Some components are repeated along some axis, this property controls how they will be repeated.
Use X direction if there is no direction. Y is the angular direction on polar systems. Repeated components will have their values set to the values specified by their position.
Enumerator | |
---|---|
NoRepeat | |
Minor | |
Major | |
XGrid | |
YGrid | |
XTick | |
YTick | |
XMinorGrid | |
YMinorGrid | |
XMajorGrid | |
YMajorGrid | |
XMinorTick | |
YMinorTick | |
XMajorTick | |
YMajorTick |
enum SizingMode |
Controls how the size is affected from the contents of the object.
enum Tag |
Tags mark a component to be modified in a way meaningful to specific widgets.
Components can be queried for their size and positions from the component stack using their tag.
enum ValueModification |
Which property will the value of the widget affect.
It will be scaled between valuemin and valuemax.
enum ValueSource |
Which data channels should be used as the value, common combinations are listed, however, all combinations are valid except when they are used for mouse mapping.
Only the values listed here that use two channels will work fully with mouse mapping. LCh is for circular La*b* color system. Color can also be mapped to coordinate system. Particularly, CH can be mapped to polar coordinates to create a color map. LCh color system is not yet working
|
virtual |
Destructor.
int GetBaseline | ( | ) | const |
Returns the baseline. If set to 0, it will be detected automatically.
References ComponentTemplate::baseline.
Point GetCenter | ( | ) | const |
Returns the center point that would be used for rotation.
References ComponentTemplate::center.
bool GetClip | ( | ) | const |
Returns whether currently clipping the contents.
References ComponentTemplate::clip.
ComponentCondition GetCondition | ( | ) | const |
Returns the current component condition.
References ComponentTemplate::condition.
Anchor GetContainerAnchor | ( | ) | const |
Returns the anchor point of the container that this component will attach to.
This value will be used if this component attaches to its container.
References ComponentTemplate::container.
DataEffect GetDataEffect | ( | ) | const |
Returns how the data will affect this component.
References ComponentTemplate::dataeffect.
SizingMode GetHorizontalSizing | ( | ) | const |
Returns the horizontal sizing mode of the component.
References ComponentTemplate::sizingw.
Margin GetIndent | ( | ) | const |
Returns the current indent.
References ComponentTemplate::indent.
int GetIndex | ( | ) | const |
Returns the component index.
References ComponentTemplate::index.
Margin GetMargin | ( | ) | const |
Returns the margin.
References ComponentTemplate::margin.
Anchor GetMyAnchor | ( | ) | const |
Returns the anchor point of this component.
References ComponentTemplate::my.
Point GetPosition | ( | ) | const |
Returns the current position of the component.
This value is not absolute final position as it cannot be determined before the component is rendered in a widget.
References ComponentTemplate::position.
PositionType GetPositioning | ( | ) | const |
Returns the positioning method of the component.
References ComponentTemplate::positioning.
Anchor GetPreviousAnchor | ( | ) | const |
Returns the anchor point of the previous component that this component will attach to.
This value will be used if this component attaches to another of its siblings.
References ComponentTemplate::previous.
RepeatMode GetRepeatMode | ( | ) | const |
Returns the repeat mode of this component.
References ComponentTemplate::repeat.
Size GetSize | ( | ) | const |
Returns the size of the component.
This value is not absolute final size as it cannot be determined before the component is rendered in a widget.
References ComponentTemplate::size.
Tag GetTag | ( | ) | const |
Returns the tag of the component.
References ComponentTemplate::tag.
ComponentCondition GetTargetCondition | ( | ) | const |
Returns the target component condition.
References ComponentTemplate::condition_to.
|
pure virtualnoexcept |
Returns the type of the component.
Implemented in ContainerTemplate, GraphicsTemplate, TextholderTemplate, IgnoredTemplate, and PlaceholderTemplate.
std::array<float, 4> GetValueMax | ( | ) | const |
Returns the value scale maximum.
References ComponentTemplate::valuemax.
float GetValueMax | ( | int | channel | ) | const |
Returns the value scale maximum.
References ASSERT, and ComponentTemplate::valuemax.
std::array<float, 4> GetValueMin | ( | ) | const |
Returns the value scale minimum.
References ComponentTemplate::valuemin.
float GetValueMin | ( | int | channel | ) | const |
Returns the value scale minimum.
References ASSERT, and ComponentTemplate::valuemin.
ValueModification GetValueModification | ( | ) | const |
Returns which property of this component will be modified by the value.
References ComponentTemplate::valuemod.
std::array<int, 4> GetValueOrdering | ( | ) | const |
Returns the ordering of value channels.
References ComponentTemplate::valueordering.
std::array<float, 4> GetValueRange | ( | ) | const |
Returns the range of the value scale.
References ComponentTemplate::valuemax, and ComponentTemplate::valuemin.
float GetValueRange | ( | int | channel | ) | const |
Returns the range of the value scale.
References ASSERT, ComponentTemplate::valuemax, and ComponentTemplate::valuemin.
ValueSource GetValueSource | ( | ) | const |
Returns the value source that will be used.
References ComponentTemplate::source.
SizingMode GetVerticalSizing | ( | ) | const |
Returns the horizontal sizing mode of the component.
References ComponentTemplate::sizingh.
bool IsReversible | ( | ) | const |
Returns whether this component transition can be reversed.
References ComponentTemplate::reversible.
bool IsTransition | ( | ) | const |
Returns whether this component is a transition component.
References ComponentTemplate::condition_to, and Gorgon::UI::None.
Changes the anchor of the component to the given values.
References ComponentTemplate::ChangedEvent, ComponentTemplate::container, ComponentTemplate::my, and ComponentTemplate::previous.
void SetBaseline | ( | int | value | ) |
Changes the baseline of the current component. If set to 0, it will be determined automatically.
References ComponentTemplate::baseline, and ComponentTemplate::ChangedEvent.
Changes the center coordinate that will be used in rotation.
References ComponentTemplate::center, and ComponentTemplate::ChangedEvent.
void SetCenter | ( | Geometry::Point | pos, |
Dimension::Unit | unit = Dimension::Pixel |
||
) |
Changes the center coordinate that will be used in rotation.
References ComponentTemplate::center, ComponentTemplate::ChangedEvent, basic_Point< T_ >::X, and basic_Point< T_ >::Y.
void SetCenter | ( | int | x, |
int | y, | ||
Dimension::Unit | unit = Dimension::Pixel |
||
) |
Changes the center coordinate that will be used in rotation.
References ComponentTemplate::center, and ComponentTemplate::ChangedEvent.
void SetCenter | ( | Point | value | ) |
Changes the center coordinate that will be used in rotation.
References ComponentTemplate::center, and ComponentTemplate::ChangedEvent.
void SetClip | ( | bool | value | ) |
Whether to clip the contents of this container, default value is false.
Due to shadows, it is advicable not to set clipping on the outer most container. Activating clipping creates a new layer for the component, requiring additional memory. If clipping is on, a component cannot be drawn more than once in different containers.
References ComponentTemplate::clip.
void SetCondition | ( | ComponentCondition | from, |
ComponentCondition | to | ||
) |
Sets the condition when this component will be visible. This variant will create a transition condition.
References ComponentTemplate::ChangedEvent, ComponentTemplate::condition, and ComponentTemplate::condition_to.
void SetCondition | ( | ComponentCondition | value | ) |
Sets the condition when this component will be visible.
The visibility also depens on whether there are other visible components at the same component index. If that is the case, most specific condition will be rendered.
References ComponentTemplate::ChangedEvent, ComponentTemplate::condition, ComponentTemplate::condition_to, and Gorgon::UI::None.
void SetDataEffect | ( | DataEffect | effect | ) |
Sets the data effect for this component. Default is None.
References ComponentTemplate::ChangedEvent, and ComponentTemplate::dataeffect.
Changes the indent of the component.
Indent is added to the margin if the component is at the edge of the container.
References ComponentTemplate::ChangedEvent, and ComponentTemplate::indent.
Changes the indent of the component.
Indent is added to the margin if the component is at the edge of the container.
References ComponentTemplate::ChangedEvent, and ComponentTemplate::indent.
void SetIndent | ( | Dimension | value | ) |
Changes the indent of the component.
Indent is added to the margin if the component is at the edge of the container.
References ComponentTemplate::ChangedEvent, and ComponentTemplate::indent.
void SetIndent | ( | Geometry::Margin | value, |
Dimension::Unit | unit = Dimension::Pixel |
||
) |
Changes the indent of the component.
Indent is added to the margin if the component is at the edge of the container.
References basic_Margin< T_ >::Bottom, ComponentTemplate::ChangedEvent, ComponentTemplate::indent, basic_Margin< T_ >::Left, basic_Margin< T_ >::Right, and basic_Margin< T_ >::Top.
void SetIndent | ( | int | hor, |
int | ver, | ||
Dimension::Unit | unit = Dimension::Pixel |
||
) |
Changes the indent of the component.
Indent is added to the margin if the component is at the edge of the container.
References ComponentTemplate::ChangedEvent, and ComponentTemplate::indent.
void SetIndent | ( | int | left, |
int | top, | ||
int | right, | ||
int | bottom, | ||
Dimension::Unit | unit = Dimension::Pixel |
||
) |
Changes the indent of the component.
Indent is added to the margin if the component is at the edge of the container.
References ComponentTemplate::ChangedEvent, and ComponentTemplate::indent.
void SetIndent | ( | int | value, |
Dimension::Unit | unit = Dimension::Pixel |
||
) |
Changes the indent of the component.
Indent is added to the margin if the component is at the edge of the container.
References ComponentTemplate::ChangedEvent, and ComponentTemplate::indent.
void SetIndent | ( | Margin | value | ) |
Changes the indent of the component.
Indent is added to the margin if the component is at the edge of the container.
References ComponentTemplate::ChangedEvent, and ComponentTemplate::indent.
void SetIndex | ( | int | value | ) |
Changes the index of the current component.
Only one component can be rendered at an index which is determined by the component condition. See component indexing for more information.
References ComponentTemplate::ChangedEvent, and ComponentTemplate::index.
Changes the margin of the component.
Margin is the minimum spacing around the component. Negative margin is possible and will always be subtracted from the other component's margin.
References ComponentTemplate::ChangedEvent, and ComponentTemplate::margin.
Changes the margin of the component.
Margin is the minimum spacing around the component. Negative margin is possible and will always be subtracted from the other component's margin.
References ComponentTemplate::ChangedEvent, and ComponentTemplate::margin.
void SetMargin | ( | Dimension | value | ) |
Changes the margin of the component.
Margin is the minimum spacing around the component. Negative margin is possible and will always be subtracted from the other component's margin.
References ComponentTemplate::ChangedEvent, and ComponentTemplate::margin.
void SetMargin | ( | Geometry::Margin | value, |
Dimension::Unit | unit = Dimension::Pixel |
||
) |
Changes the margin of the component.
Margin is the minimum spacing around the component. Negative margin is possible and will always be subtracted from the other component's margin.
References basic_Margin< T_ >::Bottom, ComponentTemplate::ChangedEvent, basic_Margin< T_ >::Left, ComponentTemplate::margin, basic_Margin< T_ >::Right, and basic_Margin< T_ >::Top.
void SetMargin | ( | int | hor, |
int | ver, | ||
Dimension::Unit | unit = Dimension::Pixel |
||
) |
Changes the margin of the component.
Margin is the minimum spacing around the component. Negative margin is possible and will always be subtracted from the other component's margin.
References ComponentTemplate::ChangedEvent, and ComponentTemplate::margin.
void SetMargin | ( | int | left, |
int | top, | ||
int | right, | ||
int | bottom, | ||
Dimension::Unit | unit = Dimension::Pixel |
||
) |
Changes the margin of the component.
Margin is the minimum spacing around the component. Negative margin is possible and will always be subtracted from the other component's margin.
References ComponentTemplate::ChangedEvent, and ComponentTemplate::margin.
void SetMargin | ( | int | value, |
Dimension::Unit | unit = Dimension::Pixel |
||
) |
Changes the margin of the component.
Margin is the minimum spacing around the component. Negative margin is possible and will always be subtracted from the other component's margin.
References ComponentTemplate::ChangedEvent, and ComponentTemplate::margin.
void SetMargin | ( | Margin | value | ) |
Changes the margin of the component.
Margin is the minimum spacing around the component. Negative margin is possible and will always be subtracted from the other component's margin.
References ComponentTemplate::ChangedEvent, and ComponentTemplate::margin.
Changes the coordinates of the component to the given position.
References ComponentTemplate::ChangedEvent, and ComponentTemplate::position.
void SetPosition | ( | Geometry::Point | pos, |
Dimension::Unit | unit = Dimension::Pixel |
||
) |
Changes the coordinates of the component to the given position.
References ComponentTemplate::ChangedEvent, ComponentTemplate::position, basic_Point< T_ >::X, and basic_Point< T_ >::Y.
void SetPosition | ( | int | x, |
int | y, | ||
Dimension::Unit | unit = Dimension::Pixel |
||
) |
Changes the coordinates of the component to the given position.
References ComponentTemplate::ChangedEvent, and ComponentTemplate::position.
void SetPosition | ( | Point | value | ) |
Changes the coordinates of the component to the given position.
References ComponentTemplate::ChangedEvent, and ComponentTemplate::position.
void SetPositioning | ( | PositionType | value | ) |
Changes the positioning method of the component.
References ComponentTemplate::ChangedEvent, and ComponentTemplate::positioning.
void SetRepeatMode | ( | RepeatMode | value | ) |
Changes the repeat mode of this component.
If the consumer of the component does not know about this repeat mode, this component will be ignored
References ComponentTemplate::ChangedEvent, and ComponentTemplate::repeat.
void SetReversible | ( | bool | value | ) |
Sets whether the component transition can be reversed. Can be used to simplify from - to - from animations.
References ComponentTemplate::ChangedEvent, and ComponentTemplate::reversible.
Changes the size of the component. If sizing mode is automatic, it will be set to fixed.
References ComponentTemplate::SetSize().
void SetSize | ( | Geometry::Size | size, |
Dimension::Unit | unit = Dimension::Pixel |
||
) |
Changes the size of the component. The given values are ignored if the sizing mode is Automatic.
References basic_Size< T_ >::Height, ComponentTemplate::SetSize(), ComponentTemplate::size, and basic_Size< T_ >::Width.
void SetSize | ( | int | w, |
int | h, | ||
Dimension::Unit | unit = Dimension::Pixel |
||
) |
Changes the size of the component. The given values are ignored if the sizing mode is Automatic.
References ComponentTemplate::SetSize().
void SetSize | ( | Size | size | ) |
Changes the size of the component. If sizing mode is automatic, it will be set to fixed.
References ComponentTemplate::Automatic, ComponentTemplate::ChangedEvent, ComponentTemplate::Fixed, basic_Size< T_ >::Height, ComponentTemplate::size, ComponentTemplate::sizingh, ComponentTemplate::sizingw, and basic_Size< T_ >::Width.
void SetSizing | ( | SizingMode | hor, |
SizingMode | vert | ||
) |
Changes the sizing mode of the component.
References ComponentTemplate::ChangedEvent, ComponentTemplate::sizingh, and ComponentTemplate::sizingw.
void SetSizing | ( | SizingMode | value | ) |
Changes the sizing mode of the component.
References ComponentTemplate::ChangedEvent, ComponentTemplate::sizingh, and ComponentTemplate::sizingw.
void SetTag | ( | Tag | value | ) |
Changes the tag of this component.
References ComponentTemplate::ChangedEvent, and ComponentTemplate::tag.
void SetValueModification | ( | ValueModification | mod, |
ValueSource | source = UseFirst , |
||
std::array< float, 4 > | min = {{0, 0, 0, 0}} , |
||
std::array< float, 4 > | max = {{1, 1, 1, 1}} |
||
) |
Sets the property that will be affected by the value of the widget.
Default is NoModification. If min and max is specified incoming value will be scaled accordingly.
void SetValueOrdering | ( | int | first, |
int | second, | ||
int | third, | ||
int | fourth | ||
) |
Changes the ordering of the values. This allows swaps like X-Y. You should specify which channel will receive which value.
References ComponentTemplate::ChangedEvent, and ComponentTemplate::valueordering.
void SetValueRange | ( | int | channel, |
float | min, | ||
float | max | ||
) |
Changes the data range, which scales the data effect on the component.
Not all effects are affected by the range.
References ASSERT, ComponentTemplate::ChangedEvent, ComponentTemplate::valuemax, and ComponentTemplate::valuemin.
void SetValueRange | ( | std::array< float, 4 > | min, |
std::array< float, 4 > | max | ||
) |
Changes the data range, which scales the data effect on the component.
Not all effects are affected by the range.
References ComponentTemplate::ChangedEvent, ComponentTemplate::valuemax, and ComponentTemplate::valuemin.
void SetValueSource | ( | ValueSource | value | ) |
Returns the value source that will be used.
References ComponentTemplate::ChangedEvent, and ComponentTemplate::source.
|
protected |
Manually set baseline for this component. When 0, it will not be effective.
|
protected |
Center point for rotation.
Event<ComponentTemplate> ChangedEvent |
This event will be fired whenever any property is changed.
Can be used to update widget automatically.
|
protected |
If set to true, will clip the contents of the component to the bounds.
|
protected |
Condition when this component will be visible.
|
protected |
Condition when this component will be visible, setting condition_to will create a transition component.
|
protected |
Anchor point of the container that this component will be attached to, if it is attaching to its parent.
|
protected |
The effect that the data will have on this component.
|
protected |
Indent is added to the margin and padding on the edge of the container.
|
protected |
Component index.
Only one component can exist for a specific index position. The ordering and visibility of the components will be determined from the condition. Components will be laid out according to this index. Z-ordering is performed using the order of components in container.
|
protected |
Margin around the object, will be collapsed with other object margins and padding.
|
protected |
Anchor point of the current component.
This point will be matched to the previous component's anchor point
|
protected |
Position of the component.
|
protected |
Positioning mode.
|
protected |
Anchor point of the previous component that this component will be attached to.
If the component positioning is absolute or this is the first component, it will be anchored to the container and parent anchor point will be used.
|
protected |
Whether the component will be repeated along an axis.
If an item will
|
protected |
|
protected |
Size of the object.
|
protected |
|
protected |
Sizing mode.
|
protected |
The value that will be used for this component.
|
protected |
Tag identifies a component for various modifications depending on the widget.
|
protected |
|
protected |
If required, can be used to scale incoming data.
|
protected |
The property of the component that will be affected by the value.
|
protected |
Changes the ordering of the value source.