A ChildWindow widget renderer. More...
#include <ChildWindowRenderer.h>
Public Types | |
using | Ptr = std::unique_ptr< IWidgetRenderer > |
Unique renderer pointer. More... | |
Public Member Functions | |
void | setBorders (const Borders &borders) |
Change the ize of the widget borders. More... | |
Borders | getBorders () const |
Get the ize of the widgets borders. More... | |
void | setTitleBarHeight (float height) |
Set the height of teh title bar. More... | |
float | getTitleBarHeight () const |
Get the height of the title bar. More... | |
void | setTitleBarColour (Colour colour) |
Set the colour of the title bar. More... | |
Colour | getTitleBarColour () const |
Get the colour of the title bar. More... | |
void | setTitleColour (Colour colour) |
Set the colour of the title that is displayed in the title bar of the child window. More... | |
Colour | getTitleColour () const |
Get the colour of the title that is displayed in the title bar of the child window. More... | |
void | setBackgroundColour (Colour colour) |
Set the background colour of the window. More... | |
Colour | getBackgroundColour () const |
Get the background colour of window. More... | |
void | setBorderColour (Colour colour) |
Set the border colour. More... | |
Colour | getBorderColour () const |
Get the border colour. More... | |
void | setFocusedBorderColour (Colour colour) |
Set the border colour when the window is focused but not hovered. More... | |
Colour | getBorderColourFocused () const |
Get the border colour when the window is focused but not hovered. More... | |
void | setBorderBelowTitleBar (float border) |
Set the distance between the title bar and the actual contents of the child window. More... | |
float | getBorderBelowTitleBar () const |
Get the distance between the title bar and the actual contents of the child window. More... | |
void | setDistanceToSide (float distanceToSide) |
Set the distance of the title or close button from the side of the title bar. More... | |
float | getDistanceToSide () const |
Get the distance of the title or close button from the side of the title bar. More... | |
void | setPaddingBetweenButtons (float padding) |
Set the distance between the title buttons if multiple exist. More... | |
float | getPaddingBetweenButtons () const |
# More... | |
void | setMinimumResizableBorderWidth (float minimumBorderWidth) |
Set the minimum width of the area where you can drag to resize the child window. More... | |
float | getMinimumResizableBorderWidth () const |
Get the minimum width of the area where you can drag to resize the child window. More... | |
void | setShowTextOnTitleButtons (bool showText) |
Set whether characters are rendered on top of the title buttons. More... | |
bool | isTextShownOnTitleButtons () const |
Check if characters are rendered on top of the title buttons. More... | |
void | setTextureTitleBar (const std::string &filename) |
Set the image of the title bar. More... | |
void | setTextureBackground (const std::string &filename) |
Set the background image. 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 |
~ChildWindowRenderer () override | |
Destructor. More... | |
A ChildWindow widget renderer.
This class allows you to manipulate the render properties of a ChildWindow
Definition at line 44 of file ChildWindowRenderer.h.
|
inherited |
Unique renderer pointer.
Definition at line 75 of file IWidgetRenderer.h.
|
override |
Destructor.
|
overridevirtual |
Colour ime::ui::ChildWindowRenderer::getBackgroundColour | ( | ) | const |
Get the background colour of window.
float ime::ui::ChildWindowRenderer::getBorderBelowTitleBar | ( | ) | const |
Get the distance between the title bar and the actual contents of the child window.
Colour ime::ui::ChildWindowRenderer::getBorderColour | ( | ) | const |
Get the border colour.
Colour ime::ui::ChildWindowRenderer::getBorderColourFocused | ( | ) | const |
Get the border colour when the window is focused but not hovered.
Borders ime::ui::ChildWindowRenderer::getBorders | ( | ) | const |
Get the ize of the widgets borders.
float ime::ui::ChildWindowRenderer::getDistanceToSide | ( | ) | const |
Get the distance of the title or close button from the side of the title bar.
|
overridevirtual |
Implements ime::ui::IWidgetRenderer.
float ime::ui::ChildWindowRenderer::getMinimumResizableBorderWidth | ( | ) | const |
Get the minimum width of the area where you can drag to resize the child window.
|
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::ChildWindowRenderer::getPaddingBetweenButtons | ( | ) | const |
#
Get the distance between the title buttons if multiple exist
Colour ime::ui::ChildWindowRenderer::getTitleBarColour | ( | ) | const |
Get the colour of the title bar.
float ime::ui::ChildWindowRenderer::getTitleBarHeight | ( | ) | const |
Get the height of the title bar.
Colour ime::ui::ChildWindowRenderer::getTitleColour | ( | ) | const |
Get the colour of the title that is displayed in the title bar of the child window.
|
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.
bool ime::ui::ChildWindowRenderer::isTextShownOnTitleButtons | ( | ) | const |
Check if characters are rendered on top of the title buttons.
|
overridevirtual |
Check if mouse events are ignored on transparent parts of the texture or not.
Implements ime::ui::IWidgetRenderer.
void ime::ui::ChildWindowRenderer::setBackgroundColour | ( | Colour | colour | ) |
Set the background colour of the window.
colour | The background colour to set |
void ime::ui::ChildWindowRenderer::setBorderBelowTitleBar | ( | float | border | ) |
Set the distance between the title bar and the actual contents of the child window.
border | Space between title bar and child window contents |
void ime::ui::ChildWindowRenderer::setBorderColour | ( | Colour | colour | ) |
Set the border colour.
colour | The border colour to set |
void ime::ui::ChildWindowRenderer::setBorders | ( | const Borders & | borders | ) |
Change the ize of the widget borders.
borders | The size of the borders |
void ime::ui::ChildWindowRenderer::setDistanceToSide | ( | float | distanceToSide | ) |
Set the distance of the title or close button from the side of the title bar.
distanceToSide | Distance between the title and the side of the title bar |
void ime::ui::ChildWindowRenderer::setFocusedBorderColour | ( | Colour | colour | ) |
Set the border colour when the window is focused but not hovered.
colour | Border colour to set |
|
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.
void ime::ui::ChildWindowRenderer::setMinimumResizableBorderWidth | ( | float | minimumBorderWidth | ) |
Set the minimum width of the area where you can drag to resize the child window.
minimumBorderWidth | Minimum amount of pixels where the child window can be dragged to resize it |
If the border is larger than minimumBorderWidth then this function has no effect. If the borders are smaller, several invisible pixels next to the border can also be used to resize the child window
|
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::ChildWindowRenderer::setPaddingBetweenButtons | ( | float | padding | ) |
Set the distance between the title buttons if multiple exist.
padding | Distance between the title buttons |
void ime::ui::ChildWindowRenderer::setShowTextOnTitleButtons | ( | bool | showText | ) |
Set whether characters are rendered on top of the title buttons.
showText | True if text is to be shown on the title bar buttons, otherwise false |
void ime::ui::ChildWindowRenderer::setTextureBackground | ( | const std::string & | filename | ) |
Set the background image.
filename | Filename of the image to be set |
FileNotFoundException | If the image cannot be found on the disk |
When this image is set, the background colour property will be ignored
void ime::ui::ChildWindowRenderer::setTextureTitleBar | ( | const std::string & | filename | ) |
Set the image of the title bar.
filename | Filename of the image to be set |
FileNotFoundException | If the image cannot be found on the disk |
When this image is set, the title bar colour property will be ignored
void ime::ui::ChildWindowRenderer::setTitleBarColour | ( | Colour | colour | ) |
Set the colour of the title bar.
colour | Colour to set |
void ime::ui::ChildWindowRenderer::setTitleBarHeight | ( | float | height | ) |
Set the height of teh title bar.
height | New height of the title bar |
void ime::ui::ChildWindowRenderer::setTitleColour | ( | Colour | colour | ) |
Set the colour of the title that is displayed in the title bar of the child window.
colour | Colour to set |