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

A ScrollablePanel renderer. More...

#include <ScrollablePanelRenderer.h>

Inheritance diagram for ime::ui::ScrollablePanelRenderer:
ime::ui::IWidgetRenderer

Public Types

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

Public Member Functions

void setBorders (const Borders &borders)
 Change the size of the widget borders. More...
 
Borders getBorders () const
 Get the ize of the widgets borders. More...
 
void setBorderColour (Colour colour)
 Set the border colour. More...
 
Colour getBorderColour () const
 Get the border colour. More...
 
void setBackgroundColour (Colour colour)
 Set the background colour of the button. More...
 
Colour getBackgroundColour () const
 Get the background colour of button. More...
 
void setRoundedBorderRadius (float radius)
 Set the radius for the rounded corners. More...
 
float getRoundedBorderRadius () const
 Get the radius of the rounded corners. More...
 
void setBackgroundTexture (const std::string &texture)
 Set the background image of the panel. More...
 
void setScrollbarWidth (float scrollbarWidth)
 Set the width of the scrollbar. More...
 
float getScrollbarWidth () const
 Get the width of the scrollbar. 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
 
 ~ScrollablePanelRenderer () override
 Destructor. More...
 

Detailed Description

A ScrollablePanel renderer.

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

Definition at line 44 of file ScrollablePanelRenderer.h.

Member Typedef Documentation

◆ Ptr

Unique renderer pointer.

Definition at line 46 of file ScrollablePanelRenderer.h.

Constructor & Destructor Documentation

◆ ~ScrollablePanelRenderer()

ime::ui::ScrollablePanelRenderer::~ScrollablePanelRenderer ( )
override

Destructor.

Member Function Documentation

◆ clone()

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

Create a copy of the render.

Returns
A copy of the render

Implements ime::ui::IWidgetRenderer.

◆ getBackgroundColour()

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

Get the background colour of button.

Returns
The background colour of the button

◆ getBorderColour()

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

Get the border colour.

Returns
The border colour

◆ getBorders()

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

Get the ize of the widgets borders.

Returns
The size of the widgets borders

◆ getInternalPtr()

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

◆ getOpacity()

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

Get the opacity of the widget.

Returns
The opacity of the widget

Implements ime::ui::IWidgetRenderer.

◆ getOpacityDisabled()

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

◆ getRoundedBorderRadius()

float ime::ui::ScrollablePanelRenderer::getRoundedBorderRadius ( ) const

Get the radius of the rounded corners.

Returns
The radius of the rounded corners
See also
setRoundedBorderRadius

◆ getScrollbarWidth()

float ime::ui::ScrollablePanelRenderer::getScrollbarWidth ( ) const

Get the width of the scrollbar.

Returns
The width of the scrollbar

◆ ignoreTransparentTexture()

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

Set the background colour of the button.

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

◆ setBackgroundTexture()

void ime::ui::ScrollablePanelRenderer::setBackgroundTexture ( const std::string &  texture)

Set the background image of the panel.

Parameters
textureThe new background image

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

◆ setBorderColour()

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

Set the border colour.

Parameters
colourThe border colour to set

◆ setBorders()

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

Change the size of the widget borders.

Parameters
bordersThe size of the borders

◆ setFont()

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

◆ setOpacity()

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

◆ setRoundedBorderRadius()

void ime::ui::ScrollablePanelRenderer::setRoundedBorderRadius ( float  radius)

Set the radius for the rounded corners.

Parameters
radiusRadius of the corners

This function will round the corners of the panel, radius controls how much rounding is applied to the borders of the panel.

By default the radius is 0, meaning the panel is not rounded

Warning
This property is ignored when textures are used as background

◆ setScrollbarWidth()

void ime::ui::ScrollablePanelRenderer::setScrollbarWidth ( float  scrollbarWidth)

Set the width of the scrollbar.

Parameters
scrollbarWidthThe new scrollbar width

Provide 0 as the argument to use the default value


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