TGUI  1.3-dev
Loading...
Searching...
No Matches
tgui::EditBoxRenderer Class Reference
Inheritance diagram for tgui::EditBoxRenderer:
tgui::WidgetRenderer

Public Member Functions

void setTextStyle (TextStyles style)
 Changes the text style.
 
TGUI_NODISCARD TextStyles getTextStyle () const
 Returns text style.
 
void setDefaultTextStyle (TextStyles style)
 Changes the text style of the default text (the text drawn when the edit box is empty)
 
TGUI_NODISCARD TextStyles getDefaultTextStyle () const
 Returns the text style of the default text (the text drawn when the edit box is empty)
 
void setBorders (const Borders &borders)
 Changes the size of the borders.
 
TGUI_NODISCARD Borders getBorders () const
 Returns the size of the borders.
 
void setPadding (const Padding &padding)
 Changes the padding of the edit box.
 
TGUI_NODISCARD Padding getPadding () const
 Returns the size of the padding.
 
void setCaretWidth (float width)
 Changes the width of the caret.
 
TGUI_NODISCARD float getCaretWidth () const
 Returns the caret width.
 
void setTextColor (Color textColor)
 Sets the text color that will be used inside the edit box.
 
TGUI_NODISCARD Color getTextColor () const
 Returns the text color that will be used inside the edit box.
 
void setTextColorDisabled (Color textColor)
 Sets the text color that will be used inside the edit box when the edit box is disabled.
 
TGUI_NODISCARD Color getTextColorDisabled () const
 Returns the text color that will be used inside the edit box when the edit box is disabled.
 
void setTextColorFocused (Color textColor)
 Sets the text color that will be used inside the edit box when the edit box is focused.
 
TGUI_NODISCARD Color getTextColorFocused () const
 Returns the text color that will be used inside the edit box when the edit box is focused.
 
void setSelectedTextColor (Color selectedTextColor)
 Sets the text color of the selected text that will be used inside the edit box.
 
TGUI_NODISCARD Color getSelectedTextColor () const
 Returns the text color of the selected text that will be used inside the edit box.
 
void setSelectedTextBackgroundColor (Color selectedTextBackgroundColor)
 Sets the background color of the selected text that will be used inside the edit box.
 
TGUI_NODISCARD Color getSelectedTextBackgroundColor () const
 Returns the background color of the selected text that will be used inside the edit box.
 
void setDefaultTextColor (Color defaultTextColor)
 Sets the color of the default text that can optionally be displayed when the edit box is empty.
 
TGUI_NODISCARD Color getDefaultTextColor () const
 Returns the color of the default text that can optionally be displayed when the edit box is empty.
 
void setBackgroundColor (Color color)
 Changes the color of the background.
 
TGUI_NODISCARD Color getBackgroundColor () const
 Returns the color of the background.
 
void setBackgroundColorHover (Color color)
 Changes the color of the background in the hover state (mouse on edit box, but not pressed)
 
TGUI_NODISCARD Color getBackgroundColorHover () const
 Returns the color of the background in the hover state (mouse on edit box)
 
void setBackgroundColorDisabled (Color color)
 Changes the color of the background when the edit box is disabled.
 
TGUI_NODISCARD Color getBackgroundColorDisabled () const
 Returns the color of the background when the edit box is disabled.
 
void setBackgroundColorFocused (Color color)
 Changes the color of the background when the edit box is focused.
 
TGUI_NODISCARD Color getBackgroundColorFocused () const
 Returns the color of the background when the edit box is focused.
 
void setCaretColor (Color caretColor)
 Sets the color that will be used inside the edit box for the blinking caret.
 
TGUI_NODISCARD Color getCaretColor () const
 Returns the color that will be used inside the edit box for the blinking caret.
 
void setCaretColorHover (Color caretColor)
 Sets the color that will be used for the blinking caret when the mouse is on top of the edit box.
 
TGUI_NODISCARD Color getCaretColorHover () const
 Returns the color that will be used for the blinking caret when the mouse is on top of the edit box.
 
void setCaretColorFocused (Color caretColor)
 Sets the color that will be used for the blinking caret when the edit box is focused.
 
