A SpinControl widget renderer. More...
#include <SpinButtonRenderer.h>
Public Types | |
using | Ptr = std::unique_ptr< SpinButtonRenderer > |
Unique renderer pointer. More... | |
Public Member Functions | |
void | setBorders (const Borders &borders) |
Change the size of the widget borders. More... | |
Borders | getBorders () const |
Get the size of the widgets borders. More... | |
void | setSpaceBetweenArrows (float space) |
Set the space between arrows. More... | |
float | getSpaceBetweenArrows () const |
Get the space between arrows. More... | |
void | setBackgroundColour (Colour colour) |
Set the background colour of the tab. More... | |
Colour | getBackgroundColour () const |
Get the background colour of tab. More... | |
void | setBackgroundHoverColour (Colour colour) |
Set the background colour of the tab when the mouse enters it. More... | |
Colour | getBackgroundHoverColour () const |
Get the background colour of the tab when the mouse enters it. More... | |
void | setArrowColor (Colour colour) |
Set the colour of the arrows. More... | |
Colour | getArrowColour () const |
Get the colour of teh arrows. More... | |
void | setArrowHoverColor (Colour colour) |
Set the colour of the arrows when when the mouse enters enters the spin button. More... | |
Colour | getArrowHoverColour () const |
Get the colour of the arrows when the mouse enters the spin button. More... | |
void | setBorderColour (Colour colour) |
Set the border colour. More... | |
Colour | getBorderColour () const |
Get the border colour. More... | |
void | setUpArrowTexture (const std::string &filename) |
Set the image that is used as the up arrow. More... | |
void | setUpArrowHoverTexture (const std::string &filename) |
Set the image that is used as the up arrow when the mouse enters the spin button. More... | |
void | setDownArrowTexture (const std::string &filename) |
Set the image that is used as the down arrow. More... | |
void | setDownArrowHoverTexture (const std::string &filename) |
Set the image that is used as the down arrow when the mouse enters the spin button. More... | |
void | setOpacity (float opacity) override |
Set the opacity of the widget. More... | |
float | getOpacity () const override |
Get the opacity of the widget. More... | |
void | setOpacityDisabled (float opacity) override |
Set the opacity of the widget when it is disabled. More... | |
float | getOpacityDisabled () const override |
Get the opacity of the widget when it is disabled. More... | |
void | setFont (const std::string &filename) override |
Change the widgets font. More... | |
void | ignoreTransparentTexture (bool ignoreTransparentParts) override |
Set whether mouse events should be ignored on transparent parts of the texture of the widget in normal state. More... | |
bool | isTransparentTextureIgnored () const override |
Check if mouse events are ignored on transparent parts of the texture or not. More... | |
IWidgetRenderer::Ptr | clone () const override |
Create a copy of the render. More... | |
void | setInternalPtr (tgui::WidgetRenderer *renderer) override |
tgui::WidgetRenderer * | getInternalPtr () override |
~SpinButtonRenderer () override | |
Destructor. More... | |
A SpinControl widget renderer.
This class allows you to manipulate the render properties of a SpinControl widget
Definition at line 44 of file SpinButtonRenderer.h.
using ime::ui::SpinButtonRenderer::Ptr = std::unique_ptr<SpinButtonRenderer> |
Unique renderer pointer.
Definition at line 46 of file SpinButtonRenderer.h.
|
override |
Destructor.
|
overridevirtual |
Colour ime::ui::SpinButtonRenderer::getArrowColour | ( | ) | const |
Get the colour of teh arrows.
Colour ime::ui::SpinButtonRenderer::getArrowHoverColour | ( | ) | const |
Get the colour of the arrows when the mouse enters the spin button.
Colour ime::ui::SpinButtonRenderer::getBackgroundColour | ( | ) | const |
Get the background colour of tab.
Colour ime::ui::SpinButtonRenderer::getBackgroundHoverColour | ( | ) | const |
Get the background colour of the tab when the mouse enters it.
Colour ime::ui::SpinButtonRenderer::getBorderColour | ( | ) | const |
Get the border colour.
Borders ime::ui::SpinButtonRenderer::getBorders | ( | ) | const |
Get the size of the widgets borders.
|
overridevirtual |
Implements ime::ui::IWidgetRenderer.
|
overridevirtual |
Get the opacity of the widget.
Implements ime::ui::IWidgetRenderer.
|
overridevirtual |
Get the opacity of the widget when it is disabled.
This function will return -1 if the widget uses the same opacity as the enabled state when it is disabled
Implements ime::ui::IWidgetRenderer.
float ime::ui::SpinButtonRenderer::getSpaceBetweenArrows | ( | ) | const |
Get the space between arrows.
|
overridevirtual |
Set whether mouse events should be ignored on transparent parts of the texture of the widget in normal state.
ignoreTransparentParts | True to ignore mouse events on transparent parts of the texture, otherwise false |
When mouse events are ignored, they are passed to a widget behind the widget. By default, mouse events are NOT ignored and the widget will receive mouse events even on transparent texture parts. This property does nothing if the widget doesn't use textures
Implements ime::ui::IWidgetRenderer.
|
overridevirtual |
Check if mouse events are ignored on transparent parts of the texture or not.
Implements ime::ui::IWidgetRenderer.
void ime::ui::SpinButtonRenderer::setArrowColor | ( | Colour | colour | ) |
Set the colour of the arrows.
colour | The colour to set |
This colour is ignored if the up and down arrow textures are set
void ime::ui::SpinButtonRenderer::setArrowHoverColor | ( | Colour | colour | ) |
Set the colour of the arrows when when the mouse enters enters the spin button.
colour | The colour to set |
void ime::ui::SpinButtonRenderer::setBackgroundColour | ( | Colour | colour | ) |
Set the background colour of the tab.
colour | The background colour to set |
void ime::ui::SpinButtonRenderer::setBackgroundHoverColour | ( | Colour | colour | ) |
Set the background colour of the tab when the mouse enters it.
colour | The background colour to set |
void ime::ui::SpinButtonRenderer::setBorderColour | ( | Colour | colour | ) |
Set the border colour.
colour | The border colour to set |
void ime::ui::SpinButtonRenderer::setBorders | ( | const Borders & | borders | ) |
Change the size of the widget borders.
borders | The size of the borders |
void ime::ui::SpinButtonRenderer::setDownArrowHoverTexture | ( | const std::string & | filename | ) |
Set the image that is used as the down arrow when the mouse enters the spin button.
filename | Filename of the image to set |
When this image is set, the hover arrow color property will be ignored
void ime::ui::SpinButtonRenderer::setDownArrowTexture | ( | const std::string & | filename | ) |
Set the image that is used as the down arrow.
filename | Filename of the image to set |
When this image and the down image are set, the arrow color property will be ignored
|
overridevirtual |
Change the widgets font.
filename | Filename of the new font |
FileNotFoundException | If the font cannot be found on the disk |
Implements ime::ui::IWidgetRenderer.
|
overridevirtual |
Implements ime::ui::IWidgetRenderer.
|
overridevirtual |
Set the opacity of the widget.
opacity | The new opacity of the widget in between 0 and 1 |
0 means completely transparent, while 1 (default) means fully opaque
Implements ime::ui::IWidgetRenderer.
|
overridevirtual |
Set the opacity of the widget when it is disabled.
opacity | Opacity to set between 0 and 1 |
0 means completely transparent, while 1 (default) means fully opaque. Set to -1 (default) to use the normal opacity value even when the widget is disabled.
Implements ime::ui::IWidgetRenderer.
void ime::ui::SpinButtonRenderer::setSpaceBetweenArrows | ( | float | space | ) |
Set the space between arrows.
space | The space to set |
void ime::ui::SpinButtonRenderer::setUpArrowHoverTexture | ( | const std::string & | filename | ) |
Set the image that is used as the up arrow when the mouse enters the spin button.
filename | Filename of the image to set |
When this image is set, the hover arrow color property will be ignored
void ime::ui::SpinButtonRenderer::setUpArrowTexture | ( | const std::string & | filename | ) |
Set the image that is used as the up arrow.
filename | Filename of the image to set |
When this image and the down image are set, the arrow color property will be ignored