A ProgressBar widget renderer. More...
#include <ProgressBarRenderer.h>
Public Types | |
using | Ptr = std::shared_ptr< ProgressBarRenderer > |
Shared renderer pointer. More... | |
Public Member Functions | |
void | setBorders (const Borders &borders) |
Change the size of the widget borders. More... | |
Borders | getBorders () const |
Get the ize of the widgets borders. More... | |
void | setTextColour (Colour colour) |
Set the colour of the text that is optionally displayed on top of the progress bar. More... | |
Colour | getTextColour () const |
Get the colour of the text that is optionally displayed on top of the progress bar. More... | |
void | setTextColourFilled (Colour colour) |
Set the text colour of the text that is on top of the filled part of the progress bar. More... | |
Colour | getTextColourFilled () const |
Get the colour of the text that is on top of the filled part of the progress bar. More... | |
void | setBackgroundColour (Colour colour) |
Set the background colour of the progress bar. More... | |
Colour | getBackgroundColour () const |
Get the background colour of the progress bar. More... | |
void | setFillColour (Colour colour) |
Set the fill colour of the progress bar. More... | |
Colour | getFillColour () const |
Get the fill colour of the progress bar. More... | |
void | setBorderColour (Colour colour) |
Set the border colour. More... | |
Colour | getBorderColour () const |
Get the border colour. More... | |
void | setBackgroundTexture (const std::string &texture) |
Set the background image of the progress bar. More... | |
void | setFillTexture (const std::string &texture) |
Set the fill image of the progress bar. More... | |
void | setTextStyle (TextStyle style) |
Set the text style. More... | |
TextStyle | getTextStyle () const |
Get the text style. 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 |
~ProgressBarRenderer () override | |
Destructor. More... | |
A ProgressBar widget renderer.
This class allows you to manipulate the render properties of a ProgressBar
Definition at line 44 of file ProgressBarRenderer.h.
using ime::ui::ProgressBarRenderer::Ptr = std::shared_ptr<ProgressBarRenderer> |
Shared renderer pointer.
Definition at line 46 of file ProgressBarRenderer.h.
|
override |
Destructor.
|
overridevirtual |
Colour ime::ui::ProgressBarRenderer::getBackgroundColour | ( | ) | const |
Get the background colour of the progress bar.
Colour ime::ui::ProgressBarRenderer::getBorderColour | ( | ) | const |
Get the border colour.
Borders ime::ui::ProgressBarRenderer::getBorders | ( | ) | const |
Get the ize of the widgets borders.
Colour ime::ui::ProgressBarRenderer::getFillColour | ( | ) | const |
Get the fill colour of the progress bar.
|
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::ProgressBarRenderer::getTextColour | ( | ) | const |
Get the colour of the text that is optionally displayed on top of the progress bar.
Colour ime::ui::ProgressBarRenderer::getTextColourFilled | ( | ) | const |
Get the colour of the text that is on top of the filled part of the progress bar.
TextStyle ime::ui::ProgressBarRenderer::getTextStyle | ( | ) | const |
Get the text style.
|
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::ProgressBarRenderer::setBackgroundColour | ( | Colour | colour | ) |
Set the background colour of the progress bar.
colour | The background colour to set |
This is the colour that is displayed on the part of the progress bar that is not filled.
void ime::ui::ProgressBarRenderer::setBackgroundTexture | ( | const std::string & | texture | ) |
Set the background image of the progress bar.
texture | The new background image |
When this image is set then the background colour property will be ignored
void ime::ui::ProgressBarRenderer::setBorderColour | ( | Colour | colour | ) |
Set the border colour.
colour | The border colour to set |
void ime::ui::ProgressBarRenderer::setBorders | ( | const Borders & | borders | ) |
Change the size of the widget borders.
borders | The size of the borders |
void ime::ui::ProgressBarRenderer::setFillColour | ( | Colour | colour | ) |
Set the fill colour of the progress bar.
colour | fill colour to set |
This is the colour that is used to fill the progress bar and is drawn on top of the background colour
void ime::ui::ProgressBarRenderer::setFillTexture | ( | const std::string & | texture | ) |
Set the fill image of the progress bar.
texture | The new fill texture |
When this image is set then the fill colour 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::ProgressBarRenderer::setTextColour | ( | Colour | colour | ) |
Set the colour of the text that is optionally displayed on top of the progress bar.
colour | The new test colour |
void ime::ui::ProgressBarRenderer::setTextColourFilled | ( | Colour | colour | ) |
Set the text colour of the text that is on top of the filled part of the progress bar.
colour | he new text colour that is displayed on top of the filled part |
void ime::ui::ProgressBarRenderer::setTextStyle | ( | TextStyle | style | ) |