TGUI_NODISCARD Color getCaretColorFocused () const
 Returns the color that will be used for the blinking caret when the edit box is focused.
 
void setBorderColor (Color color)
 Changes the color of the borders.
 
TGUI_NODISCARD Color getBorderColor () const
 Returns the color of the borders.
 
void setBorderColorHover (Color color)
 Changes the color of the borders used when the mouse is on top of the edit box.
 
TGUI_NODISCARD Color getBorderColorHover () const
 Returns the color of the borders used when the mouse is on top of the edit box.
 
void setBorderColorDisabled (Color color)
 Changes the color of the borders used when the edit box is disabled.
 
TGUI_NODISCARD Color getBorderColorDisabled () const
 Returns the color of the borders used when the edit box is disabled.
 
void setBorderColorFocused (Color color)
 Changes the color of the borders used when the edit box is focused.
 
TGUI_NODISCARD Color getBorderColorFocused () const
 Returns the color of the borders used when the edit box is focused.
 
void setTexture (const Texture &texture)
 Changes the image that is displayed.
 
TGUI_NODISCARD const TexturegetTexture () const
 Returns the image that is displayed.
 
void setTextureHover (const Texture &texture)
 Changes the image that is displayed when the mouse is located on top of the edit box.
 
TGUI_NODISCARD const TexturegetTextureHover () const
 Returns the image that is displayed when the mouse is located on top of the edit box.
 
void setTextureDisabled (const Texture &texture)
 Changes the image that is displayed when the edit box is disabled.
 
TGUI_NODISCARD const TexturegetTextureDisabled () const
 Returns the image that is displayed when the edit box is disabled.
 
void setTextureFocused (const Texture &texture)
 Changes the image that is drawn on top of the edit box image when the edit box is focused.
 
TGUI_NODISCARD const TexturegetTextureFocused () const
 Returns the image that is drawn on top of the edit box image when the edit box is focused.
 
 WidgetRenderer ()=default
 Default constructor.
 
 WidgetRenderer (const WidgetRenderer &)
 Copy constructor.
 
 WidgetRenderer (WidgetRenderer &&)=default
 Default move constructor.
 
 WidgetRenderer (const std::shared_ptr< RendererData > &data)
 Construct the renderer from renderer data.
 
- Public Member Functions inherited from tgui::WidgetRenderer
 WidgetRenderer ()=default
 Default constructor.
 
 WidgetRenderer (const WidgetRenderer &)
 Copy constructor.
 
 WidgetRenderer (WidgetRenderer &&)=default
 Default move constructor.
 
WidgetRendereroperator= (const WidgetRenderer &)
 Copy assignment operator.
 
WidgetRendereroperator= (WidgetRenderer &&)=default
 Default move assignment operator.
 
 WidgetRenderer (const std::shared_ptr< RendererData > &data)
 Construct the renderer from renderer data.
 
virtual ~WidgetRenderer ()=default
 Virtual destructor.
 
void setOpacity (float opacity)
 Changes the opacity of the widget.
 
TGUI_NODISCARD float getOpacity () const
 Returns the opacity of the widget.
 
void setOpacityDisabled (float opacity)
 Changes the opacity of the widget when it is disabled.
 
TGUI_NODISCARD float getOpacityDisabled () const
 Returns the opacity of the widget when it is disabled.
 
void setFont (const Font &font)
 Changes the font used for the text in the widget.
 
TGUI_NODISCARD Font getFont () const
 Returns the font associated with the widget (if any)
 
void setTextSize (unsigned int size)
 Changes the text size of the widget that is specified by the renderer.
 
TGUI_NODISCARD unsigned int getTextSize () const
 Returns text size of the widget that is specified by the renderer.
 
void setTransparentTexture (bool ignoreTransparentParts)
 Sets whether mouse events should be ignored on transparent parts of the texture of the widget in normal state.
 
TGUI_NODISCARD bool getTransparentTexture () const
 Returns whether mouse events should be ignored on transparent parts of the texture of the widget.
 
void setProperty (const String &property, ObjectConverter &&value)
 Changes a property of the renderer.
 
TGUI_NODISCARD ObjectConverter getProperty (const String &property) const
 Retrieves the value of a certain property.
 
