TGUI  0.8-dev
tgui::EditBoxRenderer Class Reference
Inheritance diagram for tgui::EditBoxRenderer:
tgui::WidgetRenderer

Public Member Functions

 EditBoxRenderer ()=default
 Default constructor.
 
 EditBoxRenderer (std::shared_ptr< RendererData > data)
 Construct the renderer from renderer data. More...
 
void setTextStyle (TextStyle style)
 Changes the text style. More...
 
TextStyle getTextStyle () const
 Returns text style. More...
 
void setDefaultTextStyle (TextStyle style)
 Changes the text style of the default text (the text drawn when the edit box is empty) More...
 
TextStyle getDefaultTextStyle () const
 Returns the text style of the default text (the text drawn when the edit box is empty) More...
 
void setBorders (const Borders &borders)
 Changes the size of the borders. More...
 
Borders getBorders () const
 Returns the size of the borders. More...
 
void setPadding (const Padding &padding)
 Changes the padding of the edit box. More...
 
Padding getPadding () const
 Returns the size of the padding. More...
 
void setCaretWidth (float width)
 Changes the width of the caret. More...
 
float getCaretWidth () const
 Returns the caret width. More...
 
void setTextColor (Color textColor)
 Sets the text color that will be used inside the edit box. More...
 
Color getTextColor () const
 Returns the text color that will be used inside the edit box. More...
 
void setTextColorDisabled (Color textColor)
 Sets the text color that will be used inside the edit box when the edit box is disabled. More...
 
Color getTextColorDisabled () const
 Returns the text color that will be used inside the edit box when the edit box is disabled. More...
 
void setSelectedTextColor (Color selectedTextColor)
 Sets the text color of the selected text that will be used inside the edit box. More...
 
Color getSelectedTextColor () const
 Returns the text color of the selected text that will be used inside the edit box. More...
 
void setSelectedTextBackgroundColor (Color selectedTextBackgroundColor)
 Sets the background color of the selected text that will be used inside the edit box. More...
 
Color getSelectedTextBackgroundColor () const
 Returns the background color of the selected text that will be used inside the edit box. More...
 
void setDefaultTextColor (Color defaultTextColor)
 Sets the color of the default text that can optionally be displayed when the edit box is empty. More...
 
Color getDefaultTextColor () const
 Returns the color of the default text that can optionally be displayed when the edit box is empty. More...
 
void setBackgroundColor (Color color)
 Changes the color of the background. More...
 
Color getBackgroundColor () const
 Returns the color of the background. More...
 
void setBackgroundColorHover (Color color)
 Changes the color of the background in the hover state (mouse on edit box, but not pressed) More...
 
Color getBackgroundColorHover () const
 Returns the color of the background in the hover state (mouse on edit box) More...
 
void setBackgroundColorDisabled (Color color)
 Changes the color of the background when the edit box is disabled. More...
 
Color getBackgroundColorDisabled () const
 Returns the color of the background when the edit box is disabled. More...
 
void setCaretColor (Color caretColor)
 Sets the color that will be used inside the edit box for the blinking caret. More...
 
Color getCaretColor () const
 Returns the color that will be used inside the edit box for the blinking caret. More...
 
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. More...
 
Color getCaretColorHover () const
 Returns the color that will be used for the blinking caret when the mouse is on top of the edit box. More...
 
void setCaretColorDisabled (Color caretColor)
 Sets the color that will be used for the blinking caret when the edit box is disabled. More...
 
Color getCaretColorDisabled () const
 Returns the color that will be used for the blinking caret when the edit box is disabled. More...
 
void setBorderColor (Color color)
 Changes the color of the borders. More...
 
Color getBorderColor () const
 Returns the color of the borders. More...
 
void setBorderColorHover (Color color)
 Changes the color of the borders used when the mouse is on top of the edit box. More...
 
Color getBorderColorHover () const
 Returns the color of the borders used when the mouse is on top of the edit box. More...
 
void setBorderColorDisabled (Color color)
 Changes the color of the borders used when the edit box is disabled. More...
 
Color getBorderColorDisabled () const
 Returns the color of the borders used when the edit box is disabled. More...
 
void setTexture (const Texture &texture)
 Changes the image that is displayed. More...
 
TexturegetTexture () const
 Returns the image that is displayed. More...
 
void setTextureHover (const Texture &texture)
 Changes the image that is displayed when the mouse is located on top of the edit box. More...
 
