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

Class for rendering a box layout. More...

#include <BoxLayoutRenderer.h>

Inheritance diagram for ime::ui::BoxLayoutRenderer:
ime::ui::IWidgetRenderer

Public Types

using Ptr = std::unique_ptr< BoxLayoutRenderer >
 Unique renderer pointer. More...
 

Public Member Functions

void setPadding (const Padding &padding)
 Set the size of the padding. More...
 
Padding getPadding () const
 Get the padding set on the container. More...
 
void setSpaceBetweenWidgets (float distance)
 Set the space between the widgets. More...
 
float getSpaceBetweenWidgets () const
 # 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
 
 ~BoxLayoutRenderer () override
 Destructor. More...
 

Detailed Description

Class for rendering a box layout.

This class allows you to manipulate the render properties of a box layout

Definition at line 43 of file BoxLayoutRenderer.h.

Member Typedef Documentation

◆ Ptr

Unique renderer pointer.

Definition at line 45 of file BoxLayoutRenderer.h.

Constructor & Destructor Documentation

◆ ~BoxLayoutRenderer()

ime::ui::BoxLayoutRenderer::~BoxLayoutRenderer ( )
override

Destructor.

Member Function Documentation

◆ clone()

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

Create a copy of the render.

Returns
A copy of the render

Implements ime::ui::IWidgetRenderer.

◆ getInternalPtr()

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

◆ getOpacity()

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

Get the opacity of the widget.

Returns
The opacity of the widget

Implements ime::ui::IWidgetRenderer.

◆ getOpacityDisabled()

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

◆ getPadding()

Padding ime::ui::BoxLayoutRenderer::getPadding ( ) const

Get the padding set on the container.

Returns
the padding set on the container

◆ getSpaceBetweenWidgets()

float ime::ui::BoxLayoutRenderer::getSpaceBetweenWidgets ( ) const

#

Get the space between the widgets

Returns
The space between the widgets

◆ ignoreTransparentTexture()

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

◆ isTransparentTextureIgnored()

bool ime::ui::BoxLayoutRenderer::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.

◆ setFont()

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

◆ setOpacity()

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

◆ setPadding()

void ime::ui::BoxLayoutRenderer::setPadding ( const Padding padding)

Set the size of the padding.

Parameters
paddingNew padding

◆ setSpaceBetweenWidgets()

void ime::ui::BoxLayoutRenderer::setSpaceBetweenWidgets ( float  distance)

Set the space between the widgets.

Parameters
distanceAmount of space between the widgets

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