TGUI_NODISCARD const std::map< String, ObjectConverter > & getPropertyValuePairs () const
 Gets a map with all properties and their values.
 
void subscribe (Widget *widget)
 Subscribes a callback function to changes in the renderer.
 
void unsubscribe (Widget *widget)
 Subscribes a callback function to changes in the renderer.
 
void setData (const std::shared_ptr< RendererData > &data)
 
TGUI_NODISCARD std::shared_ptr< RendererDatagetData () const
 Returns the renderer data.
 
TGUI_NODISCARD std::shared_ptr< RendererDataclone () const
 Gets a clone of the renderer data.
 

Additional Inherited Members

- Protected Attributes inherited from tgui::WidgetRenderer
std::shared_ptr< RendererDatam_data = RendererData::create()
 

Member Function Documentation

◆ getBackgroundColor()

TGUI_NODISCARD Color tgui::EditBoxRenderer::getBackgroundColor ( ) const

Returns the color of the background.

Returns
Background color

◆ getBackgroundColorDisabled()

TGUI_NODISCARD Color tgui::EditBoxRenderer::getBackgroundColorDisabled ( ) const

Returns the color of the background when the edit box is disabled.

Returns
Background color in disabled state

◆ getBackgroundColorFocused()

TGUI_NODISCARD Color tgui::EditBoxRenderer::getBackgroundColorFocused ( ) const

Returns the color of the background when the edit box is focused.

Returns
Background color in focused state

◆ getBackgroundColorHover()

TGUI_NODISCARD Color tgui::EditBoxRenderer::getBackgroundColorHover ( ) const

Returns the color of the background in the hover state (mouse on edit box)

Returns
Background color in hover state

◆ getBorderColor()

TGUI_NODISCARD Color tgui::EditBoxRenderer::getBorderColor ( ) const

Returns the color of the borders.

Returns
border color

◆ getBorderColorDisabled()

TGUI_NODISCARD Color tgui::EditBoxRenderer::getBorderColorDisabled ( ) const

Returns the color of the borders used when the edit box is disabled.

Returns
border color

◆ getBorderColorFocused()

TGUI_NODISCARD Color tgui::EditBoxRenderer::getBorderColorFocused ( ) const

Returns the color of the borders used when the edit box is focused.

Returns
border color

◆ getBorderColorHover()

TGUI_NODISCARD Color tgui::EditBoxRenderer::getBorderColorHover ( ) const

Returns the color of the borders used when the mouse is on top of the edit box.

Returns
border color

◆ getBorders()

TGUI_NODISCARD Borders tgui::EditBoxRenderer::getBorders ( ) const

Returns the size of the borders.

Returns
border size

◆ getCaretColor()

TGUI_NODISCARD Color tgui::EditBoxRenderer::getCaretColor ( ) const

Returns the color that will be used inside the edit box for the blinking caret.

Returns
The color of the blinking caret

◆ getCaretColorFocused()

TGUI_NODISCARD Color tgui::EditBoxRenderer::getCaretColorFocused ( ) const

Returns the color that will be used for the blinking caret when the edit box is focused.

Returns
The color of the blinking caret

◆ getCaretColorHover()

TGUI_NODISCARD Color tgui::EditBoxRenderer::getCaretColorHover ( ) const

Returns the color that will be used for the blinking caret when the mouse is on top of the edit box.

Returns
The color of the blinking caret

◆ getCaretWidth()

TGUI_NODISCARD float tgui::EditBoxRenderer::getCaretWidth ( ) const

Returns the caret width.

Returns
Width of the caret

◆ getDefaultTextColor()

TGUI_NODISCARD Color tgui::EditBoxRenderer::getDefaultTextColor ( ) const

Returns the color of the default text that can optionally be displayed when the edit box is empty.

Returns
Default text color

◆ getDefaultTextStyle()

TGUI_NODISCARD TextStyles tgui::EditBoxRenderer::getDefaultTextStyle ( ) const

Returns the text style of the default text (the text drawn when the edit box is empty)

Returns
Style of the default text

◆ getPadding()

