TGUI  0.8-dev
EditBoxRenderer.hpp
1 //
3 // TGUI - Texus' Graphical User Interface
4 // Copyright (C) 2012-2017 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 
43  EditBoxRenderer() = default;
44 
45 
52  EditBoxRenderer(std::shared_ptr<RendererData> data)
53  {
54  setData(data);
55  }
56 
57 
64  void setTextStyle(TextStyle style);
65 
66 
73  TextStyle getTextStyle() const;
74 
75 
86  void setDefaultTextStyle(TextStyle style);
87 
88 
95  TextStyle getDefaultTextStyle() const;
96 
97 
104  void setBorders(const Borders& borders);
105 
106 
113  Borders getBorders() const;
114 
115 
125  void setPadding(const Padding& padding);
126 
127 
136  Padding getPadding() const;
137 
138 
145  void setCaretWidth(float width);
146 
147 
154  float getCaretWidth() const;
155 
156 
163  void setTextColor(Color textColor);
164 
165 
172  Color getTextColor() const;
173 
174 
181  void setTextColorDisabled(Color textColor);
182 
183 
190  Color getTextColorDisabled() const;
191 
192 
199  void setSelectedTextColor(Color selectedTextColor);
200 
201 
208  Color getSelectedTextColor() const;
209 
210 
217  void setSelectedTextBackgroundColor(Color selectedTextBackgroundColor);
218 
219 
226  Color getSelectedTextBackgroundColor() const;
227 
228 
235  void setDefaultTextColor(Color defaultTextColor);
236 
237 
244  Color getDefaultTextColor() const;
245 
246 
255  void setBackgroundColor(Color color);
256 
257 
264  Color getBackgroundColor() const;
265 
266 
275  void setBackgroundColorHover(Color color);
276 
277 
284  Color getBackgroundColorHover() const;
285 
286 
295  void setBackgroundColorDisabled(Color color);
296 
297 
304  Color getBackgroundColorDisabled() const;
305 
306 
313  void setCaretColor(Color caretColor);
314 
315 
322  Color getCaretColor() const;
323 
324 
331  void setCaretColorHover(Color caretColor);
332 
333 
340  Color getCaretColorHover() const;
341 
342 
349  void setCaretColorDisabled(Color caretColor);
350 
351 
358  Color getCaretColorDisabled() const;
359 
360 
367  void setBorderColor(Color color);
368 
369 
376  Color getBorderColor() const;
377 
378 
385  void setBorderColorHover(Color color);
386 
387 
394  Color getBorderColorHover() const;
395 
396 
403  void setBorderColorDisabled(Color color);
404 
405 
412  Color getBorderColorDisabled() const;
413 
414 
423  void setTexture(const Texture& texture);
424 
425 
432  Texture& getTexture() const;
433 
434 
441  void setTextureHover(const Texture& texture);
442 
443 
450  Texture& getTextureHover() const;
451 
452 
459  void setTextureDisabled(const Texture& texture);
460 
461 
468  Texture& getTextureDisabled() const;
469 
470 
477  void setTextureFocused(const Texture& texture);
478 
479 
486  Texture& getTextureFocused() const;
487 
488 
490  };
491 
493 }
494 
496 
497 #endif // TGUI_EDIT_BOX_RENDERER_HPP
Namespace that contains all TGUI functions and classes.
Definition: Animation.hpp:33
Wrapper for colors.
Definition: Color.hpp:46
Wrapper for text styles.
Definition: TextStyle.hpp:46
EditBoxRenderer(std::shared_ptr< RendererData > data)
Construct the renderer from renderer data.
Definition: EditBoxRenderer.hpp:52
Definition: Texture.hpp:39
Definition: EditBoxRenderer.hpp:36
Definition: Outline.hpp:37
Base class for all renderer classes.
Definition: WidgetRenderer.hpp:59