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

A Tabs widget renderer. More...

#include <TabsRenderer.h>

Inheritance diagram for ime::ui::TabsRenderer:
ime::ui::IWidgetRenderer

Public Types

using Ptr = std::unique_ptr< TabsRenderer >
 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 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 setDisabledBackgroundColour (Colour colour)
 Set the background colour of the tab when it is disabled. More...
 
Colour getDisabledBackgroundColour () const
 Get the background colour of the tab when it is disabled. More...
 
void setSelectedBackgroundColour (Colour backgroundColour)
 Set the background colour of the selected tab. More...
 
Colour getSelectedBackgroundColour () const
 Get the background colour of the elected tab. More...
 
void setSelectedBackgroundHoverColour (Colour backgroundColour)
 Set the background colour of the selected tab when the mouse is on top of it. More...
 
Colour getSelectedBackgroundHoverColour () const
 Get the background colour of the selected tab when the mouse is on top of it. More...
 
void setTextColour (Colour colour)
 Set the colour of the text displayed on the tab. More...
 
Colour getTextColour () const
 Get the colour of the tab text. More...
 
void setTextHoverColour (Colour colour)
 Set the text colour when the mouse enters the tab. More...
 
Colour getTextHoverColour () const
 Get the text colour when the mouse enters the tab. More...
 
void setDisabledTextColour (Colour colour)
 Set the colour of the text when the tab is disabled. More...
 
Colour getDisabledTextColour () const
 Get the colour of the text when the tab is disabled. More...
 
void setSelectedTextColour (Colour textColour)
 Set the colour of the text for a selected tab. More...
 
Colour getSelectedTextColour () const
 Get the colour of the text when the tab is selected. More...
 
void setSelectedTextHoverColour (Colour textColour)
 Set the colour of the text for a tab when the mouse is on top of it. More...
 
Colour getSelectedTextColourHover () const
 Get the colour of the text when it is selected and the mouse is on top of it. More...
 
void setBorderColour (Colour colour)
 Set the border colour. More...
 
Colour getBorderColour () const
 Get the border colour. More...
 
void setBorderHoverColour (Colour colour)
 Set the background colour of when the mouse enters the tab. More...
 
Colour getBorderHoverColour () const
 Get the background colour of when the mouse enters the tab. More...
 
void setSelectedBorderColour (Colour colour)
 Set the border colours for a selected tab. More...
 
Colour getSelectedBorderColour () const
 Get the colour of the borders when a tab is selected. More...
 
void setSelectedBorderHoverColour (Colour colour)
 Set the colour of the borders for a selected tab when the mouse is on top of it. More...
 
Colour getSelectedBorderHoverColour () const
 Get the colour of the borders when a tab is selected and the mouse is on top of it. More...
 
void setTabTexture (const std::string &filename)
 Set the image of a tab. More...
 
void setTabHoverTexture (const std::string &filename)
 Set the image of the tab when the mouse is on top of it. More...
 
void setSelectedTabTexture (const std::string &filename)
 Set the image of a selected tab. More...
 
void setSelectedTabHoverTexture (const std::string &filename)
 Set the image of a selected tab when the mouse is on top of it. More...
 
void setDisabledTabTexture (const std::string &filename)
 Set the image of the tab when it is disabled. More...
 
void setDistanceToSide (float distanceToSide)
 Set the distance between the text and the side of the tab. More...
 
float getDistanceToSide () const
 Get the distance between the text and the side of the tab. 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
 
 ~TabsRenderer () override
 Destructor. More...
 

Detailed Description

A Tabs widget renderer.

This class allows you to manipulate the render properties of a Tabs widget

Definition at line 44 of file TabsRenderer.h.

Member Typedef Documentation

◆ Ptr

using ime::ui::TabsRenderer::Ptr = std::unique_ptr<TabsRenderer>

Unique renderer pointer.

Definition at line 46 of file TabsRenderer.h.

Constructor & Destructor Documentation

◆ ~TabsRenderer()

