Irrlicht 3D Engine
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


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: