TGUI  0.7.4
tgui::ScrollbarRenderer Class Reference
Inheritance diagram for tgui::ScrollbarRenderer:
tgui::WidgetRenderer

Public Member Functions

 ScrollbarRenderer (Scrollbar *scrollbar)
 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 setTrackColor (const Color &color)
 Changes the color of the track. More...
 
void setTrackColorNormal (const Color &color)
 Changes the color of the track in the normal state (mouse not on the track). More...
 
void setTrackColorHover (const Color &color)
 Changes the color of the track in hover state (mouse on top of the track). More...
 
void setThumbColor (const Color &color)
 Changes the color of the thumb. More...
 
void setThumbColorNormal (const Color &color)
 Changes the color of the thumb in the normal state (mouse not on the thumb). More...
 
void setThumbColorHover (const Color &color)
 Changes the color of the thumb in hover state (mouse on top of the thumb). More...
 
void setArrowBackgroundColor (const Color &color)
 Changes the background color of the arrows. More...
 
void setArrowBackgroundColorNormal (const Color &color)
 Changes the background color of the arrows in the normal state (mouse not on arrow). More...
 
void setArrowBackgroundColorHover (const Color &color)
 Changes the background color of the arrows in the hover state (mouse standing on top of the arrow). More...
 
void setArrowColor (const Color &color)
 Changes the color of the arrows. More...
 
void setArrowColorNormal (const Color &color)
 Changes the color of the arrows in the normal state (mouse not on arrow). More...
 
void setArrowColorHover (const Color &color)
 Changes the color of the arrows in the hover state (mouse standing on top of the arrow). More...
 
void setTrackTexture (const Texture &texture)
 Change the image of the track that is displayed when the mouse is not on top of the scrollbar. More...
 
void setTrackHoverTexture (const Texture &texture)
 Change the image of the track that is displayed when the mouse is on top of the slider. More...
 
void setThumbTexture (const Texture &texture)
 Change the image of the thumb that is displayed when the mouse is not on top of the slider. More...
 
void setThumbHoverTexture (const Texture &texture)
 Change the image of the thumb that is displayed when the mouse is on top of the slider. More...
 
void setArrowUpTexture (const Texture &texture)
 Change the image that is used as the up arrow. More...
 
void setArrowDownTexture (const Texture &texture)
 Change the image that is used as the down arrow. More...
 
void setArrowUpHoverTexture (const Texture &texture)
 Change the image that is used as the up arrow when the mouse is on top of this arrow. More...
 
void setArrowDownHoverTexture (const Texture &texture)
 Change the image that is used as the up arrow when the mouse is on top of this arrow. More...
 
- Public Member Functions inherited from tgui::WidgetRenderer
virtual ~WidgetRenderer ()
 Virtual destructor.
 

Constructor & Destructor Documentation

◆ ScrollbarRenderer()

tgui::ScrollbarRenderer::ScrollbarRenderer ( Scrollbar scrollbar)
inline

Constructor.

Parameters
scrollbarThe scrollbar that is connected to the renderer

Member Function Documentation

◆ getProperty()

virtual ObjectConverter tgui::ScrollbarRenderer::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.

◆ getPropertyValuePairs()

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

Get a map with all properties and their values.

Returns
Property-value pairs of the renderer

Reimplemented from tgui::WidgetRenderer.

◆ setArrowBackgroundColor()

void tgui::ScrollbarRenderer::setArrowBackgroundColor ( const Color color)

Changes the background color of the arrows.

Parameters
colorNew arrow background color

This color will overwrite the color for both normal and hover states.

Note that this color is ignored when all normal images have been set.

See also
setArrowBackgroundColorNormal
setArrowBackgroundColorHover

◆ setArrowBackgroundColorHover()

void tgui::ScrollbarRenderer::setArrowBackgroundColorHover ( const Color color)

Changes the background color of the arrows in the hover state (mouse standing on top of the arrow).

Parameters
colorNew arrow background color

Note that this color is ignored when all normal images have been set.

◆ setArrowBackgroundColorNormal()

void tgui::ScrollbarRenderer::setArrowBackgroundColorNormal ( const Color color)

Changes the background color of the arrows in the normal state (mouse not on arrow).

Parameters
colorNew background color

Note that this color is ignored when all normal images have been set.

◆ setArrowColor()

void tgui::ScrollbarRenderer::setArrowColor ( const Color color)

Changes the color of the arrows.

Parameters
colorNew arrow color

This color will overwrite the color for both normal and hover states.

Note that this color is ignored when all normal images have been set.

See also
setArrowColorNormal
setArrowColorHover

◆ setArrowColorHover()

void tgui::ScrollbarRenderer::setArrowColorHover ( const Color color)

Changes the color of the arrows in the hover state (mouse standing on top of the arrow).

Parameters
colorNew arrow color

Note that this color is ignored when all normal images have been set.