ime::ui::TabsRenderer::~TabsRenderer ( )
override

Destructor.

Member Function Documentation

◆ clone()

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

Create a copy of the render.

Returns
A copy of the render

Implements ime::ui::IWidgetRenderer.

◆ getBackgroundColour()

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

Get the background colour of tab.

Returns
The background colour of the tab

◆ getBackgroundHoverColour()

Colour ime::ui::TabsRenderer::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::TabsRenderer::getBorderColour ( ) const

Get the border colour.

Returns
The border colour

◆ getBorderHoverColour()

Colour ime::ui::TabsRenderer::getBorderHoverColour ( ) const

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

Returns
The background colour of when the mouse enters the tab

◆ getBorders()

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

Get the size of the widgets borders.

Returns
The size of the widgets borders

◆ getDisabledBackgroundColour()

Colour ime::ui::TabsRenderer::getDisabledBackgroundColour ( ) const

Get the background colour of the tab when it is disabled.

Returns
The background colour of the tab when it is disabled

◆ getDisabledTextColour()

Colour ime::ui::TabsRenderer::getDisabledTextColour ( ) const

Get the colour of the text when the tab is disabled.

Returns
The colour of the text when the tab is disabled

◆ getDistanceToSide()

float ime::ui::TabsRenderer::getDistanceToSide ( ) const

Get the distance between the text and the side of the tab.

Returns
Distance between the text and the side of the tab

◆ getInternalPtr()

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

◆ getOpacity()

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

Get the opacity of the widget.

Returns
The opacity of the widget

Implements ime::ui::IWidgetRenderer.

◆ getOpacityDisabled()

float ime::ui::TabsRenderer::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.

◆ getSelectedBackgroundColour()

Colour ime::ui::TabsRenderer::getSelectedBackgroundColour ( ) const

Get the background colour of the elected tab.

Returns
The background colour of the selected tab

◆ getSelectedBackgroundHoverColour()

Colour ime::ui::TabsRenderer::getSelectedBackgroundHoverColour ( ) const

Get the background colour of the selected tab when the mouse is on top of it.

Returns
Selected tab background hover colour

◆ getSelectedBorderColour()

Colour ime::ui::TabsRenderer::getSelectedBorderColour ( ) const

Get the colour of the borders when a tab is selected.

Returns
The colour of the borders when a tab is selected

◆ getSelectedBorderHoverColour()

Colour ime::ui::TabsRenderer::getSelectedBorderHoverColour ( ) const

Get the colour of the borders when a tab is selected and the mouse is on top of it.

Returns
The selected border hover colour

◆ getSelectedTextColour()

Colour ime::ui::TabsRenderer::getSelectedTextColour ( ) const

Get the colour of the text when the tab is selected.

Returns
The colour of the text when th tab is selected

◆ getSelectedTextColourHover()

Colour ime::ui::TabsRenderer::getSelectedTextColourHover ( ) const

Get the colour of the text when it is selected and the mouse is on top of it.

Returns
Selected tab hover text colour

◆ getTextColour()

Colour ime::ui::TabsRenderer::getTextColour ( ) const

Get the colour of the tab text.

Returns
The colour of the tab text

◆ getTextHoverColour()

Colour ime::ui::TabsRenderer::getTextHoverColour ( ) const

Get the text colour when the mouse enters the tab.

Returns
The text colour when the mouse enters the tab

◆ ignoreTransparentTexture()

void ime::ui::TabsRenderer::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::TabsRenderer::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.

◆ setBackgroundColour()

void ime::ui::TabsRenderer::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::TabsRenderer::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::TabsRenderer::setBorderColour ( Colour  colour)

Set the border colour.

Parameters
colourThe border colour to set

◆ setBorderHoverColour()

void ime::ui::TabsRenderer::setBorderHoverColour ( Colour  colour)

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

Parameters
colourThe background colour to set

◆ setBorders()

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

Change the size of the widget borders.

Parameters
bordersThe size of the borders

◆ setDisabledBackgroundColour()

