CGUIEditBox Class Reference

#include <CGUIEditBox.h>

Inheritance diagram for CGUIEditBox:

IGUIEditBox IGUIElement IrrUnknown IEventReceiver

Public Member Functions

Protected Member Functions

Protected Attributes


Constructor & Destructor Documentation

CGUIEditBox ( const wchar_t *  text,
bool  border,
IGUIEnvironment environment,
IGUIElement parent,
s32  id,
const core::rect< s32 > &  rectangle,
IOSOperator op 
)

~CGUIEditBox (  ) 


Member Function Documentation

virtual void addChild ( IGUIElement child  )  [inline, virtual, inherited]

virtual void animateMoveToPoint ( const core::position2d< s32 > &  destination,
const u32 timeToMove 
) [inline, virtual, inherited]

Reimplemented in CGUIImage, CGUIStaticText, and IGUIImage.

virtual bool bringToFront ( IGUIElement element  )  [inline, virtual, inherited]

Returns:
Returns true if successful, false if not.

void draw (  )  [virtual]

Reimplemented from IGUIElement.

bool drop (  )  [inline, inherited]

Drops the object. Decrements the reference counter by one. Returns true, if the object was deleted. The IrrUnknown class provides a basic reference counting mechanism with its methods grab() and drop(). Most objects of the Irrlicht Engine are derived from IrrUnknown, and so they are reference counted.

When you create an object in the Irrlicht engine, calling a method which starts with 'create', an object is created, and you get a pointer to the new object. If you no longer need the object, you have to call drop(). This will destroy the object, if grab() was not called in another part of you program, because this part still needs the object. Note, that you only need to call drop() to the object, if you created it, and the method had a 'create' in it.

A simple example:

If you want to create a texture, you may want to call an imaginable method IDriver::createTexture. You call ITexture* texture = driver->createTexture(dimension2d<s32>(128, 128)); If you no longer need the texture, call texture->drop(). If you want to load a texture, you may want to call imaginable method IDriver::loadTexture. You do this like ITexture* texture = driver->loadTexture("example.jpg"); You will not have to drop the pointer to the loaded texture, because the name of the method does not start with 'create'. The texture is stored somewhere by the driver.

void enableOverrideColor ( const bool enable  )  [virtual]

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

Implements IGUIEditBox.

core::rect<s32> getAbsolutePosition (  )  [inline, inherited]

virtual const core::list<IGUIElement*>& getChildren (  )  const [inline, virtual, inherited]

s32 getCursorPos ( s32  x  )  [protected]

const c8* getDebugName (  )  const [inline, inherited]

Returns the debug name of the object. The Debugname may only be set and changed by the object itself. This method should only be used in Debug mode.

Returns:
Returns a string, previously set by setDebugName();

* virtual IGUIElement* getElementFromId ( s32  id,
bool  searchchildren = false 
) const [inline, virtual, inherited]

Finds the first element with the given id.

Parameters:
id,: Id to search for.
searchchildren,: Set this to true, if you want to search this elements children.
Returns:
Returns the first element with the given id. If no element with this id was found, 0 is returned.

IGUIElement* getElementFromPoint ( const core::position2d< s32 > &  point  )  [inline, inherited]

virtual s32 getID (  )  [inline, virtual, inherited]

s32 getMax (  )  [virtual]

Implements IGUIEditBox.

IGUIElement* getParent (  )  [inline, inherited]

core::rect<s32> getRelativePosition (  )  [inline, inherited]

virtual const wchar_t* getText (  )  [inline, virtual, inherited]

virtual core::stringw& getToolTipText (  )  [inline, virtual, inherited]

EGUI_ELEMENT_TYPE getType (  )  [inline, inherited]

This is needed for the .NET wrapper but will be used later for serializing and deserializing. If you wrote your own GUIElements, you need to set the type for your element as first parameter in the constructor of IGUIElement. For own (=unknown) elements, simply use EGUIET_ELEMENT as type

void grab (  )  [inline, inherited]

Grabs the object. Increments the reference counter by one. Someone who calls grab() to an object, should later also call drop() to it. If an object never gets as much drop() as grab() calls, it will never be destroyed. The IrrUnknown class provides a basic reference counting mechanism with its methods grab() and drop(). Most objects of the Irrlicht Engine are derived from IrrUnknown, and so they are reference counted.

