TGUI  0.8.8
EditBoxRenderer.hpp
1 //
3 // TGUI - Texus' Graphical User Interface
4 // Copyright (C) 2012-2020 Bruno Van de Velde (vdv_b@tgui.eu)
5 //
6 // This software is provided 'as-is', without any express or implied warranty.
7 // In no event will the authors be held liable for any damages arising from the use of this software.
8 //
9 // Permission is granted to anyone to use this software for any purpose,
10 // including commercial applications, and to alter it and redistribute it freely,
11 // subject to the following restrictions:
12 //
13 // 1. The origin of this software must not be misrepresented;
14 // you must not claim that you wrote the original software.
15 // If you use this software in a product, an acknowledgment
16 // in the product documentation would be appreciated but is not required.
17 //
18 // 2. Altered source versions must be plainly marked as such,
19 // and must not be misrepresented as being the original software.
20 //
21 // 3. This notice may not be removed or altered from any source distribution.
22 //
24 
25 
26 #ifndef TGUI_EDIT_BOX_RENDERER_HPP
27 #define TGUI_EDIT_BOX_RENDERER_HPP
28 
29 
30 #include <TGUI/Renderers/WidgetRenderer.hpp>
31 
33 
34 namespace tgui
35 {
36  class TGUI_API EditBoxRenderer : public WidgetRenderer
37  {
38  public:
39 
41 
42 
49  void setTextStyle(TextStyle style);
50 
51 
59 
60 
72 
73 
81 
82 
89  void setBorders(const Borders& borders);
90 
91 
99 
100 
110  void setPadding(const Padding& padding);
111 
112 
122 
123 
130  void setCaretWidth(float width);
131 
132 
139  float getCaretWidth() const;
140 
141 
148  void setTextColor(Color textColor);
149 
150 
158 
159 
166  void setTextColorDisabled(Color textColor);
167 
168 
176 
177 
182  void setTextColorFocused(Color textColor);
183 
184 
190 
191 
198  void setSelectedTextColor(Color selectedTextColor);
199 
200 
208 
209 
216  void setSelectedTextBackgroundColor(Color selectedTextBackgroundColor);
217 
218 
226 
227 
234  void setDefaultTextColor(Color defaultTextColor);
235 
236 
244 
245 
255 
256 
264 
265 
275 
276 
284 
285 
295 
296 
304 
305 
313 
314 
320 
321 
328  void setCaretColor(Color caretColor);
329 
330 
338 
339 
346  void setCaretColorHover(Color caretColor);
347 
348 
356 
357 
362  void setCaretColorFocused(Color caretColor);
363 
364 
370 
371 
378  void setBorderColor(Color color);
379 
380 
388 
389 
397 
398 
406 
407 
415 
416 
424 
425 
431 
432 
438 
439 
448  void setTexture(const Texture& texture);
449 
450 
457  Texture& getTexture() const;
458 
459 
466  void setTextureHover(const Texture& texture);
467 
468 
476 
477 
484  void setTextureDisabled(const Texture& texture);
485 
486 
494 
495 
502  void setTextureFocused(const Texture& texture);
503 
504 
512 
513 
515  };
516 
518 }
519 
521 
522 #endif // TGUI_EDIT_BOX_RENDERER_HPP
Color getBackgroundColorDisabled() const
Returns the color of the background when the edit box is disabled.
Color getCaretColor() const
Returns the color that will be used inside the edit box for the blinking caret.
void setBorderColorDisabled(Color color)
Changes the color of the borders used when the edit box is disabled.
Definition: EditBoxRenderer.hpp:37
Color getBackgroundColorFocused() const
Returns the color of the background when the edit box is focused.
Color getBackgroundColor() const
Returns the color of the background.
void setBackgroundColorFocused(Color color)
Changes the color of the background when the edit box is focused.
void setTextureFocused(const Texture &texture)
Changes the image that is drawn on top of the edit box image when the edit box is focused.
Base class for all renderer classes.
Definition: WidgetRenderer.hpp:81
void setTextColor(Color textColor)
Sets the text color that will be used inside the edit box.
void setCaretColorFocused(Color caretColor)
Sets the color that will be used for the blinking caret when the edit box is focused.
Namespace that contains all TGUI functions and classes.
Definition: AbsoluteOrRelativeValue.hpp:37
float getCaretWidth() const
Returns the caret width.
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.
Texture & getTextureDisabled() const
Returns the image that is displayed when the edit box is disabled.
Texture & getTextureHover() const
Returns the image that is displayed when the mouse is located on top of the edit box.
TextStyle getTextStyle() const
Returns text style.
void setBackgroundColor(Color color)
Changes the color of the background.
Wrapper for colors.
Definition: Color.hpp:49
void setBorders(const Borders &borders)
Changes the size of the borders.
Color getSelectedTextBackgroundColor() const
Returns the background color of the selected text that will be used inside the edit box.
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 setSelectedTextColor(Color selectedTextColor)
Sets the text color of the selected text that will be used inside the edit box.
Color getBorderColor() const
Returns the color of the borders.
void setTextureHover(const Texture &texture)
Changes the image that is displayed when the mouse is located on top of the edit box.
Color getTextColorDisabled() const
Returns the text color that will be used inside the edit box when the edit box is disabled.
void setPadding(const Padding &padding)
Changes the padding of the edit box.
void setSelectedTextBackgroundColor(Color selectedTextBackgroundColor)
Sets the background color of the selected text that will be used inside the edit box.
Borders getBorders() const
Returns the size of the borders.
void setDefaultTextStyle(TextStyle style)
Changes the text style of the default text (the text drawn when the edit box is empty)
Color getTextColor() const
Returns the text color that will be used inside the edit box.
Texture & getTextureFocused() const
Returns the image that is drawn on top of the edit box image when the edit box is focused.
Definition: Texture.hpp:42
Color getDefaultTextColor() const
Returns the color of the default text that can optionally be displayed when the edit box is empty.
void setBackgroundColorHover(Color color)
Changes the color of the background in the hover state (mouse on edit box, but not pressed)
void setCaretColor(Color caretColor)
Sets the color that will be used inside the edit box for the blinking caret.
Color getBorderColorHover() const
Returns the color of the borders used when the mouse is on top of the edit box.
TextStyle getDefaultTextStyle() const
Returns the text style of the default text (the text drawn when the edit box is empty)
void setTextColorDisabled(Color textColor)
Sets the text color that will be used inside the edit box when the edit box is disabled.
void setTextureDisabled(const Texture &texture)
Changes the image that is displayed 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.
Color getBackgroundColorHover() const
Returns the color of the background in the hover state (mouse on edit box)
Definition: Outline.hpp:39
Color getCaretColorFocused() const
Returns the color that will be used for the blinking caret when the edit box is focused.
Padding getPadding() const
Returns the size of the padding.
WidgetRenderer()=default
Default constructor.
Color getTextColorFocused() const
Returns the text color that will be used inside the edit box when the edit box is focused.
void setBorderColor(Color color)
Changes the color of the borders.
Texture & getTexture() const
Returns the image that is displayed.
void setCaretWidth(float width)
Changes the width of the caret.
void setTextStyle(TextStyle style)
Changes the text style.
Color getBorderColorDisabled() const
Returns the color of the borders used when the edit box is disabled.
void setBorderColorHover(Color color)
Changes the color of the borders used when the mouse is on top of the edit box.
void setBackgroundColorDisabled(Color color)
Changes the color of the background when the edit box is disabled.
Color getSelectedTextColor() const
Returns the text color of the selected text that will be used inside the edit box.
void setBorderColorFocused(Color color)
Changes the color of the borders used when the edit box is focused.
void setDefaultTextColor(Color defaultTextColor)
Sets the color of the default text that can optionally be displayed when the edit box is empty.
Wrapper for text styles.
Definition: TextStyle.hpp:47
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.