TGUI_NODISCARD Padding tgui::EditBoxRenderer::getPadding ( ) const

Returns the size of the padding.

Returns
padding size
See also
setPadding

◆ getSelectedTextBackgroundColor()

TGUI_NODISCARD Color tgui::EditBoxRenderer::getSelectedTextBackgroundColor ( ) const

Returns the background color of the selected text that will be used inside the edit box.

Returns
Background color of selected text

◆ getSelectedTextColor()

TGUI_NODISCARD Color tgui::EditBoxRenderer::getSelectedTextColor ( ) const

Returns the text color of the selected text that will be used inside the edit box.

Returns
Text color of selected text

◆ getTextColor()

TGUI_NODISCARD Color tgui::EditBoxRenderer::getTextColor ( ) const

Returns the text color that will be used inside the edit box.

Returns
Text color

◆ getTextColorDisabled()

TGUI_NODISCARD Color tgui::EditBoxRenderer::getTextColorDisabled ( ) const

Returns the text color that will be used inside the edit box when the edit box is disabled.

Returns
Text color

◆ getTextColorFocused()

TGUI_NODISCARD Color tgui::EditBoxRenderer::getTextColorFocused ( ) const

Returns the text color that will be used inside the edit box when the edit box is focused.

Returns
Text color

◆ getTextStyle()

TGUI_NODISCARD TextStyles tgui::EditBoxRenderer::getTextStyle ( ) const

Returns text style.

Returns
Style of the text

◆ getTexture()

TGUI_NODISCARD const Texture & tgui::EditBoxRenderer::getTexture ( ) const

Returns the image that is displayed.

Returns
edit box texture

◆ getTextureDisabled()

TGUI_NODISCARD const Texture & tgui::EditBoxRenderer::getTextureDisabled ( ) const

Returns the image that is displayed when the edit box is disabled.

Returns
disabled texture

◆ getTextureFocused()

TGUI_NODISCARD const Texture & tgui::EditBoxRenderer::getTextureFocused ( ) const

Returns the image that is drawn on top of the edit box image when the edit box is focused.

Returns
focused texture

◆ getTextureHover()

TGUI_NODISCARD const Texture & tgui::EditBoxRenderer::getTextureHover ( ) const

Returns the image that is displayed when the mouse is located on top of the edit box.

Returns
hover texture

◆ setBackgroundColor()

void tgui::EditBoxRenderer::setBackgroundColor ( Color color)

Changes the color of the background.

Parameters
colorNew background color

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

◆ setBackgroundColorDisabled()

void tgui::EditBoxRenderer::setBackgroundColorDisabled ( Color color)

Changes the color of the background when the edit box is disabled.

Parameters
colorNew background color

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

◆ setBackgroundColorFocused()

void tgui::EditBoxRenderer::setBackgroundColorFocused ( Color color)

Changes the color of the background when the edit box is focused.

Parameters
colorNew background color

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

◆ setBackgroundColorHover()

void tgui::EditBoxRenderer::setBackgroundColorHover ( Color color)

Changes the color of the background in the hover state (mouse on edit box, but not pressed)

Parameters
colorNew background color

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

◆ setBorderColor()

void tgui::EditBoxRenderer::setBorderColor ( Color color)

Changes the color of the borders.

Parameters
colorNew border color

◆ setBorderColorDisabled()

void tgui::EditBoxRenderer::setBorderColorDisabled ( Color color)

Changes the color of the borders used when the edit box is disabled.

Parameters
colorNew border color

◆ setBorderColorFocused()

void tgui::EditBoxRenderer::setBorderColorFocused ( Color color)

Changes the color of the borders used when the edit box is focused.

Parameters
colorNew border color

◆ setBorderColorHover()

void tgui::EditBoxRenderer::setBorderColorHover ( Color color)

Changes the color of the borders used when the mouse is on top of the edit box.

Parameters
colorNew border color

◆ setBorders()

void tgui::EditBoxRenderer::setBorders ( const Borders & borders)

Changes the size of the borders.

Parameters
bordersSize of the borders

◆ setCaretColor()

void tgui::EditBoxRenderer::setCaretColor ( Color caretColor)

Sets the color that will be used inside the edit box for the blinking caret.

