| Irrlicht 3D Engine |

Public Member Functions
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

- IGUIEditBox (IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)
    constructor
- virtual void enableOverrideColor (bool enable)=0
    Sets if the text should use the override color or the color in the gui skin.
- virtual IGUIFont * getActiveFont () const =0
    Get the font which is used right now for drawing.
- virtual u32 getMax () const =0
    Returns maximum amount of characters, previously set by setMax();.
- virtual video::SColor getOverrideColor () const =0
    Gets the override color.
- virtual IGUIFont * getOverrideFont () const =0
    Gets the override font (if any)
- virtual core::dimension2du getTextDimension ()=0
    Gets the size area of the text in the edit box.
- 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 isOverrideColorEnabled (void) const =0
    Checks if an override color 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 setDrawBackground (bool draw)=0
    Sets whether to draw the background.
- 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.

This element can create the following events of type EGUI_EVENT_TYPE:
  - EGET_EDITBOX_ENTER
  - EGET_EDITBOX_CHANGED
  - EGET_EDITBOX_MARKING_CHANGED

Definition at line 23 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 28 of file IGUIEditBox.h.

## Member Function Documentation

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

Sets if the text should use the override 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 IGUIFont* irr::gui::IGUIEditBox::getActiveFont | ( |  | ) | const`[pure virtual]`

Get the font which is used right now for drawing.

Currently this is the override font when one is set and the font of the active skin otherwise

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

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

virtual video::SColor irr::gui::IGUIEditBox::getOverrideColor | ( |  | ) | const`[pure virtual]`

Gets the override color.

virtual IGUIFont* irr::gui::IGUIEditBox::getOverrideFont | ( |  | ) | const`[pure virtual]`

Gets the override font (if any)

Returns:
  The override font (may be 0)

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 multi-line is enabled, false otherwise

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

Checks if an override color is enabled.

Returns:
  true if the override color 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::setDrawBackground | ( | bool | draw | ) | `[pure virtual]`

Sets whether to draw the background.

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_LOWERRIGHT for right justified, or EGUIA_CENTER for centered text.
  vertical,: | EGUIA_UPPERLEFT to align with top edge, EGUIA_LOWERRIGHT 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