TGUI  1.6.1
Loading...
Searching...
No Matches
EditBoxRenderer.hpp
1
2//
3// TGUI - Texus' Graphical User Interface
4// Copyright (C) 2012-2024 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#ifndef TGUI_EDIT_BOX_RENDERER_HPP
26#define TGUI_EDIT_BOX_RENDERER_HPP
27
28#include <TGUI/Renderers/WidgetRenderer.hpp>
29
31
32TGUI_MODULE_EXPORT namespace tgui
33{
34 class TGUI_API EditBoxRenderer : public WidgetRenderer
35 {
36 public:
37
38 using WidgetRenderer::WidgetRenderer;
39
46
52 TGUI_NODISCARD TextStyles getTextStyle() const;
53
64
70 TGUI_NODISCARD TextStyles getDefaultTextStyle() const;
71
77 void setBorders(const Borders& borders);
78
84 TGUI_NODISCARD Borders getBorders() const;
85
94 void setPadding(const Padding& padding);
95
103 TGUI_NODISCARD Padding getPadding() const;
104
110 void setCaretWidth(float width);
111
117 TGUI_NODISCARD float getCaretWidth() const;
118
124 void setTextColor(Color textColor);
125
131 TGUI_NODISCARD Color getTextColor() const;
132
139
145 TGUI_NODISCARD Color getTextColorDisabled() const;
146
151 void setTextColorFocused(Color textColor);
152
157 TGUI_NODISCARD Color getTextColorFocused() const;
158
164 void setSelectedTextColor(Color selectedTextColor);
165
171 TGUI_NODISCARD Color getSelectedTextColor() const;
172
178 void setSelectedTextBackgroundColor(Color selectedTextBackgroundColor);
179
185 TGUI_NODISCARD Color getSelectedTextBackgroundColor() const;
186
192 void setDefaultTextColor(Color defaultTextColor);
193
199 TGUI_NODISCARD Color getDefaultTextColor() const;
200
209
215 TGUI_NODISCARD Color getBackgroundColor() const;
216
225
231 TGUI_NODISCARD Color getBackgroundColorHover() const;
232
241
247 TGUI_NODISCARD Color getBackgroundColorDisabled() const;
248
256
261 TGUI_NODISCARD Color getBackgroundColorFocused() const;
262
268 void setCaretColor(Color caretColor);
269
275 TGUI_NODISCARD Color getCaretColor() const;
276
282 void setCaretColorHover(Color caretColor);
283
289 TGUI_NODISCARD Color getCaretColorHover() const;
290
295 TGUI_DEPRECATED("Use setCaretColor instead, caret is never shown in unfocused state") void setCaretColorFocused(Color caretColor);
296
301 TGUI_DEPRECATED("Use getCaretColor instead, caret is never shown in unfocused state") TGUI_NODISCARD Color getCaretColorFocused() const;
302
308 void setBorderColor(Color color);
309
315 TGUI_NODISCARD Color getBorderColor() const;
316
322 void setBorderColorHover(Color color);
323
329 TGUI_NODISCARD Color getBorderColorHover() const;
330
336 void setBorderColorDisabled(Color color);
337
343 TGUI_NODISCARD Color getBorderColorDisabled() const;
344
349 void setBorderColorFocused(Color color);
350
355 TGUI_NODISCARD Color getBorderColorFocused() const;
356
364 void setTexture(const Texture& texture);
365
371 TGUI_NODISCARD const Texture& getTexture() const;
372
378 void setTextureHover(const Texture& texture);
379
385 TGUI_NODISCARD const Texture& getTextureHover() const;
386
392 void setTextureDisabled(const Texture& texture);
393
399 TGUI_NODISCARD const Texture& getTextureDisabled() const;
400
406 void setTextureFocused(const Texture& texture);
407
413 TGUI_NODISCARD const Texture& getTextureFocused() const;
414
416 };
417
419}
420
422
423#endif // TGUI_EDIT_BOX_RENDERER_HPP
Wrapper for colors.
Definition Color.hpp:73
Definition EditBoxRenderer.hpp:35
TextStyles getTextStyle() const
Returns text style.
Padding getPadding() const
Returns the size of the padding.
void setPadding(const Padding &padding)
Changes the padding of 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.
void setBorders(const Borders &borders)
Changes the size of the borders.
void setCaretColor(Color caretColor)
Sets the color that will be used inside the edit box for the blinking caret.
void setTextColorFocused(Color textColor)
Sets the text color that will be used inside the edit box when the edit box is focused.
Color getTextColorFocused() const
Returns the text color that will be used inside the edit box when the edit box is focused.
void setSelectedTextBackgroundColor(Color selectedTextBackgroundColor)
Sets the background color of the selected text that will be used inside the edit box.
void setBackgroundColor(Color color)
Changes the color of the background.
Borders getBorders() const
Returns the size of the borders.
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 setTextStyle(TextStyles style)
Changes the text style.
void setBackgroundColorFocused(Color color)
Changes the color of the background when the edit box is focused.
void setBackgroundColorDisabled(Color color)
Changes the color of the background when the edit box is disabled.
void setDefaultTextStyle(TextStyles style)
Changes the text style of the default text (the text drawn when the edit box is empty)
float getCaretWidth() const
Returns the caret width.
Color getCaretColor() const
Returns the color that will be used inside the edit box for the blinking caret.
Color getBackgroundColorFocused() const
Returns the color of the background when the edit box is focused.
void setCaretWidth(float width)
Changes the width of the caret.
Color getDefaultTextColor() const
Returns the color of the default text that can optionally be displayed when the edit box is empty.
Color getBackgroundColorHover() const
Returns the color of the background in the hover state (mouse on edit box)
void setSelectedTextColor(Color selectedTextColor)
Sets the text color of the selected text 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.
TextStyles getDefaultTextStyle() const
Returns the text style of the default text (the text drawn when the edit box is empty)
Color getSelectedTextColor() const
Returns the text color of the selected text that will be used inside the edit box.
Color getBackgroundColorDisabled() const
Returns the color of the background when the edit box is disabled.
Color getSelectedTextBackgroundColor() const
Returns the background color of the selected text that will be used inside the edit box.
Color getTextColor() const
Returns the text color that will be used inside the edit box.
void setBackgroundColorHover(Color color)
Changes the color of the background in the hover state (mouse on edit box, but not pressed)
Color getBackgroundColor() const
Returns the color of the background.
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.
Color getTextColorDisabled() const
Returns the text color that will be used inside the edit box when the edit box is disabled.
void setTextColor(Color textColor)
Sets the text color that will be used inside the edit box.
Definition Outline.hpp:38
Wrapper for text styles.
Definition TextStyle.hpp:55
Texture wrapper that internally reuses resources when multiple Texture objects are loaded from the sa...
Definition Texture.hpp:57
Base class for all renderer classes.
Definition WidgetRenderer.hpp:69
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:38