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

A ChildWindow widget renderer. More...

#include <ChildWindowRenderer.h>

Inheritance diagram for ime::ui::ChildWindowRenderer:
ime::ui::IWidgetRenderer

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...
 

Detailed Description

A ChildWindow widget renderer.

This class allows you to manipulate the render properties of a ChildWindow

Definition at line 44 of file ChildWindowRenderer.h.

Member Typedef Documentation

◆ Ptr

using ime::ui::IWidgetRenderer::Ptr = std::unique_ptr<IWidgetRenderer>
inherited

Unique renderer pointer.

Definition at line 75 of file IWidgetRenderer.h.

Constructor & Destructor Documentation

◆ ~ChildWindowRenderer()

ime::ui::ChildWindowRenderer::~ChildWindowRenderer ( )
override

Destructor.

Member Function Documentation

◆ clone()

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

Create a copy of the render.

Returns
A copy of the render

Implements ime::ui::IWidgetRenderer.

◆ getBackgroundColour()

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

Get the background colour of window.

Returns
The background colour of the window

◆ getBorderBelowTitleBar()

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

Get the distance between the title bar and the actual contents of the child window.

Returns
Space between title bar and child window contents

◆ getBorderColour()

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

Get the border colour.

Returns
The border colour

◆ getBorderColourFocused()

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

Get the border colour when the window is focused but not hovered.

Returns
The border colour when the window is focused but not hovered

◆ getBorders()

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

Get the ize of the widgets borders.

Returns
The size of the widgets borders

◆ getDistanceToSide()

float ime::ui::ChildWindowRenderer::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::ChildWindowRenderer::getInternalPtr ( )
overridevirtual

◆ getMinimumResizableBorderWidth()

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

Get the minimum width of the area where you can drag to resize the child window.

Returns
Minimum amount of pixels where the child window can be dragged to resize it

◆ getOpacity()

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

Get the opacity of the widget.

Returns
The opacity of the widget

Implements ime::ui::IWidgetRenderer.

◆ getOpacityDisabled()

float ime::ui::ChildWindowRenderer::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::ChildWindowRenderer::getPaddingBetweenButtons ( ) const

#

Get the distance between the title buttons if multiple exist

Returns
Distance between the title buttons

◆ getTitleBarColour()

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

Get the colour of the title bar.

Returns
The colour of the title bar

◆ getTitleBarHeight()

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

Get the height of the title bar.

Returns

◆ getTitleColour()

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

Get the colour of the title that is displayed in the title bar of the child window.

Returns
Title bar text colour

◆ ignoreTransparentTexture()

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

Set the background colour of the window.

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

◆ setBorderBelowTitleBar()

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

Set the distance between the title bar and the actual contents of the child window.

Parameters
borderSpace between title bar and child window contents

◆ setBorderColour()

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

Set the border colour.

Parameters
colourThe border colour to set

◆ setBorders()

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

Change the ize of the widget borders.

Parameters
bordersThe size of the borders

◆ setDistanceToSide()

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

Set the border colour when the window is focused but not hovered.

Parameters
colourBorder colour to set

◆ setFont()

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

◆ setMinimumResizableBorderWidth()

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

Set the minimum width of the area where you can drag to resize the child window.

Parameters
minimumBorderWidthMinimum 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

◆ setOpacity()

void ime::ui::ChildWindowRenderer::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::ChildWindowRenderer::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::ChildWindowRenderer::setPaddingBetweenButtons ( float  padding)

Set the distance between the title buttons if multiple exist.

Parameters
paddingDistance between the title buttons

◆ setShowTextOnTitleButtons()

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

◆ setTextureBackground()

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

Set the colour of the title bar.

Parameters
colourColour to set

◆ setTitleBarHeight()

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

Set the height of teh title bar.

Parameters
heightNew height of the title bar

◆ setTitleColour()

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

Set the colour of the title that is displayed in the title bar of the child window.

Parameters
colourColour to set

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