◆ setArrowColorNormal()

void tgui::ScrollbarRenderer::setArrowColorNormal ( const Color color)

Changes the color of the arrows in the normal state (mouse not on arrow).

Parameters
colorNew arrow color

Note that this color is ignored when all normal images have been set.

◆ setArrowDownHoverTexture()

void tgui::ScrollbarRenderer::setArrowDownHoverTexture ( const Texture texture)

Change the image that is used as the up arrow when the mouse is on top of this arrow.

Parameters
textureThe new hover arrow texture

The hover texture is ignored if no normal texture was set. Pass an empty texture to unset the image.

◆ setArrowDownTexture()

void tgui::ScrollbarRenderer::setArrowDownTexture ( const Texture texture)

Change the image that is used as the down arrow.

Parameters
textureThe new arrow texture

When all normal are set, then the alternative color properties will be ignored. Pass an empty texture to unset the image, in this case the color properties will be used again.

◆ setArrowUpHoverTexture()

void tgui::ScrollbarRenderer::setArrowUpHoverTexture ( const Texture texture)

Change the image that is used as the up arrow when the mouse is on top of this arrow.

Parameters
textureThe new hover arrow texture

The hover texture is ignored if no normal texture was set. Pass an empty texture to unset the image.

◆ setArrowUpTexture()

void tgui::ScrollbarRenderer::setArrowUpTexture ( const Texture texture)

Change the image that is used as the up arrow.

Parameters
textureThe new arrow texture

When all normal are set, then the alternative color properties will be ignored. Pass an empty texture to unset the image, in this case the color properties will be used again.

◆ setProperty() [1/2]

virtual void tgui::ScrollbarRenderer::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.

Reimplemented from tgui::WidgetRenderer.

◆ setProperty() [2/2]

virtual void tgui::ScrollbarRenderer::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.

Reimplemented from tgui::WidgetRenderer.

◆ setThumbColor()

void tgui::ScrollbarRenderer::setThumbColor ( const Color color)

Changes the color of the thumb.

Parameters
colorNew thumb color

This color will overwrite the color for both the normal and hover state.

Note that this color is ignored when a track and thumb image have been set.

See also
setTrackColorNormal
setTrackColorHover

◆ setThumbColorHover()

void tgui::ScrollbarRenderer::setThumbColorHover ( const Color color)

Changes the color of the thumb in hover state (mouse on top of the thumb).

Parameters
colorNew thumb color

Note that this color is ignored when a track and thumb image have been set.

◆ setThumbColorNormal()

void tgui::ScrollbarRenderer::setThumbColorNormal ( const Color color)

Changes the color of the thumb in the normal state (mouse not on the thumb).

Parameters
colorNew thumb color

Note that this color is ignored when a track and thumb image have been set.

◆ setThumbHoverTexture()

void tgui::ScrollbarRenderer::setThumbHoverTexture ( const Texture texture)

Change the image of the thumb that is displayed when the mouse is on top of the slider.

Parameters
textureThe new hover thumb texture

The hover texture is ignored if no normal texture was set. Pass an empty texture to unset the image.

◆ setThumbTexture()

void tgui::ScrollbarRenderer::setThumbTexture ( const Texture texture)

Change the image of the thumb that is displayed when the mouse is not on top of the slider.

Parameters
textureThe new thumb texture

When all normal are set, then the alternative color properties will be ignored. Pass an empty string to unset the image.

◆ setTrackColor()

void tgui::ScrollbarRenderer::setTrackColor ( const Color color)

Changes the color of the track.

Parameters
colorNew track color

This color will overwrite the color for both the normal and hover state.

Note that this color is ignored when a track and thumb image have been set.

See also
setTrackColorNormal
setTrackColorHover

◆ setTrackColorHover()

void tgui::ScrollbarRenderer::setTrackColorHover ( const Color color)

Changes the color of the track in hover state (mouse on top of the track).

Parameters
colorNew track color

Note that this color is ignored when a track and thumb image have been set.

◆ setTrackColorNormal()

void tgui::ScrollbarRenderer::setTrackColorNormal ( const Color color)

Changes the color of the track in the normal state (mouse not on the track).

Parameters
colorNew track color

Note that this color is ignored when a track and thumb image have been set.

◆ setTrackHoverTexture()

void tgui::ScrollbarRenderer::setTrackHoverTexture ( const Texture texture)

Change the image of the track that is displayed when the mouse is on top of the slider.

Parameters
textureThe new hover track texture

The hover texture is ignored if no normal texture was set. Pass an empty texture to unset the image.

◆ setTrackTexture()

void tgui::ScrollbarRenderer::setTrackTexture ( const Texture texture)

Change the image of the track that is displayed when the mouse is not on top of the scrollbar.

Parameters
textureThe new track texture

When all normal are set, then the alternative color properties will be ignored. Pass an empty string to unset the image.


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