Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members | Tutorials

# irr::gui::IGUIEditBox Class Reference

Single line edit box for editing simple text. More...

`#include <IGUIEditBox.h>`

Inheritance diagram for irr::gui::IGUIEditBox:

List of all members.

## Public Member Functions
virtual void | enableOverrideColor (bool enable)=0
| Sets if the text should use the overide color or the color in the gui skin.
virtual u32 | getMax () const =0
| Returns maximum amount of characters, previously set by setMax();.
virtual core::dimension2du | getTextDimension ()=0
| Gets the size area of the text in the edit box.
| IGUIEditBox (IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)
| constructor
virtual bool | isAutoScrollEnabled () const =0
| Checks to see if automatic scrolling is enabled.
virtual bool | isMultiLineEnabled () const =0
| Checks if multi line editing is enabled.
virtual bool | isPasswordBox () const =0
| Returns true if the edit box is currently a password box.
virtual bool | isWordWrapEnabled () const =0
| Checks if word wrap is enabled.
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 void | setMax (u32 max)=0
| Sets the maximum amount of characters which may be entered in the box.
virtual void | setMultiLine (bool enable)=0
| Enables or disables newlines.
virtual void | setOverrideColor (video::SColor color)=0
| Sets another color for the text.
virtual void | setOverrideFont (IGUIFont *font=0)=0
| Sets another skin independent font.
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 | setTextAlignment (EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical)=0
| Sets text justification mode.
virtual void | setWordWrap (bool enable)=0
| Enables or disables word wrap.

## Detailed Description

Single line edit box for editing simple text.

Definition at line 18 of file IGUIEditBox.h.

## Constructor & Destructor Documentation

irr::gui::IGUIEditBox::IGUIEditBox | ( | IGUIEnvironment * | environment,
|  | IGUIElement * | parent,
|  | s32 | id,
|  | core::rect< s32 > | rectangle |
| ) |  |  | `[inline]`

constructor

Definition at line 23 of file IGUIEditBox.h.

## Member Function Documentation

virtual void irr::gui::IGUIEditBox::enableOverrideColor | ( | bool | enable | ) | `[pure virtual]`

Sets if the text should use the overide color or the color in the gui skin.

Parameters:

  | enable,: | If set to true, the override color, which can be set with IGUIEditBox::setOverrideColor is used, otherwise the EGDC_BUTTON_TEXT color of the skin.

virtual u32 irr::gui::IGUIEditBox::getMax | ( |  | ) | const`[pure virtual]`

Returns maximum amount of characters, previously set by setMax();.

virtual core::dimension2du irr::gui::IGUIEditBox::getTextDimension | ( |  | ) | `[pure virtual]`

Gets the size area of the text in the edit box.

Returns:
  The size in pixels of the text

virtual bool irr::gui::IGUIEditBox::isAutoScrollEnabled | ( |  | ) | const`[pure virtual]`

Checks to see if automatic scrolling is enabled.

Returns:
  true if automatic scrolling is enabled, false if not

virtual bool irr::gui::IGUIEditBox::isMultiLineEnabled | ( |  | ) | const`[pure virtual]`

Checks if multi line editing is enabled.

Returns:
  true if mult-line is enabled, false otherwise

virtual bool irr::gui::IGUIEditBox::isPasswordBox | ( |  | ) | const`[pure virtual]`

Returns true if the edit box is currently a password box.

virtual bool irr::gui::IGUIEditBox::isWordWrapEnabled | ( |  | ) | const`[pure virtual]`

Checks if word wrap is enabled.

Returns:
  true if word wrap is enabled, false otherwise

virtual void irr::gui::IGUIEditBox::setAutoScroll | ( | bool | enable | ) | `[pure virtual]`

Enables or disables automatic scrolling with cursor position.

Parameters:

  | enable,: | If set to true, the text will move around with the cursor position

virtual void irr::gui::IGUIEditBox::setDrawBorder | ( | bool | border | ) | `[pure virtual]`

Turns the border on or off.

Parameters:

  | border,: | true if you want the border to be drawn, false if not

virtual void irr::gui::IGUIEditBox::setMax | ( | u32 | max | ) | `[pure virtual]`

Sets the maximum amount of characters which may be entered in the box.

Parameters:

  | max,: | Maximum amount of characters. If 0, the character amount is infinity.

virtual void irr::gui::IGUIEditBox::setMultiLine | ( | bool | enable | ) | `[pure virtual]`

Enables or disables newlines.

Parameters:

  | enable,: | If set to true, the EGET_EDITBOX_ENTER event will not be fired, instead a newline character will be inserted.

virtual void irr::gui::IGUIEditBox::setOverrideColor | ( | video::SColor | color | ) | `[pure virtual]`

Sets another color for the text.

If set, the edit box does not use the EGDC_BUTTON_TEXT color defined in the skin, but the set color instead. You don't need to call IGUIEditBox::enableOverrrideColor(true) after this, this is done by this function. If you set a color, and you want the text displayed with the color of the skin again, call IGUIEditBox::enableOverrideColor(false);

Parameters:

  | color,: | New color of the text.

virtual void irr::gui::IGUIEditBox::setOverrideFont | ( | IGUIFont * | font = `0` | ) | `[pure virtual]`

Sets another skin independent font.

If this is set to zero, the button uses the font of the skin.

Parameters:

  | font,: | New font to set.

virtual void irr::gui::IGUIEditBox::setPasswordBox | ( | bool | passwordBox,
|  | wchar_t | passwordChar = `L'*'` |
| ) |  |  | `[pure virtual]`

Sets whether the edit box is a password box. Setting this to true will.

disable MultiLine, WordWrap and the ability to copy with ctrl+c or ctrl+x

Parameters:

  | passwordBox,: | true to enable password, false to disable
  | passwordChar,: | the character that is displayed instead of letters

virtual void irr::gui::IGUIEditBox::setTextAlignment | ( | EGUI_ALIGNMENT | horizontal,
|  | EGUI_ALIGNMENT | vertical |
| ) |  |  | `[pure virtual]`

Sets text justification mode.

Parameters:

  | horizontal,: | EGUIA_UPPERLEFT for left justified (default), EGUIA_LOWEERRIGHT for right justified, or EGUIA_CENTER for centered text.
  | vertical,: | EGUIA_UPPERLEFT to align with top edge, EGUIA_LOWEERRIGHT for bottom edge, or EGUIA_CENTER for centered text (default).

virtual void irr::gui::IGUIEditBox::setWordWrap | ( | bool | enable | ) | `[pure virtual]`

Enables or disables word wrap.

Parameters:

  | enable,: | If set to true, words going over one line are broken to the next line.

The documentation for this class was generated from the following file:

- IGUIEditBox.h

| The Irrlicht Engine Documentation © 2003-2009 by Nikolaus Gebhardt. Generated on Sun Jan 10 09:24:10 2010 by Doxygen (1.5.6)