A Tabs widget renderer. More...
#include <TabsRenderer.h>
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... | |
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.
using ime::ui::TabsRenderer::Ptr = std::unique_ptr<TabsRenderer> |
Unique renderer pointer.
Definition at line 46 of file TabsRenderer.h.
|
override |
Destructor.
|
overridevirtual |
Colour ime::ui::TabsRenderer::getBackgroundColour | ( | ) | const |
Get the background colour of tab.
Colour ime::ui::TabsRenderer::getBackgroundHoverColour | ( | ) | const |
Get the background colour of the tab when the mouse enters it.
Colour ime::ui::TabsRenderer::getBorderColour | ( | ) | const |
Get the border colour.
Colour ime::ui::TabsRenderer::getBorderHoverColour | ( | ) | const |
Get the background colour of when the mouse enters the tab.
Borders ime::ui::TabsRenderer::getBorders | ( | ) | const |
Get the size of the widgets borders.
Colour ime::ui::TabsRenderer::getDisabledBackgroundColour | ( | ) | const |
Get the background colour of the tab when it is disabled.
Colour ime::ui::TabsRenderer::getDisabledTextColour | ( | ) | const |
Get the colour of the text when the tab is disabled.
float ime::ui::TabsRenderer::getDistanceToSide | ( | ) | const |
Get the distance between the text and the side of the tab.
|
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.
Colour ime::ui::TabsRenderer::getSelectedBackgroundColour | ( | ) | const |
Get the background colour of the elected tab.
Colour ime::ui::TabsRenderer::getSelectedBackgroundHoverColour | ( | ) | const |
Get the background colour of the selected tab when the mouse is on top of it.
Colour ime::ui::TabsRenderer::getSelectedBorderColour | ( | ) | const |
Get the colour of the borders when a tab is selected.
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.
Colour ime::ui::TabsRenderer::getSelectedTextColour | ( | ) | const |
Get the colour of the text when the tab is selected.
Colour ime::ui::TabsRenderer::getSelectedTextColourHover | ( | ) | const |
Get the colour of the text when it is selected and the mouse is on top of it.
Colour ime::ui::TabsRenderer::getTextColour | ( | ) | const |
Get the colour of the tab text.
Colour ime::ui::TabsRenderer::getTextHoverColour | ( | ) | const |
Get the text colour when the mouse enters the tab.
|
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::TabsRenderer::setBackgroundColour | ( | Colour | colour | ) |
Set the background colour of the tab.
colour | The background colour to set |
void ime::ui::TabsRenderer::setBackgroundHoverColour | ( | Colour | colour | ) |
Set the background colour of the tab when the mouse enters it.
colour | The background colour to set |
void ime::ui::TabsRenderer::setBorderColour | ( | Colour | colour | ) |
Set the border colour.
colour | The border colour to set |
void ime::ui::TabsRenderer::setBorderHoverColour | ( | Colour | colour | ) |
Set the background colour of when the mouse enters the tab.
colour | The background colour to set |
void ime::ui::TabsRenderer::setBorders | ( | const Borders & | borders | ) |
Change the size of the widget borders.
borders | The size of the borders |
void ime::ui::TabsRenderer::setDisabledBackgroundColour | ( | Colour | colour | ) |
Set the background colour of the tab when it is disabled.
colour | Background colour to set |
void ime::ui::TabsRenderer::setDisabledTabTexture | ( | const std::string & | filename | ) |
Set the image of the tab when it is disabled.
filename | Filename of the image to be set |
The disabled texture is only used when a normal and selected tab texture are also set
void ime::ui::TabsRenderer::setDisabledTextColour | ( | Colour | colour | ) |
Set the colour of the text when the tab is disabled.
colour | The colour to be set |
void ime::ui::TabsRenderer::setDistanceToSide | ( | float | distanceToSide | ) |
Set the distance between the text and the side of the tab.
distanceToSide | distance between the text and the side of the tab |
|
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::TabsRenderer::setSelectedBackgroundColour | ( | Colour | backgroundColour | ) |
Set the background colour of the selected tab.
backgroundColour | New selected tab background colour |
void ime::ui::TabsRenderer::setSelectedBackgroundHoverColour | ( | Colour | backgroundColour | ) |
Set the background colour of the selected tab when the mouse is on top of it.
backgroundColour | The new selected tab hover background colour |
void ime::ui::TabsRenderer::setSelectedBorderColour | ( | Colour | colour | ) |
Set the border colours for a selected tab.
colour | The new selected border colour |
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.
colour | The new selected tab hover colour |
void ime::ui::TabsRenderer::setSelectedTabHoverTexture | ( | const std::string & | filename | ) |
Set the image of a selected tab when the mouse is on top of it.
filename | Filename of the image to set |
void ime::ui::TabsRenderer::setSelectedTabTexture | ( | const std::string & | filename | ) |
Set the image of a selected tab.
filename | Filename of the image to be set |
When this image is set then the background colour properties will be ignored for selected tabs
void ime::ui::TabsRenderer::setSelectedTextColour | ( | Colour | textColour | ) |
Set the colour of the text for a selected tab.
textColour | The new selected tab colour |
void ime::ui::TabsRenderer::setSelectedTextHoverColour | ( | Colour | textColour | ) |
Set the colour of the text for a tab when the mouse is on top of it.
textColour | The new selected tab hover text colour |
void ime::ui::TabsRenderer::setTabHoverTexture | ( | const std::string & | filename | ) |
Set the image of the tab when the mouse is on top of it.
filename | Filename of the image to be set |
void ime::ui::TabsRenderer::setTabTexture | ( | const std::string & | filename | ) |
Set the image of a tab.
filename | Filename of the image to be set |
When this image is set, then the background colour properties will be ignored for non-selected tabs
void ime::ui::TabsRenderer::setTextColour | ( | Colour | colour | ) |
Set the colour of the text displayed on the tab.
colour | The new test colour |
void ime::ui::TabsRenderer::setTextHoverColour | ( | Colour | colour | ) |
Set the text colour when the mouse enters the tab.
colour | The colour to be set |