TexturegetTextureHover () const
 Returns the image that is displayed when the mouse is located on top of the edit box. More...
 
void setTextureDisabled (const Texture &texture)
 Changes the image that is displayed when the edit box is disabled. More...
 
TexturegetTextureDisabled () const
 Returns the image that is displayed when the edit box is disabled. More...
 
void setTextureFocused (const Texture &texture)
 Changes the image that is drawn on top of the edit box image when the edit box is focused. More...
 
TexturegetTextureFocused () const
 Returns the image that is drawn on top of the edit box image when the edit box is focused. More...
 
- Public Member Functions inherited from tgui::WidgetRenderer
 WidgetRenderer ()=default
 Default constructor.
 
 WidgetRenderer (std::shared_ptr< RendererData > data)
 Construct the renderer from renderer data. More...
 
virtual ~WidgetRenderer ()
 Virtual destructor.
 
void setOpacity (float opacity)
 Changes the opacity of the widget. More...
 
float getOpacity () const
 Returns the opacity of the widget. More...
 
void setFont (Font font)
 Changes the font used for the text in the widget. More...
 
Font getFont () const
 Returns the font associated with the widget (if any) More...
 
void setProperty (const std::string &property, const std::string &value)
 Changes a property of the renderer. More...
 
void setProperty (const std::string &property, ObjectConverter &&value)
 Changes a property of the renderer. More...
 
ObjectConverter getProperty (const std::string &property) const
 Retrieves the value of a certain property. More...
 
const std::map< std::string, ObjectConverter > & getPropertyValuePairs () const
 Gets a map with all properties and their values. More...
 
void subscribe (void *id, const std::function< void(const std::string &property)> &function)
 Subscribes a callback function to changes in the renderer. More...
 
void unsubscribe (void *id)
 Subscribes a callback function to changes in the renderer. More...
 
std::shared_ptr< RendererDatagetData () const
 Returns the renderer data. More...
 
std::shared_ptr< RendererDataclone () const
 Gets a clone of the renderer data. More...
 

Constructor & Destructor Documentation

§ EditBoxRenderer()

tgui::EditBoxRenderer::EditBoxRenderer ( std::shared_ptr< RendererData data)
inline

Construct the renderer from renderer data.

Parameters
dataRenderer data to initialize the renderer with

Member Function Documentation

§ getBackgroundColor()

Color tgui::EditBoxRenderer::getBackgroundColor ( ) const

Returns the color of the background.

Returns
Background color

§ getBackgroundColorDisabled()

Color tgui::EditBoxRenderer::getBackgroundColorDisabled ( ) const

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

Returns
Background color in disabled state

§ getBackgroundColorHover()

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()

Color tgui::EditBoxRenderer::getBorderColor ( ) const

Returns the color of the borders.

Returns
border color

§ getBorderColorDisabled()

Color tgui::EditBoxRenderer::getBorderColorDisabled ( ) const

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

Returns
border color

§ getBorderColorHover()

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()

Borders tgui::EditBoxRenderer::getBorders ( ) const

Returns the size of the borders.

Returns
border size

§ getCaretColor()

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

§ getCaretColorDisabled()

Color tgui::EditBoxRenderer::getCaretColorDisabled ( ) const

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

Returns
The color of the blinking caret

§ getCaretColorHover()

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()

float tgui::EditBoxRenderer::getCaretWidth ( ) const

Returns the caret width.

Returns
Width of the caret

§ getDefaultTextColor()

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()

TextStyle 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()

Padding tgui::EditBoxRenderer::getPadding ( ) const

Returns the size of the padding.

Returns
padding size
See also
setPadding

§ getSelectedTextBackgroundColor()

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()

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()

Color tgui::EditBoxRenderer::getTextColor ( ) const

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

Returns
Text color

§ getTextColorDisabled()

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

§ getTextStyle()

TextStyle tgui::EditBoxRenderer::getTextStyle ( ) const

Returns text style.

Returns
Style of the text

§ getTexture()

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

Returns the image that is displayed.

Returns
edit box texture

§ getTextureDisabled()

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

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

Returns
disabled texture

§ getTextureFocused()

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()

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.

§ 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

§ 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

§ setCaretColorDisabled()

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

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

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 ( TextStyle  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->getRenderer()->setDefaultTextStyle(sf::Text::Italic | sf::Text::Bold);

§ 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

§ setTextStyle()

void tgui::EditBoxRenderer::setTextStyle ( TextStyle  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

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