void ime::ui::TabsRenderer::setDisabledBackgroundColour ( Colour  colour)

Set the background colour of the tab when it is disabled.

Parameters
colourBackground colour to set
Note
This colour is ignored when you set a background image

◆ setDisabledTabTexture()

void ime::ui::TabsRenderer::setDisabledTabTexture ( const std::string &  filename)

Set the image of the tab when it is disabled.

Parameters
filenameFilename of the image to be set

The disabled texture is only used when a normal and selected tab texture are also set

◆ setDisabledTextColour()

void ime::ui::TabsRenderer::setDisabledTextColour ( Colour  colour)

Set the colour of the text when the tab is disabled.

Parameters
colourThe colour to be set

◆ setDistanceToSide()

void ime::ui::TabsRenderer::setDistanceToSide ( float  distanceToSide)

Set the distance between the text and the side of the tab.

Parameters
distanceToSidedistance between the text and the side of the tab

◆ setFont()

void ime::ui::TabsRenderer::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::TabsRenderer::setInternalPtr ( tgui::WidgetRenderer *  renderer)
overridevirtual

◆ setOpacity()

void ime::ui::TabsRenderer::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::TabsRenderer::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.

◆ setSelectedBackgroundColour()

void ime::ui::TabsRenderer::setSelectedBackgroundColour ( Colour  backgroundColour)

Set the background colour of the selected tab.

Parameters
backgroundColourNew selected tab background colour

◆ setSelectedBackgroundHoverColour()

void ime::ui::TabsRenderer::setSelectedBackgroundHoverColour ( Colour  backgroundColour)

Set the background colour of the selected tab when the mouse is on top of it.

Parameters
backgroundColourThe new selected tab hover background colour

◆ setSelectedBorderColour()

void ime::ui::TabsRenderer::setSelectedBorderColour ( Colour  colour)

Set the border colours for a selected tab.

Parameters
colourThe new selected border colour

◆ setSelectedBorderHoverColour()

void ime::ui::TabsRenderer::setSelectedBorderHoverColour ( Colour  colour)

Set the colour of the borders for a selected tab when the mouse is on top of it.

Parameters
colourThe new selected tab hover colour

◆ setSelectedTabHoverTexture()

void ime::ui::TabsRenderer::setSelectedTabHoverTexture ( const std::string &  filename)

Set the image of a selected tab when the mouse is on top of it.

Parameters
filenameFilename of the image to set

◆ setSelectedTabTexture()

void ime::ui::TabsRenderer::setSelectedTabTexture ( const std::string &  filename)

Set the image of a selected tab.

Parameters
filenameFilename of the image to be set

When this image is set then the background colour properties will be ignored for selected tabs

◆ setSelectedTextColour()

void ime::ui::TabsRenderer::setSelectedTextColour ( Colour  textColour)

Set the colour of the text for a selected tab.

Parameters
textColourThe new selected tab colour

◆ setSelectedTextHoverColour()

void ime::ui::TabsRenderer::setSelectedTextHoverColour ( Colour  textColour)

Set the colour of the text for a tab when the mouse is on top of it.

Parameters
textColourThe new selected tab hover text colour

◆ setTabHoverTexture()

void ime::ui::TabsRenderer::setTabHoverTexture ( const std::string &  filename)

Set the image of the tab when the mouse is on top of it.

Parameters
filenameFilename of the image to be set

◆ setTabTexture()

void ime::ui::TabsRenderer::setTabTexture ( const std::string &  filename)

Set the image of a tab.

Parameters
filenameFilename of the image to be set

When this image is set, then the background colour properties will be ignored for non-selected tabs

◆ setTextColour()

void ime::ui::TabsRenderer::setTextColour ( Colour  colour)

Set the colour of the text displayed on the tab.

Parameters
colourThe new test colour

◆ setTextHoverColour()

void ime::ui::TabsRenderer::setTextHoverColour ( Colour  colour)

Set the text colour when the mouse enters the tab.

Parameters
colourThe colour to be set

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