TGUI  v0.7.5
tgui::ChildWindowRenderer Class Reference
Inheritance diagram for tgui::ChildWindowRenderer:
tgui::WidgetRenderer tgui::WidgetBorders tgui::MessageBoxRenderer

Public Member Functions

 ChildWindowRenderer (ChildWindow *childWindow)
 Constructor. More...
 
virtual void setProperty (std::string property, const std::string &value) override
 Change a property of the renderer. More...
 
virtual void setProperty (std::string property, ObjectConverter &&value) override
 Change a property of the renderer. More...
 
virtual ObjectConverter getProperty (std::string property) const override
 Retrieve the value of a certain property. More...
 
virtual std::map< std::string, ObjectConvertergetPropertyValuePairs () const override
 Get a map with all properties and their values. More...
 
void setTitleBarColor (const Color &color)
 Changes the color of the title bar. More...
 
void setTitleBarHeight (float height)
 Change the height of the title bar. More...
 
void setTitleColor (const Color &color)
 Changes the color of the title that is displayed in the title bar of the child window. More...
 
void setBorderColor (const Color &borderColor)
 Set the border color. More...
 
virtual void setBorders (const Borders &borders) override
 Changes the size of the borders. More...
 
void setDistanceToSide (float distanceToSide)
 Changes the distance between the title and the side of the title bar. More...
 
void setPaddingBetweenButtons (float paddingBetweenButtons)
 Changes the distance between the title buttons if multiple exist. More...
 
void setBackgroundColor (const Color &backgroundColor)
 Changes the background color of the child window. More...
 
void setTitleBarTexture (const Texture &texture)
 Change the image of the title bar. More...
 
std::shared_ptr< ButtonRenderergetCloseButton () const
 Returns the renderer of the close button. More...
 
std::shared_ptr< ButtonRenderergetMinimizeButton () const
 Returns the renderer of the minimize button. More...
 
std::shared_ptr< ButtonRenderergetMaximizeButton () const
 Returns the renderer of the maximize button. More...
 
- Public Member Functions inherited from tgui::WidgetRenderer
virtual ~WidgetRenderer ()
 Virtual destructor.
 
- Public Member Functions inherited from tgui::WidgetBorders
void setBorders (float leftBorder, float topBorder, float rightBorder, float bottomBorder)
 Changes the size of the borders. More...
 
void setBorders (float width, float height)
 Changes the size of the borders. More...
 
virtual Borders getBorders () const
 Returns the size of the borders as a tgui::Borders. More...
 

Constructor & Destructor Documentation

◆ ChildWindowRenderer()

tgui::ChildWindowRenderer::ChildWindowRenderer ( ChildWindow childWindow)
inline

Constructor.

Parameters
childWindowThe child window that is connected to the renderer

Member Function Documentation

◆ getCloseButton()

std::shared_ptr<ButtonRenderer> tgui::ChildWindowRenderer::getCloseButton ( ) const

Returns the renderer of the close button.

Returns
The close button renderer

◆ getMaximizeButton()

std::shared_ptr<ButtonRenderer> tgui::ChildWindowRenderer::getMaximizeButton ( ) const

Returns the renderer of the maximize button.

Returns
The maximize button renderer

◆ getMinimizeButton()

std::shared_ptr<ButtonRenderer> tgui::ChildWindowRenderer::getMinimizeButton ( ) const

Returns the renderer of the minimize button.

Returns
The minimize button renderer

◆ getProperty()

virtual ObjectConverter tgui::ChildWindowRenderer::getProperty ( std::string  property) const
overridevirtual

Retrieve the value of a certain property.

Parameters
propertyThe property that you would like to retrieve
Returns
The value inside a ObjectConverter object which you can extract with the correct get function or an ObjectConverter object with type ObjectConverter::Type::None when the property did not exist.

Reimplemented from tgui::WidgetRenderer.

Reimplemented in tgui::MessageBoxRenderer.

◆ getPropertyValuePairs()

virtual std::map<std::string, ObjectConverter> tgui::ChildWindowRenderer::getPropertyValuePairs ( ) const
overridevirtual

Get a map with all properties and their values.

Returns
Property-value pairs of the renderer

Reimplemented from tgui::WidgetRenderer.

Reimplemented in tgui::MessageBoxRenderer.

◆ setBackgroundColor()

void tgui::ChildWindowRenderer::setBackgroundColor ( const Color backgroundColor)

Changes the background color of the child window.

Parameters
backgroundColorNew background color

◆ setBorderColor()

void tgui::ChildWindowRenderer::setBorderColor ( const Color borderColor)

Set the border color.

Parameters
borderColorThe color of the borders

◆ setBorders()

virtual void tgui::ChildWindowRenderer::setBorders ( const Borders borders)
overridevirtual

Changes the size of the borders.

Parameters
bordersThe size of the borders

Reimplemented from tgui::WidgetBorders.

◆ setDistanceToSide()

void tgui::ChildWindowRenderer::setDistanceToSide ( float  distanceToSide)

Changes the distance between the title and the side of the title bar.

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

◆ setPaddingBetweenButtons()

void tgui::ChildWindowRenderer::setPaddingBetweenButtons ( float  paddingBetweenButtons)

Changes the distance between the title buttons if multiple exist.

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

◆ setProperty() [1/2]

virtual void tgui::ChildWindowRenderer::setProperty ( std::string  property,
const std::string &  value 
)
overridevirtual

Change a property of the renderer.

Parameters
propertyThe property that you would like to change
valueThe new serialized value that you like to assign to the property
Exceptions
Exceptionwhen deserialization fails or when the widget does not have this property.
Exceptionwhen loading scrollbar fails with the theme connected to the list box

Reimplemented from tgui::WidgetRenderer.

Reimplemented in tgui::MessageBoxRenderer.

◆ setProperty() [2/2]

virtual void tgui::ChildWindowRenderer::setProperty ( std::string  property,
ObjectConverter &&  value 
)
overridevirtual

Change a property of the renderer.

Parameters
propertyThe property that you would like to change
valueThe new value that you like to assign to the property. The ObjectConverter is implicitly constructed from the possible value types.
Exceptions
Exceptionfor unknown properties or when value was of a wrong type.
Exceptionwhen loading scrollbar fails with the theme connected to the list box

Reimplemented from tgui::WidgetRenderer.

Reimplemented in tgui::MessageBoxRenderer.

◆ setTitleBarColor()

void tgui::ChildWindowRenderer::setTitleBarColor ( const Color color)

Changes the color of the title bar.

Parameters
colorNew title bar color

Note that this color is ignored when you set an image as title bar.

◆ setTitleBarHeight()

void tgui::ChildWindowRenderer::setTitleBarHeight ( float  height)

Change the height of the title bar.

Parameters
heightNew height of the title bar

◆ setTitleBarTexture()

void tgui::ChildWindowRenderer::setTitleBarTexture ( const Texture texture)

Change the image of the title bar.

Parameters
textureNew title bar texture

When this image is set, the title bar color property will be ignored. Pass an empty string to unset the image, in this case the title bar color property will be used again.

◆ setTitleColor()

void tgui::ChildWindowRenderer::setTitleColor ( const Color color)

Changes the color of the title that is displayed in the title bar of the child window.

Parameters
colorNew title color for the child window

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