When you create an object in the Irrlicht engine, calling a method which starts with 'create', an object is created, and you get a pointer to the new object. If you no longer need the object, you have to call drop(). This will destroy the object, if grab() was not called in another part of you program, because this part still needs the object. Note, that you only need to call drop() to the object, if you created it, and the method had a 'create' in it.

A simple example:

If you want to create a texture, you may want to call an imaginable method IDriver::createTexture. You call ITexture* texture = driver->createTexture(dimension2d<s32>(128, 128)); If you no longer need the texture, call texture->drop(). If you want to load a texture, you may want to call imaginable method IDriver::loadTexture. You do this like ITexture* texture = driver->loadTexture("example.jpg"); You will not have to drop the pointer to the loaded texture, because the name of the method does not start with 'create'. The texture is stored somewhere by the driver.

virtual bool isEnabled (  )  [inline, virtual, inherited]

virtual bool isVisible (  )  [inline, virtual, inherited]

virtual void move ( core::position2d< s32 absoluteMovement  )  [inline, virtual, inherited]

bool OnEvent ( const SEvent event  )  [virtual]

Reimplemented from IGUIElement.

virtual void OnPostRender ( u32  timeMs  )  [inline, virtual, inherited]

Reimplemented in CGUIEnvironment.

virtual void overrideDefaultClipping ( const core::rect< s32 > &  clipRect  )  [inline, virtual, inherited]

bool processKey ( const SEvent event  )  [protected]

bool processMouse ( const SEvent event  )  [protected]

virtual void remove (  )  [inline, virtual, inherited]

virtual void removeChild ( IGUIElement child  )  [inline, virtual, inherited]

Reimplemented in CGUIModalScreen, and CGUITabControl.

void setDebugName ( const c8 newName  )  [inline, protected, inherited]

Sets the debug name of the object. The Debugname may only be set and changed by the object itself. This method should only be used in Debug mode.

Parameters:
newName,: New debug name to set.

virtual void setEnabled ( bool  enabled  )  [inline, virtual, inherited]

virtual void setID ( s32  id  )  [inline, virtual, inherited]

void setMax ( s32  max  )  [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.

Implements IGUIEditBox.

void setOverrideColor ( const video::SColor color  )  [virtual]

Implements IGUIEditBox.

void setOverrideFont ( IGUIFont font = 0  )  [virtual]

Implements IGUIEditBox.

void setRelativePosition ( const core::rect< s32 > &  r  )  [inline, inherited]

void setText ( const wchar_t *  text  )  [virtual]

Reimplemented from IGUIElement.

virtual void setToolTipText ( const wchar_t *  text  )  [inline, virtual, inherited]

virtual void setVisible ( bool  visible  )  [inline, virtual, inherited]

Reimplemented in CGUIContextMenu.

virtual void updateAbsolutePosition (  )  [inline, virtual, inherited]

Reimplemented in CGUIMenu, CGUIModalScreen, and CGUIToolBar.


Field Documentation

core::rect<s32> AbsoluteClippingRect [protected, inherited]

core::rect<s32> AbsoluteRect [protected, inherited]

u32 BlinkStartTime [protected]

bool Border [protected]

core::list<IGUIElement*> Children [protected, inherited]

s32 CursorPos [protected]

IGUIEnvironment* Environment [protected, inherited]

s32 ID [protected, inherited]

bool IsEnabled [protected, inherited]

bool IsVisible [protected, inherited]

s32 MarkBegin [protected]

s32 MarkEnd [protected]

s32 Max [protected]

bool MouseMarking [protected]

IOSOperator* Operator [protected]

video::SColor OverrideColor [protected]

bool OverrideColorEnabled [protected]

bool OverrideDefaultClippingRectBehavior [protected, inherited]

gui::IGUIFont* OverrideFont [protected]

IGUIElement* Parent [protected, inherited]

core::rect<s32> RelativeRect [protected, inherited]

s32 ScrollPos [protected]

core::stringw Text [protected, inherited]

core::stringw ToolTipText [protected, inherited]

EGUI_ELEMENT_TYPE Type [protected, inherited]

bool WordWrap [protected]


Generated on Fri Apr 27 14:47:03 2007 for IrrSpintz by  doxygen 1.5.1-p1