Public Types | Public Member Functions | List of all members
ime::ui::SpinButtonRenderer Class Reference

A SpinControl widget renderer. More...

#include <SpinButtonRenderer.h>

Inheritance diagram for ime::ui::SpinButtonRenderer:
ime::ui::IWidgetRenderer

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...
 

Detailed Description

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.

Member Typedef Documentation

◆ Ptr

Unique renderer pointer.

Definition at line 46 of file SpinButtonRenderer.h.

Constructor & Destructor Documentation

◆ ~SpinButtonRenderer()

ime::ui::SpinButtonRenderer::~SpinButtonRenderer ( )
override

Destructor.

Member Function Documentation

◆ clone()

IWidgetRenderer::Ptr ime::ui::SpinButtonRenderer::clone ( ) const
overridevirtual

Create a copy of the render.

Returns
A copy of the render

Implements ime::ui::IWidgetRenderer.

◆ getArrowColour()

Colour ime::ui::SpinButtonRenderer::getArrowColour ( ) const

Get the colour of teh arrows.

Returns
The colour of the arrows

◆ getArrowHoverColour()

Colour ime::ui::SpinButtonRenderer::getArrowHoverColour ( ) const

Get the colour of the arrows when the mouse enters the spin button.

Returns

◆ getBackgroundColour()

Colour ime::ui::SpinButtonRenderer::getBackgroundColour ( ) const

Get the background colour of tab.

Returns
The background colour of the tab

◆ getBackgroundHoverColour()

Colour ime::ui::SpinButtonRenderer::getBackgroundHoverColour ( ) const

Get the background colour of the tab when the mouse enters it.

Returns
The background colour of the tab when the mouse enters it

◆ getBorderColour()

Colour ime::ui::SpinButtonRenderer::getBorderColour ( ) const

Get the border colour.

Returns
The border colour

◆ getBorders()

Borders ime::ui::SpinButtonRenderer::getBorders ( ) const

Get the size of the widgets borders.

Returns
The size of the widgets borders

◆ getInternalPtr()

tgui::WidgetRenderer * ime::ui::SpinButtonRenderer::getInternalPtr ( )
overridevirtual

◆ getOpacity()

float ime::ui::SpinButtonRenderer::getOpacity ( ) const
overridevirtual

Get the opacity of the widget.

Returns
The opacity of the widget

Implements ime::ui::IWidgetRenderer.

◆ getOpacityDisabled()

float ime::ui::SpinButtonRenderer::getOpacityDisabled ( ) const
overridevirtual

Get the opacity of the widget when it is disabled.

Returns
The opacity of the widget in disabled state

This function will return -1 if the widget uses the same opacity as the enabled state when it is disabled

Implements ime::ui::IWidgetRenderer.

◆ getSpaceBetweenArrows()

float ime::ui::SpinButtonRenderer::getSpaceBetweenArrows ( ) const

Get the space between arrows.

Returns
The space between arrows

◆ ignoreTransparentTexture()

void ime::ui::SpinButtonRenderer::ignoreTransparentTexture ( bool  ignoreTransparentParts)
overridevirtual

Set whether mouse events should be ignored on transparent parts of the texture of the widget in normal state.

Parameters
ignoreTransparentPartsTrue 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.

◆ isTransparentTextureIgnored()

bool ime::ui::SpinButtonRenderer::isTransparentTextureIgnored ( ) const
overridevirtual

Check if mouse events are ignored on transparent parts of the texture or not.

Returns
True if mouse events are ignored, otherwise false
See also
ignoreTransparentTexture

Implements ime::ui::IWidgetRenderer.

◆ setArrowColor()

void ime::ui::SpinButtonRenderer::setArrowColor ( Colour  colour)

Set the colour of the arrows.

Parameters
colourThe colour to set

This colour is ignored if the up and down arrow textures are set

◆ setArrowHoverColor()

void ime::ui::SpinButtonRenderer::setArrowHoverColor ( Colour  colour)

Set the colour of the arrows when when the mouse enters enters the spin button.

Parameters
colourThe colour to set

◆ setBackgroundColour()

void ime::ui::SpinButtonRenderer::setBackgroundColour ( Colour  colour)

Set the background colour of the tab.

Parameters
colourThe background colour to set
Note
that this colour is ignored when you set a background image

◆ setBackgroundHoverColour()

void ime::ui::SpinButtonRenderer::setBackgroundHoverColour ( Colour  colour)

Set the background colour of the tab when the mouse enters it.

Parameters
colourThe background colour to set
Note
that this colour is ignored when you set a background image

◆ setBorderColour()

void ime::ui::SpinButtonRenderer::setBorderColour ( Colour  colour)

Set the border colour.

Parameters
colourThe border colour to set

◆ setBorders()

void ime::ui::SpinButtonRenderer::setBorders ( const Borders borders)

Change the size of the widget borders.

Parameters
bordersThe size of the borders

◆ setDownArrowHoverTexture()

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.

Parameters
filenameFilename of the image to set

When this image is set, the hover arrow color property will be ignored

◆ setDownArrowTexture()

void ime::ui::SpinButtonRenderer::setDownArrowTexture ( const std::string &  filename)

Set the image that is used as the down arrow.

Parameters
filenameFilename of the image to set

When this image and the down image are set, the arrow color property will be ignored

◆ setFont()

void ime::ui::SpinButtonRenderer::setFont ( const std::string &  filename)
overridevirtual

Change the widgets font.

Parameters
filenameFilename of the new font
Exceptions
FileNotFoundExceptionIf the font cannot be found on the disk

Implements ime::ui::IWidgetRenderer.

◆ setInternalPtr()

void ime::ui::SpinButtonRenderer::setInternalPtr ( tgui::WidgetRenderer *  renderer)
overridevirtual

◆ setOpacity()

void ime::ui::SpinButtonRenderer::setOpacity ( float  opacity)
overridevirtual

Set the opacity of the widget.

Parameters
opacityThe new opacity of the widget in between 0 and 1

0 means completely transparent, while 1 (default) means fully opaque

Implements ime::ui::IWidgetRenderer.

◆ setOpacityDisabled()

void ime::ui::SpinButtonRenderer::setOpacityDisabled ( float  opacity)
overridevirtual

Set the opacity of the widget when it is disabled.

Parameters
opacityOpacity 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.

◆ setSpaceBetweenArrows()

void ime::ui::SpinButtonRenderer::setSpaceBetweenArrows ( float  space)

Set the space between arrows.

Parameters
spaceThe space to set

◆ setUpArrowHoverTexture()

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.

Parameters
filenameFilename of the image to set

When this image is set, the hover arrow color property will be ignored

◆ setUpArrowTexture()

void ime::ui::SpinButtonRenderer::setUpArrowTexture ( const std::string &  filename)

Set the image that is used as the up arrow.

Parameters
filenameFilename of the image to set

When this image and the down image are set, the arrow color property will be ignored


The documentation for this class was generated from the following file: