aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/include/IGUIEditBox.h
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/irrlicht-1.8/include/IGUIEditBox.h')
-rw-r--r--libraries/irrlicht-1.8/include/IGUIEditBox.h270
1 files changed, 135 insertions, 135 deletions
diff --git a/libraries/irrlicht-1.8/include/IGUIEditBox.h b/libraries/irrlicht-1.8/include/IGUIEditBox.h
index e7b637e..13a9501 100644
--- a/libraries/irrlicht-1.8/include/IGUIEditBox.h
+++ b/libraries/irrlicht-1.8/include/IGUIEditBox.h
@@ -1,135 +1,135 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt 1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#ifndef __I_GUI_EDIT_BOX_H_INCLUDED__ 5#ifndef __I_GUI_EDIT_BOX_H_INCLUDED__
6#define __I_GUI_EDIT_BOX_H_INCLUDED__ 6#define __I_GUI_EDIT_BOX_H_INCLUDED__
7 7
8#include "IGUIElement.h" 8#include "IGUIElement.h"
9#include "SColor.h" 9#include "SColor.h"
10 10
11namespace irr 11namespace irr
12{ 12{
13namespace gui 13namespace gui
14{ 14{
15 class IGUIFont; 15 class IGUIFont;
16 16
17 //! Single line edit box for editing simple text. 17 //! Single line edit box for editing simple text.
18 /** \par This element can create the following events of type EGUI_EVENT_TYPE: 18 /** \par This element can create the following events of type EGUI_EVENT_TYPE:
19 \li EGET_EDITBOX_ENTER 19 \li EGET_EDITBOX_ENTER
20 \li EGET_EDITBOX_CHANGED 20 \li EGET_EDITBOX_CHANGED
21 \li EGET_EDITBOX_MARKING_CHANGED 21 \li EGET_EDITBOX_MARKING_CHANGED
22 */ 22 */
23 class IGUIEditBox : public IGUIElement 23 class IGUIEditBox : public IGUIElement
24 { 24 {
25 public: 25 public:
26 26
27 //! constructor 27 //! constructor
28 IGUIEditBox(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) 28 IGUIEditBox(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
29 : IGUIElement(EGUIET_EDIT_BOX, environment, parent, id, rectangle) {} 29 : IGUIElement(EGUIET_EDIT_BOX, environment, parent, id, rectangle) {}
30 30
31 //! Sets another skin independent font. 31 //! Sets another skin independent font.
32 /** If this is set to zero, the button uses the font of the skin. 32 /** If this is set to zero, the button uses the font of the skin.
33 \param font: New font to set. */ 33 \param font: New font to set. */
34 virtual void setOverrideFont(IGUIFont* font=0) = 0; 34 virtual void setOverrideFont(IGUIFont* font=0) = 0;
35 35
36 //! Gets the override font (if any) 36 //! Gets the override font (if any)
37 /** \return The override font (may be 0) */ 37 /** \return The override font (may be 0) */
38 virtual IGUIFont* getOverrideFont() const = 0; 38 virtual IGUIFont* getOverrideFont() const = 0;
39 39
40 //! Get the font which is used right now for drawing 40 //! Get the font which is used right now for drawing
41 /** Currently this is the override font when one is set and the 41 /** Currently this is the override font when one is set and the
42 font of the active skin otherwise */ 42 font of the active skin otherwise */
43 virtual IGUIFont* getActiveFont() const = 0; 43 virtual IGUIFont* getActiveFont() const = 0;
44 44
45 //! Sets another color for the text. 45 //! Sets another color for the text.
46 /** If set, the edit box does not use the EGDC_BUTTON_TEXT color defined 46 /** If set, the edit box does not use the EGDC_BUTTON_TEXT color defined
47 in the skin, but the set color instead. You don't need to call 47 in the skin, but the set color instead. You don't need to call
48 IGUIEditBox::enableOverrrideColor(true) after this, this is done 48 IGUIEditBox::enableOverrrideColor(true) after this, this is done
49 by this function. 49 by this function.
50 If you set a color, and you want the text displayed with the color 50 If you set a color, and you want the text displayed with the color
51 of the skin again, call IGUIEditBox::enableOverrideColor(false); 51 of the skin again, call IGUIEditBox::enableOverrideColor(false);
52 \param color: New color of the text. */ 52 \param color: New color of the text. */
53 virtual void setOverrideColor(video::SColor color) = 0; 53 virtual void setOverrideColor(video::SColor color) = 0;
54 54
55 //! Gets the override color 55 //! Gets the override color
56 virtual video::SColor getOverrideColor() const = 0; 56 virtual video::SColor getOverrideColor() const = 0;
57 57
58 //! Sets if the text should use the override color or the color in the gui skin. 58 //! Sets if the text should use the override color or the color in the gui skin.
59 /** \param enable: If set to true, the override color, which can be set 59 /** \param enable: If set to true, the override color, which can be set
60 with IGUIEditBox::setOverrideColor is used, otherwise the 60 with IGUIEditBox::setOverrideColor is used, otherwise the
61 EGDC_BUTTON_TEXT color of the skin. */ 61 EGDC_BUTTON_TEXT color of the skin. */
62 virtual void enableOverrideColor(bool enable) = 0; 62 virtual void enableOverrideColor(bool enable) = 0;
63 63
64 //! Checks if an override color is enabled 64 //! Checks if an override color is enabled
65 /** \return true if the override color is enabled, false otherwise */ 65 /** \return true if the override color is enabled, false otherwise */
66 virtual bool isOverrideColorEnabled(void) const = 0; 66 virtual bool isOverrideColorEnabled(void) const = 0;
67 67
68 //! Sets whether to draw the background 68 //! Sets whether to draw the background
69 virtual void setDrawBackground(bool draw) = 0; 69 virtual void setDrawBackground(bool draw) = 0;
70 70
71 //! Turns the border on or off 71 //! Turns the border on or off
72 /** \param border: true if you want the border to be drawn, false if not */ 72 /** \param border: true if you want the border to be drawn, false if not */
73 virtual void setDrawBorder(bool border) = 0; 73 virtual void setDrawBorder(bool border) = 0;
74 74
75 //! Sets text justification mode 75 //! Sets text justification mode
76 /** \param horizontal: EGUIA_UPPERLEFT for left justified (default), 76 /** \param horizontal: EGUIA_UPPERLEFT for left justified (default),
77 EGUIA_LOWERRIGHT for right justified, or EGUIA_CENTER for centered text. 77 EGUIA_LOWERRIGHT for right justified, or EGUIA_CENTER for centered text.
78 \param vertical: EGUIA_UPPERLEFT to align with top edge, 78 \param vertical: EGUIA_UPPERLEFT to align with top edge,
79 EGUIA_LOWERRIGHT for bottom edge, or EGUIA_CENTER for centered text (default). */ 79 EGUIA_LOWERRIGHT for bottom edge, or EGUIA_CENTER for centered text (default). */
80 virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) = 0; 80 virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) = 0;
81 81
82 //! Enables or disables word wrap. 82 //! Enables or disables word wrap.
83 /** \param enable: If set to true, words going over one line are 83 /** \param enable: If set to true, words going over one line are
84 broken to the next line. */ 84 broken to the next line. */
85 virtual void setWordWrap(bool enable) = 0; 85 virtual void setWordWrap(bool enable) = 0;
86 86
87 //! Checks if word wrap is enabled 87 //! Checks if word wrap is enabled
88 /** \return true if word wrap is enabled, false otherwise */ 88 /** \return true if word wrap is enabled, false otherwise */
89 virtual bool isWordWrapEnabled() const = 0; 89 virtual bool isWordWrapEnabled() const = 0;
90 90
91 //! Enables or disables newlines. 91 //! Enables or disables newlines.
92 /** \param enable: If set to true, the EGET_EDITBOX_ENTER event will not be fired, 92 /** \param enable: If set to true, the EGET_EDITBOX_ENTER event will not be fired,
93 instead a newline character will be inserted. */ 93 instead a newline character will be inserted. */
94 virtual void setMultiLine(bool enable) = 0; 94 virtual void setMultiLine(bool enable) = 0;
95 95
96 //! Checks if multi line editing is enabled 96 //! Checks if multi line editing is enabled
97 /** \return true if multi-line is enabled, false otherwise */ 97 /** \return true if multi-line is enabled, false otherwise */
98 virtual bool isMultiLineEnabled() const = 0; 98 virtual bool isMultiLineEnabled() const = 0;
99 99
100 //! Enables or disables automatic scrolling with cursor position 100 //! Enables or disables automatic scrolling with cursor position
101 /** \param enable: If set to true, the text will move around with the cursor position */ 101 /** \param enable: If set to true, the text will move around with the cursor position */
102 virtual void setAutoScroll(bool enable) = 0; 102 virtual void setAutoScroll(bool enable) = 0;
103 103
104 //! Checks to see if automatic scrolling is enabled 104 //! Checks to see if automatic scrolling is enabled
105 /** \return true if automatic scrolling is enabled, false if not */ 105 /** \return true if automatic scrolling is enabled, false if not */
106 virtual bool isAutoScrollEnabled() const = 0; 106 virtual bool isAutoScrollEnabled() const = 0;
107 107
108 //! Sets whether the edit box is a password box. Setting this to true will 108 //! Sets whether the edit box is a password box. Setting this to true will
109 /** disable MultiLine, WordWrap and the ability to copy with ctrl+c or ctrl+x 109 /** disable MultiLine, WordWrap and the ability to copy with ctrl+c or ctrl+x
110 \param passwordBox: true to enable password, false to disable 110 \param passwordBox: true to enable password, false to disable
111 \param passwordChar: the character that is displayed instead of letters */ 111 \param passwordChar: the character that is displayed instead of letters */
112 virtual void setPasswordBox(bool passwordBox, wchar_t passwordChar = L'*') = 0; 112 virtual void setPasswordBox(bool passwordBox, wchar_t passwordChar = L'*') = 0;
113 113
114 //! Returns true if the edit box is currently a password box. 114 //! Returns true if the edit box is currently a password box.
115 virtual bool isPasswordBox() const = 0; 115 virtual bool isPasswordBox() const = 0;
116 116
117 //! Gets the size area of the text in the edit box 117 //! Gets the size area of the text in the edit box
118 /** \return The size in pixels of the text */ 118 /** \return The size in pixels of the text */
119 virtual core::dimension2du getTextDimension() = 0; 119 virtual core::dimension2du getTextDimension() = 0;
120 120
121 //! Sets the maximum amount of characters which may be entered in the box. 121 //! Sets the maximum amount of characters which may be entered in the box.
122 /** \param max: Maximum amount of characters. If 0, the character amount is 122 /** \param max: Maximum amount of characters. If 0, the character amount is
123 infinity. */ 123 infinity. */
124 virtual void setMax(u32 max) = 0; 124 virtual void setMax(u32 max) = 0;
125 125
126 //! Returns maximum amount of characters, previously set by setMax(); 126 //! Returns maximum amount of characters, previously set by setMax();
127 virtual u32 getMax() const = 0; 127 virtual u32 getMax() const = 0;
128 }; 128 };
129 129
130 130
131} // end namespace gui 131} // end namespace gui
132} // end namespace irr 132} // end namespace irr
133 133
134#endif 134#endif
135 135