Irrlicht 3D Engine
IGUIEditBox.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2012 Nikolaus Gebhardt
2 // This file is part of the "Irrlicht Engine".
3 // For conditions of distribution and use, see copyright notice in irrlicht.h
4 
5 #ifndef __I_GUI_EDIT_BOX_H_INCLUDED__
6 #define __I_GUI_EDIT_BOX_H_INCLUDED__
7 
8 #include "IGUIElement.h"
9 #include "SColor.h"
10 
11 namespace irr
12 {
13 namespace gui
14 {
15  class IGUIFont;
16 
18 
23  class IGUIEditBox : public IGUIElement
24  {
25  public:
26 
28  IGUIEditBox(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
29  : IGUIElement(EGUIET_EDIT_BOX, environment, parent, id, rectangle) {}
30 
32 
34  virtual void setOverrideFont(IGUIFont* font=0) = 0;
35 
37 
38  virtual IGUIFont* getOverrideFont() const = 0;
39 
41 
43  virtual IGUIFont* getActiveFont() const = 0;
44 
46 
53  virtual void setOverrideColor(video::SColor color) = 0;
54 
56  virtual video::SColor getOverrideColor() const = 0;
57 
59 
62  virtual void enableOverrideColor(bool enable) = 0;
63 
65 
66  virtual bool isOverrideColorEnabled(void) const = 0;
67 
69  virtual void setDrawBackground(bool draw) = 0;
70 
72 
73  virtual void setDrawBorder(bool border) = 0;
74 
76 
80  virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) = 0;
81 
83 
85  virtual void setWordWrap(bool enable) = 0;
86 
88 
89  virtual bool isWordWrapEnabled() const = 0;
90 
92 
94  virtual void setMultiLine(bool enable) = 0;
95 
97 
98  virtual bool isMultiLineEnabled() const = 0;
99 
101 
102  virtual void setAutoScroll(bool enable) = 0;
103 
105 
106  virtual bool isAutoScrollEnabled() const = 0;
107 
109 
112  virtual void setPasswordBox(bool passwordBox, wchar_t passwordChar = L'*') = 0;
113 
115  virtual bool isPasswordBox() const = 0;
116 
118 
119  virtual core::dimension2du getTextDimension() = 0;
120 
122 
124  virtual void setMax(u32 max) = 0;
125 
127  virtual u32 getMax() const = 0;
128  };
129 
130 
131 } // end namespace gui
132 } // end namespace irr
133 
134 #endif
135 
virtual bool isOverrideColorEnabled(void) const =0
Checks if an override color is enabled.
virtual video::SColor getOverrideColor() const =0
Gets the override color.
virtual void setWordWrap(bool enable)=0
Enables or disables word wrap.
virtual bool isPasswordBox() const =0
Returns true if the edit box is currently a password box.
virtual bool isMultiLineEnabled() const =0
Checks if multi line editing is enabled.
Everything in the Irrlicht Engine can be found in this namespace.
Definition: aabbox3d.h:12
GUI Environment. Used as factory and manager of all other GUI elements.
Font interface.
Definition: IGUIFont.h:39
signed int s32
32 bit signed variable.
Definition: irrTypes.h:66
virtual void draw()
Draws the element and its children.
Definition: IGUIElement.h:312
unsigned int u32
32 bit unsigned variable.
Definition: irrTypes.h:58
virtual void setMax(u32 max)=0
Sets the maximum amount of characters which may be entered in the box.
virtual u32 getMax() const =0
Returns maximum amount of characters, previously set by setMax();.
virtual void setAutoScroll(bool enable)=0
Enables or disables automatic scrolling with cursor position.
virtual void setDrawBorder(bool border)=0
Turns the border on or off.
virtual core::dimension2du getTextDimension()=0
Gets the size area of the text in the edit box.
An edit box (IGUIEditBox)
virtual IGUIFont * getActiveFont() const =0
Get the font which is used right now for drawing.
Class representing a 32 bit ARGB color.
Definition: SColor.h:201
Base class of all GUI elements.
Definition: IGUIElement.h:25
virtual bool isAutoScrollEnabled() const =0
Checks to see if automatic scrolling is enabled.
virtual void setOverrideColor(video::SColor color)=0
Sets another color for the text.
virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical)=0
Sets text justification mode.
virtual void setPasswordBox(bool passwordBox, wchar_t passwordChar=L' *')=0
Sets whether the edit box is a password box. Setting this to true will.
virtual void setMultiLine(bool enable)=0
Enables or disables newlines.
virtual void enableOverrideColor(bool enable)=0
Sets if the text should use the override color or the color in the gui skin.
Single line edit box for editing simple text.
Definition: IGUIEditBox.h:23
virtual IGUIFont * getOverrideFont() const =0
Gets the override font (if any)
virtual void setDrawBackground(bool draw)=0
Sets whether to draw the background.
virtual void setOverrideFont(IGUIFont *font=0)=0
Sets another skin independent font.
virtual bool isWordWrapEnabled() const =0
Checks if word wrap is enabled.
IGUIEditBox(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)
constructor
Definition: IGUIEditBox.h:28