TGUI
0.7.8
|
Public Member Functions | |
SpinButtonRenderer (SpinButton *spinButton) | |
Constructor. More... | |
virtual void | setProperty (std::string property, const std::string &value) override |
Change a property of the renderer. More... | |
virtual void | setProperty (std::string property, ObjectConverter &&value) override |
Change a property of the renderer. More... | |
virtual ObjectConverter | getProperty (std::string property) const override |
Retrieve the value of a certain property. More... | |
virtual std::map< std::string, ObjectConverter > | getPropertyValuePairs () const override |
Get a map with all properties and their values. More... | |
void | setBackgroundColor (const Color &color) |
Changes the background color of the arrows. More... | |
void | setBackgroundColorNormal (const Color &color) |
Changes the background color of the arrows in the normal state (mouse not on spin button). More... | |
void | setBackgroundColorHover (const Color &color) |
Changes the background color of the arrows in the hover state (mouse standing on top of the spin button). More... | |
void | setArrowColor (const Color &color) |
Changes the color of the arrows. More... | |
void | setArrowColorNormal (const Color &color) |
Changes the color of the arrows in the normal state (mouse not on spin button). More... | |
void | setArrowColorHover (const Color &color) |
Changes the color of the arrows in the hover state (mouse standing on top of the spin button). More... | |
void | setBorderColor (const Color &color) |
Changes the color of the borders that are optionally drawn around the arrows. More... | |
void | setArrowUpTexture (const Texture &texture) |
Change the image that is used as the up arrow. More... | |
void | setArrowDownTexture (const Texture &texture) |
Change the image that is used as the down arrow. More... | |
void | setArrowUpHoverTexture (const Texture &texture) |
Change the image that is used as the up arrow when the mouse is on top of this arrow. More... | |
void | setArrowDownHoverTexture (const Texture &texture) |
Change the image that is used as the up arrow when the mouse is on top of this arrow. More... | |
void | setSpaceBetweenArrows (float space) |
Changes the space that is placed between the arrows. More... | |
Public Member Functions inherited from tgui::WidgetRenderer | |
virtual | ~WidgetRenderer () |
Virtual destructor. | |
Public Member Functions inherited from tgui::WidgetBorders | |
virtual void | setBorders (const Borders &borders) |
Changes the size of the borders. More... | |
void | setBorders (float leftBorder, float topBorder, float rightBorder, float bottomBorder) |
Changes the size of the borders. More... | |
void | setBorders (float width, float height) |
Changes the size of the borders. More... | |
virtual Borders | getBorders () const |
Returns the size of the borders as a tgui::Borders. More... | |
|
inline |
Constructor.
spinButton | The spin button that is connected to the renderer |
|
overridevirtual |
Retrieve the value of a certain property.
property | The property that you would like to retrieve |
Reimplemented from tgui::WidgetRenderer.
|
overridevirtual |
Get a map with all properties and their values.
Reimplemented from tgui::WidgetRenderer.
void tgui::SpinButtonRenderer::setArrowColor | ( | const Color & | color | ) |
Changes the color of the arrows.
color | New arrow color |
This color will overwrite the color for both normal and hover states.
Note that this color is ignored when an up and down arrow image were set.
void tgui::SpinButtonRenderer::setArrowColorHover | ( | const Color & | color | ) |
Changes the color of the arrows in the hover state (mouse standing on top of the spin button).
color | New arrow color |
Note that this color is ignored when an up and down arrow image were set.
void tgui::SpinButtonRenderer::setArrowColorNormal | ( | const Color & | color | ) |
Changes the color of the arrows in the normal state (mouse not on spin button).
color | New arrow color |
Note that this color is ignored when an up and down arrow image were set.
void tgui::SpinButtonRenderer::setArrowDownHoverTexture | ( | const Texture & | texture | ) |
Change the image that is used as the up arrow when the mouse is on top of this arrow.
texture | The new hover arrow texture |
The hover texture is ignored if no normal texture was set. Pass an empty texture to unset the image.
void tgui::SpinButtonRenderer::setArrowDownTexture | ( | const Texture & | texture | ) |
Change the image that is used as the down arrow.
texture | The new arrow texture |
When this image and the up image are set, the color properties will be ignored. Pass an empty texture to unset the image, in this case the color properties will be used again.
void tgui::SpinButtonRenderer::setArrowUpHoverTexture | ( | const Texture & | texture | ) |
Change the image that is used as the up arrow when the mouse is on top of this arrow.
texture | The new hover arrow texture |
The hover texture is ignored if no normal texture was set. Pass an empty texture to unset the image.
void tgui::SpinButtonRenderer::setArrowUpTexture | ( | const Texture & | texture | ) |
Change the image that is used as the up arrow.
texture | The new arrow texture |
When this image and the down image are set, the color properties will be ignored. Pass an empty texture to unset the image, in this case the color properties will be used again.
void tgui::SpinButtonRenderer::setBackgroundColor | ( | const Color & | color | ) |
Changes the background color of the arrows.
color | New background color |
This color will overwrite the color for both normal and hover states.
Note that this color is ignored when an up and down arrow image were set.
void tgui::SpinButtonRenderer::setBackgroundColorHover | ( | const Color & | color | ) |
Changes the background color of the arrows in the hover state (mouse standing on top of the spin button).
color | New background color |
Note that this color is ignored when an up and down arrow image were set.
void tgui::SpinButtonRenderer::setBackgroundColorNormal | ( | const Color & | color | ) |
Changes the background color of the arrows in the normal state (mouse not on spin button).
color | New background color |
Note that this color is ignored when an up and down arrow image were set.
void tgui::SpinButtonRenderer::setBorderColor | ( | const Color & | color | ) |
Changes the color of the borders that are optionally drawn around the arrows.
color | New border color |
|
overridevirtual |
Change a property of the renderer.
property | The property that you would like to change |
value | The new serialized value that you like to assign to the property |
Exception | when deserialization fails or when the widget does not have this property. |
Reimplemented from tgui::WidgetRenderer.
|
overridevirtual |
Change a property of the renderer.
property | The property that you would like to change |
value | The new value that you like to assign to the property. The ObjectConverter is implicitly constructed from the possible value types. |
Exception | for unknown properties or when value was of a wrong type. |
Reimplemented from tgui::WidgetRenderer.
void tgui::SpinButtonRenderer::setSpaceBetweenArrows | ( | float | space | ) |
Changes the space that is placed between the arrows.
This space will use the BorderColor as color.
When images are used, this space is scaled together with the size of the images
space | New space between the arrows |