TGUI
0.10-beta
|
Public Member Functions | |
void | setTextStyle (TextStyles style) |
Changes the text style. More... | |
TextStyles | getTextStyle () const |
Returns text style. More... | |
void | setDefaultTextStyle (TextStyles style) |
Changes the text style of the default text (the text drawn when the edit box is empty) More... | |
TextStyles | 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 | setTextColorFocused (Color textColor) |
Sets the text color that will be used inside the edit box when the edit box is focused. More... | |
Color | getTextColorFocused () const |
Returns the text color that will be used inside the edit box when the edit box is focused. 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 | setBackgroundColorFocused (Color color) |
Changes the color of the background when the edit box is focused. More... | |
Color | getBackgroundColorFocused () const |
Returns the color of the background when the edit box is focused. 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 | setCaretColorFocused (Color caretColor) |
Sets the color that will be used for the blinking caret when the edit box is focused. More... | |
Color | getCaretColorFocused () const |
Returns the color that will be used for the blinking caret when the edit box is focused. 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 | setBorderColorFocused (Color color) |
Changes the color of the borders used when the edit box is focused. More... | |
Color | getBorderColorFocused () const |
Returns the color of the borders used when the edit box is focused. More... | |
void | setTexture (const Texture &texture) |
Changes the image that is displayed. More... | |
const Texture & | getTexture () 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... | |
const Texture & | getTextureHover () 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... | |
const Texture & | getTextureDisabled () 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... | |
const Texture & | getTextureFocused () const |
Returns the image that is drawn on top of the edit box image when the edit box is focused. More... | |
WidgetRenderer ()=default | |
Default constructor. | |
WidgetRenderer (const std::shared_ptr< RendererData > &data) | |
Construct the renderer from renderer data. More... | |
Public Member Functions inherited from tgui::WidgetRenderer | |
WidgetRenderer ()=default | |
Default constructor. | |
WidgetRenderer (const std::shared_ptr< RendererData > &data) | |
Construct the renderer from renderer data. More... | |
virtual | ~WidgetRenderer ()=default |
Virtual destructor. | |
void | setOpacity (float opacity) |
Changes the opacity of the widget. More... | |
float | getOpacity () const |
Returns the opacity of the widget. More... | |
void | setOpacityDisabled (float opacity) |
Changes the opacity of the widget when it is disabled. More... | |
float | getOpacityDisabled () const |
Returns the opacity of the widget when it is disabled. 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 | setTextSize (unsigned int size) |
Changes the text size of the widget that is specified by the renderer. More... | |
unsigned int | getTextSize () const |
Returns text size of the widget that is specified by the renderer. More... | |
void | setTransparentTexture (bool ignoreTransparentParts) |
Sets whether mouse events should be ignored on transparent parts of the texture of the widget in normal state. More... | |
bool | getTransparentTexture () const |
Returns whether mouse events should be ignored on transparent parts of the texture of the widget. More... | |
void | setProperty (const String &property, ObjectConverter &&value) |
Changes a property of the renderer. More... | |
ObjectConverter | getProperty (const String &property) const |
Retrieves the value of a certain property. More... | |
const std::map< String, ObjectConverter > & | getPropertyValuePairs () const |
Gets a map with all properties and their values. More... | |
void | subscribe (const void *id, const std::function< void(const String &property)> &function) |
Subscribes a callback function to changes in the renderer. More... | |
void | unsubscribe (const void *id) |
Subscribes a callback function to changes in the renderer. More... | |
void | setData (const std::shared_ptr< RendererData > &data) |
std::shared_ptr< RendererData > | getData () const |
Returns the renderer data. More... | |
std::shared_ptr< RendererData > | clone () const |
Gets a clone of the renderer data. More... | |
Additional Inherited Members | |
Protected Attributes inherited from tgui::WidgetRenderer | |
std::shared_ptr< RendererData > | m_data = RendererData::create() |
Color tgui::EditBoxRenderer::getBackgroundColor | ( | ) | const |
Returns the color of the background.
Color tgui::EditBoxRenderer::getBackgroundColorDisabled | ( | ) | const |
Returns the color of the background when the edit box is disabled.
Color tgui::EditBoxRenderer::getBackgroundColorFocused | ( | ) | const |
Returns the color of the background when the edit box is focused.
Color tgui::EditBoxRenderer::getBackgroundColorHover | ( | ) | const |
Returns the color of the background in the hover state (mouse on edit box)
Color tgui::EditBoxRenderer::getBorderColor | ( | ) | const |
Returns the color of the borders.
Color tgui::EditBoxRenderer::getBorderColorDisabled | ( | ) | const |
Returns the color of the borders used when the edit box is disabled.
Color tgui::EditBoxRenderer::getBorderColorFocused | ( | ) | const |
Returns the color of the borders used when the edit box is focused.
Color tgui::EditBoxRenderer::getBorderColorHover | ( | ) | const |
Returns the color of the borders used when the mouse is on top of the edit box.
Borders tgui::EditBoxRenderer::getBorders | ( | ) | const |
Returns the size of the borders.
Color tgui::EditBoxRenderer::getCaretColor | ( | ) | const |
Returns the color that will be used inside the edit box for the blinking caret.
Color tgui::EditBoxRenderer::getCaretColorFocused | ( | ) | const |
Returns the color that will be used for the blinking caret when the edit box is focused.
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.
float tgui::EditBoxRenderer::getCaretWidth | ( | ) | const |
Returns the caret width.
Color tgui::EditBoxRenderer::getDefaultTextColor | ( | ) | const |
Returns the color of the default text that can optionally be displayed when the edit box is empty.
TextStyles tgui::EditBoxRenderer::getDefaultTextStyle | ( | ) | const |
Returns the text style of the default text (the text drawn when the edit box is empty)
Padding tgui::EditBoxRenderer::getPadding | ( | ) | const |
Color tgui::EditBoxRenderer::getSelectedTextBackgroundColor | ( | ) | const |
Returns the background color of the selected text that will be used inside the edit box.
Color tgui::EditBoxRenderer::getSelectedTextColor | ( | ) | const |
Returns the text color of the selected text that will be used inside the edit box.
Color tgui::EditBoxRenderer::getTextColor | ( | ) | const |
Returns the text color that will be used inside the edit box.
Color tgui::EditBoxRenderer::getTextColorDisabled | ( | ) | const |
Returns the text color that will be used inside the edit box when the edit box is disabled.
Color tgui::EditBoxRenderer::getTextColorFocused | ( | ) | const |
Returns the text color that will be used inside the edit box when the edit box is focused.
TextStyles tgui::EditBoxRenderer::getTextStyle | ( | ) | const |
Returns text style.
const Texture & tgui::EditBoxRenderer::getTexture | ( | ) | const |
Returns the image that is displayed.
const Texture & tgui::EditBoxRenderer::getTextureDisabled | ( | ) | const |
Returns the image that is displayed when the edit box is disabled.
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.
const Texture & tgui::EditBoxRenderer::getTextureHover | ( | ) | const |
Returns the image that is displayed when the mouse is located on top of the edit box.
void tgui::EditBoxRenderer::setBackgroundColor | ( | Color | color | ) |
Changes the color of the background.
color | New background color |
Note that this color is ignored when you set an image as background.
void tgui::EditBoxRenderer::setBackgroundColorDisabled | ( | Color | color | ) |
Changes the color of the background when the edit box is disabled.
color | New background color |
Note that this color is ignored when you set an image as background.
void tgui::EditBoxRenderer::setBackgroundColorFocused | ( | Color | color | ) |
Changes the color of the background when the edit box is focused.
color | New background color |
Note that this color is ignored when you set an image as background.
void tgui::EditBoxRenderer::setBackgroundColorHover | ( | Color | color | ) |
Changes the color of the background in the hover state (mouse on edit box, but not pressed)
color | New background color |
Note that this color is ignored when you set an image as background.
void tgui::EditBoxRenderer::setBorderColor | ( | Color | color | ) |
Changes the color of the borders.
color | New border color |
void tgui::EditBoxRenderer::setBorderColorDisabled | ( | Color | color | ) |
Changes the color of the borders used when the edit box is disabled.
color | New border color |
void tgui::EditBoxRenderer::setBorderColorFocused | ( | Color | color | ) |
Changes the color of the borders used when the edit box is focused.
color | New border color |
void tgui::EditBoxRenderer::setBorderColorHover | ( | Color | color | ) |
Changes the color of the borders used when the mouse is on top of the edit box.
color | New border color |
void tgui::EditBoxRenderer::setBorders | ( | const Borders & | borders | ) |
Changes the size of the borders.
borders | Size of the borders |
void tgui::EditBoxRenderer::setCaretColor | ( | Color | caretColor | ) |
Sets the color that will be used inside the edit box for the blinking caret.
caretColor | The color of the blinking caret |
void tgui::EditBoxRenderer::setCaretColorFocused | ( | Color | caretColor | ) |
Sets the color that will be used for the blinking caret when the edit box is focused.
caretColor | The color of the blinking caret |
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.
caretColor | The color of the blinking caret |
void tgui::EditBoxRenderer::setCaretWidth | ( | float | width | ) |
Changes the width of the caret.
width | New width of the caret |
void tgui::EditBoxRenderer::setDefaultTextColor | ( | Color | defaultTextColor | ) |
Sets the color of the default text that can optionally be displayed when the edit box is empty.
defaultTextColor | The new default text color |
void tgui::EditBoxRenderer::setDefaultTextStyle | ( | TextStyles | style | ) |
Changes the text style of the default text (the text drawn when the edit box is empty)
style | The new default text style |
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.
padding | The padding width and height |
void tgui::EditBoxRenderer::setSelectedTextBackgroundColor | ( | Color | selectedTextBackgroundColor | ) |
Sets the background color of the selected text that will be used inside the edit box.
selectedTextBackgroundColor | The new background color |
void tgui::EditBoxRenderer::setSelectedTextColor | ( | Color | selectedTextColor | ) |
Sets the text color of the selected text that will be used inside the edit box.
selectedTextColor | The new selected text color |
void tgui::EditBoxRenderer::setTextColor | ( | Color | textColor | ) |
Sets the text color that will be used inside the edit box.
textColor | The new text color |
void tgui::EditBoxRenderer::setTextColorDisabled | ( | Color | textColor | ) |
Sets the text color that will be used inside the edit box when the edit box is disabled.
textColor | The new text color |
void tgui::EditBoxRenderer::setTextColorFocused | ( | Color | textColor | ) |
Sets the text color that will be used inside the edit box when the edit box is focused.
textColor | The new text color |
void tgui::EditBoxRenderer::setTextStyle | ( | TextStyles | style | ) |
Changes the text style.
style | New text style |
void tgui::EditBoxRenderer::setTexture | ( | const Texture & | texture | ) |
Changes the image that is displayed.
texture | The new edit box texture |
When this image is set, the background color property will be ignored.
void tgui::EditBoxRenderer::setTextureDisabled | ( | const Texture & | texture | ) |
Changes the image that is displayed when the edit box is disabled.
texture | The new disabled texture |
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.
texture | The new focus texture |
void tgui::EditBoxRenderer::setTextureHover | ( | const Texture & | texture | ) |
Changes the image that is displayed when the mouse is located on top of the edit box.
texture | The new hover texture |
|
inline |
Construct the renderer from renderer data.
data | Renderer data to initialize the renderer with |