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

A MessageBox renderer. More...

#include <MessageBoxRenderer.h>

Inheritance diagram for ime::ui::MessageBoxRenderer:
ime::ui::IWidgetRenderer

Public Types

using Ptr = std::shared_ptr< MessageBoxRenderer >
 Shared renderer pointer. More...
 

Public Member Functions

void setTextColour (Colour textColour)
 Set the colour of the text. More...
 
Colour getTextColour () const
 Get the colour of the text. More...
 
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 the 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 message box. More...
 
Colour getTitleColour () const
 Get the colour of the title that is displayed in the title bar of the message box. More...
 
void setBackgroundColour (Colour colour)
 Set the background colour of the message box. More...
 
Colour getBackgroundColour () const
 Get the background colour of message box. 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 message box is focused but not hovered. More...
 
Colour getBorderColourFocused () const
 Get the border colour when the message box is focused but not hovered. More...
 
void setBorderBelowTitleBar (float border)
 Set the distance between the title bar and the actual contents of the message box. More...
 
float getBorderBelowTitleBar () const
 Get the distance between the title bar and the actual contents of the message box. 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 message box. More...
 
float getMinimumResizableBorderWidth () const
 Get the minimum width of the area where you can drag to resize the message box. 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
 
 ~MessageBoxRenderer () override
 Destructor. More...
 

Detailed Description

A MessageBox renderer.

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

Definition at line 44 of file MessageBoxRenderer.h.

Member Typedef Documentation

◆ Ptr

Shared renderer pointer.

Definition at line 46 of file MessageBoxRenderer.h.

Constructor & Destructor Documentation

◆ ~MessageBoxRenderer()

ime::ui::MessageBoxRenderer::~MessageBoxRenderer ( )
override

Destructor.

Member Function Documentation

◆ clone()

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

Create a copy of the render.

Returns
A copy of the render

Implements ime::ui::IWidgetRenderer.

◆ getBackgroundColour()

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

Get the background colour of message box.

Returns
The background colour of the message box

◆ getBorderBelowTitleBar()

float ime::ui::MessageBoxRenderer::getBorderBelowTitleBar ( ) const

Get the distance between the title bar and the actual contents of the message box.

Returns
Space between title bar and message box contents

◆ getBorderColour()

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

Get the border colour.

Returns
The border colour

◆ getBorderColourFocused()

Colour ime::ui::MessageBoxRenderer::getBorderColourFocused ( ) const

Get the border colour when the message box is focused but not hovered.

Returns
The border colour when the message box is focused but not hovered

◆ getBorders()

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

Get the ize of the widgets borders.

Returns
The size of the widgets borders

◆ getDistanceToSide()

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

Get the distance of the title or close button from the side of the title bar.

Returns
Distance between the title and the side of the title bar

◆ getInternalPtr()

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

◆ getMinimumResizableBorderWidth()

float ime::ui::MessageBoxRenderer::getMinimumResizableBorderWidth ( ) const

Get the minimum width of the area where you can drag to resize the message box.

Returns
Minimum amount of pixels where the message box can be dragged to resize it

◆ getOpacity()

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

Get the opacity of the widget.

Returns
The opacity of the widget

Implements ime::ui::IWidgetRenderer.

◆ getOpacityDisabled()

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

◆ getPaddingBetweenButtons()

float ime::ui::MessageBoxRenderer::getPaddingBetweenButtons ( ) const

#

Get the distance between the title buttons if multiple exist

Returns
Distance between the title buttons

◆ getTextColour()

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

Get the colour of the text.

Returns
The text colour

◆ getTitleBarColour()

Colour ime::ui::MessageBoxRenderer::getTitleBarColour ( ) const

Get the colour of the title bar.

Returns
The colour of the title bar

◆ getTitleBarHeight()

float ime::ui::MessageBoxRenderer::getTitleBarHeight ( ) const

Get the height of the title bar.

Returns
The height of the title bar

◆ getTitleColour()

Colour ime::ui::MessageBoxRenderer::getTitleColour ( ) const

Get the colour of the title that is displayed in the title bar of the message box.

Returns
Title bar text colour

◆ ignoreTransparentTexture()

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

◆ isTextShownOnTitleButtons()

bool ime::ui::MessageBoxRenderer::isTextShownOnTitleButtons ( ) const

Check if characters are rendered on top of the title buttons.

Returns
True if characters are rendered on top of the title buttons, otherwise false

◆ isTransparentTextureIgnored()

bool ime::ui::MessageBoxRenderer::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::MessageBoxRenderer::setBackgroundColour ( Colour  colour)

Set the background colour of the message box.

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

◆ setBorderBelowTitleBar()

void ime::ui::MessageBoxRenderer::setBorderBelowTitleBar ( float  border)

Set the distance between the title bar and the actual contents of the message box.

Parameters
borderSpace between title bar and message box contents

◆ setBorderColour()

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

Set the border colour.

Parameters
colourThe border colour to set

◆ setBorders()

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

Change the ize of the widget borders.

Parameters
bordersThe size of the borders

◆ setDistanceToSide()

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

Set the distance of the title or close button from the side of the title bar.

Parameters
distanceToSideDistance between the title and the side of the title bar

◆ setFocusedBorderColour()

void ime::ui::MessageBoxRenderer::setFocusedBorderColour ( Colour  colour)

Set the border colour when the message box is focused but not hovered.

Parameters
colourBorder colour to set

◆ setFont()

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

◆ setMinimumResizableBorderWidth()

void ime::ui::MessageBoxRenderer::setMinimumResizableBorderWidth ( float  minimumBorderWidth)

Set the minimum width of the area where you can drag to resize the message box.

Parameters
minimumBorderWidthMinimum amount of pixels where the message box 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 message box

◆ setOpacity()

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

◆ setPaddingBetweenButtons()

void ime::ui::MessageBoxRenderer::setPaddingBetweenButtons ( float  padding)

Set the distance between the title buttons if multiple exist.

Parameters
paddingDistance between the title buttons

◆ setShowTextOnTitleButtons()

void ime::ui::MessageBoxRenderer::setShowTextOnTitleButtons ( bool  showText)

Set whether characters are rendered on top of the title buttons.

Parameters
showTextTrue if text is to be shown on the title bar buttons, otherwise false

◆ setTextColour()

void ime::ui::MessageBoxRenderer::setTextColour ( Colour  textColour)

Set the colour of the text.

Parameters
textColourThe new text colour

◆ setTextureBackground()

void ime::ui::MessageBoxRenderer::setTextureBackground ( const std::string &  filename)

Set the background image.

Parameters
filenameFilename of the image to be set
Exceptions
FileNotFoundExceptionIf the image cannot be found on the disk

When this image is set, the background colour property will be ignored

◆ setTextureTitleBar()

void ime::ui::MessageBoxRenderer::setTextureTitleBar ( const std::string &  filename)

Set the image of the title bar.

Parameters
filenameFilename of the image to be set
Exceptions
FileNotFoundExceptionIf the image cannot be found on the disk

When this image is set, the title bar colour property will be ignored

◆ setTitleBarColour()

void ime::ui::MessageBoxRenderer::setTitleBarColour ( Colour  colour)

Set the colour of the title bar.

Parameters
colourColour to set

◆ setTitleBarHeight()

void ime::ui::MessageBoxRenderer::setTitleBarHeight ( float  height)

Set the height of the title bar.

Parameters
heightNew height of the title bar

◆ setTitleColour()

void ime::ui::MessageBoxRenderer::setTitleColour ( Colour  colour)

Set the colour of the title that is displayed in the title bar of the message box.

Parameters
colourColour to set

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