Parameters
caretColorThe color of the blinking caret

◆ setCaretColorFocused()

void tgui::EditBoxRenderer::setCaretColorFocused ( Color caretColor)

Sets the color that will be used for the blinking caret when the edit box is focused.

Parameters
caretColorThe color of the blinking caret

◆ setCaretColorHover()

void tgui::EditBoxRenderer::setCaretColorHover ( Color caretColor)

Sets the color that will be used for the blinking caret when the mouse is on top of the edit box.

Parameters
caretColorThe color of the blinking caret

◆ setCaretWidth()

void tgui::EditBoxRenderer::setCaretWidth ( float width)

Changes the width of the caret.

Parameters
widthNew width of the caret

◆ setDefaultTextColor()

void tgui::EditBoxRenderer::setDefaultTextColor ( Color defaultTextColor)

Sets the color of the default text that can optionally be displayed when the edit box is empty.

Parameters
defaultTextColorThe new default text color

◆ setDefaultTextStyle()

void tgui::EditBoxRenderer::setDefaultTextStyle ( TextStyles style)

Changes the text style of the default text (the text drawn when the edit box is empty)

Parameters
styleThe new default text style
editBox->getSharedRenderer()->setDefaultTextStyle(tgui::TextStyle::Italic | tgui::TextStyle::Bold);
@ Bold
Bold characters.
Definition TextStyle.hpp:41
@ Italic
Italic characters.
Definition TextStyle.hpp:42

◆ setPadding()

void tgui::EditBoxRenderer::setPadding ( const Padding & padding)

Changes the padding of the edit box.

When the text is auto-scaled then it will be drawn within the area defined by the size minus the border and padding. The padding is also used to define the clipping area for when the text it too long.

Parameters
paddingThe padding width and height

◆ setSelectedTextBackgroundColor()

void tgui::EditBoxRenderer::setSelectedTextBackgroundColor ( Color selectedTextBackgroundColor)

Sets the background color of the selected text that will be used inside the edit box.

Parameters
selectedTextBackgroundColorThe new background color

◆ setSelectedTextColor()

void tgui::EditBoxRenderer::setSelectedTextColor ( Color selectedTextColor)

Sets the text color of the selected text that will be used inside the edit box.

Parameters
selectedTextColorThe new selected text color

◆ setTextColor()

void tgui::EditBoxRenderer::setTextColor ( Color textColor)

Sets the text color that will be used inside the edit box.

Parameters
textColorThe new text color

◆ setTextColorDisabled()

void tgui::EditBoxRenderer::setTextColorDisabled ( Color textColor)

Sets the text color that will be used inside the edit box when the edit box is disabled.

Parameters
textColorThe new text color

◆ setTextColorFocused()

void tgui::EditBoxRenderer::setTextColorFocused ( Color textColor)

Sets the text color that will be used inside the edit box when the edit box is focused.

Parameters
textColorThe new text color

◆ setTextStyle()

void tgui::EditBoxRenderer::setTextStyle ( TextStyles style)

Changes the text style.

Parameters
styleNew text style

◆ setTexture()

void tgui::EditBoxRenderer::setTexture ( const Texture & texture)

Changes the image that is displayed.

Parameters
textureThe new edit box texture

When this image is set, the background color property will be ignored.

◆ setTextureDisabled()

void tgui::EditBoxRenderer::setTextureDisabled ( const Texture & texture)

Changes the image that is displayed when the edit box is disabled.

Parameters
textureThe new disabled texture

◆ setTextureFocused()

void tgui::EditBoxRenderer::setTextureFocused ( const Texture & texture)

Changes the image that is drawn on top of the edit box image when the edit box is focused.

Parameters
textureThe new focus texture

◆ setTextureHover()

void tgui::EditBoxRenderer::setTextureHover ( const Texture & texture)

Changes the image that is displayed when the mouse is located on top of the edit box.

Parameters
textureThe new hover texture

◆ WidgetRenderer()

tgui::WidgetRenderer::WidgetRenderer ( const std::shared_ptr< RendererData > & data)
inline

Construct the renderer from renderer data.

Parameters
dataRenderer data to initialize the renderer with

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