MyGUI  3.0.1
Public Types | Public Member Functions | Static Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes
MyGUI::Edit Class Reference

#include <MyGUI_Edit.h>

+ Inheritance diagram for MyGUI::Edit:

Public Types

typedef RTTIBase Base
typedef Edit RTTIBase
- Public Types inherited from MyGUI::StaticText
typedef RTTIBase Base
typedef StaticText RTTIBase
- Public Types inherited from MyGUI::Widget
typedef Widget RTTIBase
- Public Types inherited from MyGUI::IObject
typedef IObject RTTIBase

Public Member Functions

virtual const std::string & getTypeName () const
virtual bool isType (const std::type_info &_type) const
template<typename Type >
bool isType () const
 Edit ()
void setTextIntervalColour (size_t _start, size_t _count, const Colour &_colour)
size_t getTextSelectionStart ()
size_t getTextSelectionEnd ()
size_t getTextSelectionLength ()
UString getTextInterval (size_t _start, size_t _count)
void setTextSelection (size_t _start, size_t _end)
void deleteTextSelection ()
UString getTextSelection ()
bool isTextSelection ()
void setTextSelectionColour (const Colour &_value)
void setTextCursor (size_t _index)
size_t getTextCursor ()
virtual void setCaption (const UString &_value)
virtual const UStringgetCaption ()
void setOnlyText (const UString &_value)
UString getOnlyText ()
size_t getTextLength () const
void setOverflowToTheLeft (bool _value)
 Sets if surplus characters should push characters off the left side rather than ignored.
bool getOverflowToTheLeft ()
 Returns true if surplus characters will be pushed off the left rather than ignored.
void setMaxTextLength (size_t _value)
 Sets the max amount of text allowed in the edit field.
size_t getMaxTextLength ()
 Gets the max amount of text allowed in the edit field.
void insertText (const UString &_text, size_t _index=ITEM_NONE)
void addText (const UString &_text)
void eraseText (size_t _start, size_t _count=1)
void setEditReadOnly (bool _value)
bool getEditReadOnly ()
void setEditPassword (bool _value)
bool getEditPassword ()
void setEditMultiLine (bool _value)
bool getEditMultiLine ()
void setEditStatic (bool _value)
bool getEditStatic ()
void setPasswordChar (Char _value)
void setPasswordChar (const UString &_char)
Char getPasswordChar ()
void setEditWordWrap (bool _value)
bool getEditWordWrap ()
void setTabPrinting (bool _value)
bool getTabPrinting ()
bool getInvertSelected ()
void setInvertSelected (bool _value)
virtual void setPosition (const IntPoint &_value)
 
virtual void setSize (const IntSize &_value)
 
virtual void setCoord (const IntCoord &_value)
 
void setPosition (int _left, int _top)
 
void setSize (int _width, int _height)
 
void setCoord (int _left, int _top, int _width, int _height)
 
void setVisibleVScroll (bool _value)
bool isVisibleVScroll ()
size_t getVScrollRange ()
size_t getVScrollPosition ()
void setVScrollPosition (size_t _index)
void setVisibleHScroll (bool _value)
bool isVisibleHScroll ()
size_t getHScrollRange ()
size_t getHScrollPosition ()
void setHScrollPosition (size_t _index)
virtual void setFontName (const std::string &_value)
 
virtual void setFontHeight (int _value)
 
virtual void setTextAlign (Align _value)
 
virtual void setProperty (const std::string &_key, const std::string &_value)
 
virtual void _initialise (WidgetStyle _style, const IntCoord &_coord, Align _align, ResourceSkin *_info, Widget *_parent, ICroppedRectangle *_croppedParent, IWidgetCreator *_creator, const std::string &_name)
void showVScroll (bool _visible)
bool isShowVScroll ()
void showHScroll (bool _visible)
bool isShowHScroll ()
void setPosition (const IntCoord &_coord)
void setPosition (int _left, int _top, int _width, int _height)
virtual void setTextColour (const Colour &_colour)
void setTextColour (size_t _start, size_t _count, const Colour &_colour)
void getTextSelect (size_t &_start, size_t &_end)
UString getText (size_t _start, size_t _count)
void setTextSelect (size_t _start, size_t _end)
void deleteTextSelect ()
UString getSelectedText ()
bool isTextSelect ()
void setTextSelectColour (const Colour &_colour)
- Public Member Functions inherited from MyGUI::StaticText
 StaticText ()
IntCoord getTextRegion ()
IntSize getTextSize ()
const std::string & getFontName ()
int getFontHeight ()
Align getTextAlign ()
const ColourgetTextColour ()
- Public Member Functions inherited from MyGUI::Widget
template<typename Type >
Type * castType (bool _throw=true)
template<typename Type >
const Type * castType (bool _throw=true) const
 Widget ()
WidgetcreateWidgetT (const std::string &_type, const std::string &_skin, const IntCoord &_coord, Align _align, const std::string &_name="")
WidgetcreateWidgetT (const std::string &_type, const std::string &_skin, int _left, int _top, int _width, int _height, Align _align, const std::string &_name="")
WidgetcreateWidgetRealT (const std::string &_type, const std::string &_skin, const FloatCoord &_coord, Align _align, const std::string &_name="")
WidgetcreateWidgetRealT (const std::string &_type, const std::string &_skin, float _left, float _top, float _width, float _height, Align _align, const std::string &_name="")
template<typename T >
T * createWidget (const std::string &_skin, const IntCoord &_coord, Align _align, const std::string &_name="")
template<typename T >
T * createWidget (const std::string &_skin, int _left, int _top, int _width, int _height, Align _align, const std::string &_name="")
template<typename T >
T * createWidgetReal (const std::string &_skin, const FloatCoord &_coord, Align _align, const std::string &_name="")
template<typename T >
T * createWidgetReal (const std::string &_skin, float _left, float _top, float _width, float _height, Align _align, const std::string &_name="")
WidgetcreateWidgetT (WidgetStyle _style, const std::string &_type, const std::string &_skin, const IntCoord &_coord, Align _align, const std::string &_layer="", const std::string &_name="")
template<typename T >
T * createWidget (WidgetStyle _style, const std::string &_skin, const IntCoord &_coord, Align _align, const std::string &_layer="", const std::string &_name="")
const std::string & getName () const
 Get name of widget.
void setRealPosition (const FloatPoint &_value)
void setRealSize (const FloatSize &_value)
void setRealCoord (const FloatCoord &_value)
void setRealPosition (float _left, float _top)
void setRealSize (float _width, float _height)
void setRealCoord (float _left, float _top, float _width, float _height)
virtual void setVisible (bool _value)
virtual void setAlign (Align _value)
void setAlpha (float _value)
float getAlpha ()
void setInheritsAlpha (bool _value)
bool isInheritsAlpha ()
bool setState (const std::string &_value)
void setColour (const Colour &_value)
bool isRootWidget ()
WidgetgetParent ()
EnumeratorWidgetPtr getEnumerator ()
size_t getChildCount ()
WidgetgetChildAt (size_t _index)
WidgetfindWidget (const std::string &_name)
void setNeedKeyFocus (bool _value)
bool isNeedKeyFocus ()
void setNeedMouseFocus (bool _value)
bool isNeedMouseFocus ()
void setInheritsPick (bool _value)
bool isInheritsPick ()
void setMaskPick (const std::string &_filename)
virtual void setEnabled (bool _value)
void setEnabledSilent (bool _value)
bool isEnabled ()
void setPointer (const std::string &_value)
const std::string & getPointer ()
const std::string & getLayerName ()
IntCoord getClientCoord ()
WidgetgetClientWidget ()
ISubWidgetTextgetSubWidgetText ()
ISubWidgetRectgetSubWidgetMain ()
void setNeedToolTip (bool _value)
bool getNeedToolTip ()
void setEnableToolTip (bool _value)
bool getEnableToolTip ()
void detachFromWidget (const std::string &_layer="")
void attachToWidget (Widget *_parent, WidgetStyle _style=WidgetStyle::Child, const std::string &_layer="")
void changeWidgetSkin (const std::string &_skinname)
void setWidgetStyle (WidgetStyle _style, const std::string &_layer="")
WidgetStyle getWidgetStyle ()
virtual void _getContainer (Widget *&_container, size_t &_index)
void _forcePeek (Widget *_widget)
void _setUVSet (const FloatRect &_rect)
virtual void _setTextureName (const std::string &_texture)
virtual const std::string & _getTextureName ()
IWidgetCreator_getIWidgetCreator ()
IntCoord _getTextRegion ()
IntSize _getTextSize ()
void _setFontName (const std::string &_font)
const std::string & _getFontName ()
void _setFontHeight (int _height)
int _getFontHeight ()
void _setTextAlign (Align _align)
Align _getTextAlign ()
void _setTextColour (const Colour &_colour)
const Colour_getTextColour ()
void setCaptionWithNewLine (const std::string &_value)
void enableToolTip (bool _enable)
void setInheritsPeek (bool _inherits)
bool isInheritsPeek ()
void setMaskPeek (const std::string &_filename)
IntCoord getTextCoord ()
- Public Member Functions inherited from MyGUI::IObject
virtual ~IObject ()
- Public Member Functions inherited from MyGUI::ICroppedRectangle
 ICroppedRectangle ()
virtual ~ICroppedRectangle ()
ICroppedRectanglegetCroppedParent ()
const IntCoordgetCoord () const
IntPoint getPosition () const
IntSize getSize () const
bool isVisible () const
const IntPointgetAbsolutePosition () const
IntRect getAbsoluteRect () const
IntCoord getAbsoluteCoord () const
int getAbsoluteLeft () const
int getAbsoluteTop () const
Align getAlign () const
int getLeft () const
int getRight () const
int getTop () const
int getBottom () const
int getWidth () const
int getHeight () const
bool _isMargin () const
int _getViewLeft () const
int _getViewRight () const
int _getViewTop () const
int _getViewBottom () const
int _getViewWidth () const
int _getViewHeight () const
virtual void _correctView ()
void _setCroppedParent (ICroppedRectangle *_parent)
const IntRect_getMargin () const
int _getMarginLeft () const
int _getMarginRight () const
int _getMarginTop () const
int _getMarginBottom () const
void show ()
void hide ()
bool isShow ()
- Public Member Functions inherited from MyGUI::LayerItem
 LayerItem ()
virtual ~LayerItem ()
ILayergetLayer ()
virtual void attachItemToNode (ILayer *_layer, ILayerNode *_node)
virtual void detachFromLayer ()
virtual void upLayerItem ()
void setRenderItemTexture (ITexture *_texture)
void addChildItem (LayerItem *_item)
void removeChildItem (LayerItem *_item)
void addChildNode (LayerItem *_item)
void removeChildNode (LayerItem *_item)
void addRenderItem (ISubWidget *_item)
void removeAllRenderItems ()
void saveLayerItem ()
void restoreLayerItem ()
- Public Member Functions inherited from MyGUI::ILayerItem
virtual ~ILayerItem ()
- Public Member Functions inherited from MyGUI::UserData
 UserData ()
virtual ~UserData ()
void setUserString (const std::string &_key, const std::string &_value)
const std::string & getUserString (const std::string &_key)
bool clearUserString (const std::string &_key)
bool isUserString (const std::string &_key)
void clearUserStrings ()
void setUserData (Any _data)
template<typename ValueType >
ValueType * getUserData (bool _throw=true)
void _setInternalData (Any _data)
template<typename ValueType >
ValueType * _getInternalData (bool _throw=true)
void * getUserData ()
- Public Member Functions inherited from MyGUI::WidgetEvent
virtual ~WidgetEvent ()
- Public Member Functions inherited from MyGUI::IWidgetCreator
virtual ~IWidgetCreator ()
virtual void _linkChildWidget (Widget *_widget)
virtual void _unlinkChildWidget (Widget *_widget)

Static Public Member Functions

static const std::string & getClassTypeName ()

Data Fields

EventPair
< EventHandle_WidgetVoid,
EventHandle_EditPtr
eventEditSelectAccept
EventPair
< EventHandle_WidgetVoid,
EventHandle_EditPtr
eventEditTextChange

Protected Member Functions

virtual ~Edit ()
virtual void onMouseDrag (int _left, int _top)
virtual void onKeyLostFocus (Widget *_new)
virtual void onKeySetFocus (Widget *_old)
virtual void onKeyButtonPressed (KeyCode _key, Char _char)
void notifyMouseSetFocus (Widget *_sender, Widget *_old)
void notifyMouseLostFocus (Widget *_sender, Widget *_new)
void notifyMousePressed (Widget *_sender, int _left, int _top, MouseButton _id)
void notifyMouseReleased (Widget *_sender, int _left, int _top, MouseButton _id)
void notifyMouseDrag (Widget *_sender, int _left, int _top)
void notifyMouseButtonDoubleClick (Widget *_sender)
void notifyScrollChangePosition (VScroll *_sender, size_t _position)
void notifyMouseWheel (Widget *_sender, int _rel)
void updateView ()
void updateViewWithCursor ()
void baseChangeWidgetSkin (ResourceSkin *_info)
void eraseView ()
- Protected Member Functions inherited from MyGUI::StaticText
virtual ~StaticText ()
- Protected Member Functions inherited from MyGUI::Widget
 Widget (WidgetStyle _style, const IntCoord &_coord, Align _align, ResourceSkin *_info, Widget *_parent, ICroppedRectangle *_croppedParent, IWidgetCreator *_creator, const std::string &_name)
virtual ~Widget ()
void _updateView ()
void _setAlign (const IntSize &_oldsize, bool _update)
void _setAlign (const IntCoord &_oldcoord, bool _update)
virtual WidgetbaseCreateWidget (WidgetStyle _style, const std::string &_type, const std::string &_skin, const IntCoord &_coord, Align _align, const std::string &_layer, const std::string &_name)
virtual void _destroyChildWidget (Widget *_widget)
virtual void _destroyAllChildWidget ()
virtual size_t _getContainerIndex (const IntPoint &_point)
virtual void _resetContainer (bool _update)
virtual void baseUpdateEnable ()
virtual ILayerItemgetLayerItemByPoint (int _left, int _top)
virtual const IntCoordgetLayerItemCoord ()
- Protected Member Functions inherited from MyGUI::ICroppedRectangle
bool _checkPoint (int _left, int _top)
bool _checkMargin ()
bool _checkOutside ()
- Protected Member Functions inherited from MyGUI::LayerItem
void attachToLayerItemNode (ILayerNode *_node, bool _deep)
void detachFromLayerItemNode (bool _deep)
- Protected Member Functions inherited from MyGUI::WidgetEvent
 WidgetEvent ()
virtual void onMouseLostFocus (Widget *_new)
virtual void onMouseSetFocus (Widget *_old)
virtual void onMouseMove (int _left, int _top)
virtual void onMouseWheel (int _rel)
virtual void onMouseButtonPressed (int _left, int _top, MouseButton _id)
virtual void onMouseButtonReleased (int _left, int _top, MouseButton _id)
virtual void onMouseButtonClick ()
virtual void onMouseButtonDoubleClick ()
virtual void onKeyButtonReleased (KeyCode _key)
virtual void onMouseChangeRootFocus (bool _focus)
virtual void onKeyChangeRootFocus (bool _focus)
- Protected Member Functions inherited from MyGUI::IWidgetCreator
void _deleteWidget (Widget *_widget)
- Protected Member Functions inherited from MyGUI::ScrollViewBase
 ScrollViewBase ()
virtual ~ScrollViewBase ()
void updateScrollSize ()
void updateScrollPosition ()
virtual IntSize getContentSize ()
virtual IntPoint getContentPosition ()
virtual void setContentPosition (const IntPoint &_value)
virtual IntSize getViewSize () const
virtual size_t getHScrollPage ()
virtual size_t getVScrollPage ()
virtual Align getContentAlign ()
virtual void eraseContent ()

Protected Attributes

bool mIsPressed
bool mIsFocus
bool mCursorActive
float mCursorTimer
float mActionMouseTimer
size_t mCursorPosition
size_t mTextLength
size_t mStartSelect
size_t mEndSelect
DequeUndoRedoInfo mVectorUndoChangeInfo
DequeUndoRedoInfo mVectorRedoChangeInfo
bool mMouseLeftPressed
bool mModeReadOnly
bool mModePassword
bool mModeMultiline
bool mModeStatic
bool mModeWordWrap
bool mTabPrinting
UString mPasswordText
std::string mOriginalPointer
Char mCharPassword
bool mOverflowToTheLeft
size_t mMaxTextLength
- Protected Attributes inherited from MyGUI::ScrollViewBase
VScrollmVScroll
HScrollmHScroll
WidgetmClient
bool mVisibleHScroll
bool mVisibleVScroll
size_t mVRange
size_t mHRange
bool mChangeContentByResize

Detailed Description

Definition at line 38 of file MyGUI_Edit.h.

Member Typedef Documentation

Definition at line 42 of file MyGUI_Edit.h.

Definition at line 42 of file MyGUI_Edit.h.

Constructor & Destructor Documentation

MyGUI::Edit::Edit ( )

Definition at line 49 of file MyGUI_Edit.cpp.

MyGUI::Edit::~Edit ( )
protectedvirtual

Definition at line 80 of file MyGUI_Edit.cpp.

Member Function Documentation

void MyGUI::Edit::_initialise ( WidgetStyle  _style,
const IntCoord _coord,
Align  _align,
ResourceSkin _info,
Widget _parent,
ICroppedRectangle _croppedParent,
IWidgetCreator _creator,
const std::string &  _name 
)
virtual

Reimplemented from MyGUI::StaticText.

Reimplemented in MyGUI::ComboBox.

Definition at line 73 of file MyGUI_Edit.cpp.

void MyGUI::Edit::addText ( const UString _text)

Add text

Definition at line 1784 of file MyGUI_Edit.cpp.

void MyGUI::Edit::baseChangeWidgetSkin ( ResourceSkin _info)
protectedvirtual

Reimplemented from MyGUI::StaticText.

Reimplemented in MyGUI::ComboBox.

Definition at line 85 of file MyGUI_Edit.cpp.

void MyGUI::Edit::deleteTextSelect ( )
inline
Deprecated:
"use : void Edit::deleteTextSelection()"

Definition at line 290 of file MyGUI_Edit.h.

void MyGUI::Edit::deleteTextSelection ( )

Delete selected text

Definition at line 1754 of file MyGUI_Edit.cpp.

void MyGUI::Edit::eraseText ( size_t  _start,
size_t  _count = 1 
)

Erase _count characters from _start position

Definition at line 1789 of file MyGUI_Edit.cpp.

void MyGUI::Edit::eraseView ( )
protected

Definition at line 1458 of file MyGUI_Edit.cpp.

const UString & MyGUI::Edit::getCaption ( )
virtual

Get edit text with tags

Reimplemented from MyGUI::Widget.

Definition at line 1489 of file MyGUI_Edit.cpp.

static const std::string& MyGUI::Edit::getClassTypeName ( )
inlinestatic

Reimplemented from MyGUI::StaticText.

Reimplemented in MyGUI::ComboBox.

Definition at line 42 of file MyGUI_Edit.h.

bool MyGUI::Edit::getEditMultiLine ( )
inline

Get edit multiline mode flag

Definition at line 142 of file MyGUI_Edit.h.

bool MyGUI::Edit::getEditPassword ( )
inline

Get edit password mode flag

Definition at line 133 of file MyGUI_Edit.h.

bool MyGUI::Edit::getEditReadOnly ( )
inline

Get edit read only mode flag

Definition at line 125 of file MyGUI_Edit.h.

bool MyGUI::Edit::getEditStatic ( )
inline

Get edit static mode flag

Definition at line 150 of file MyGUI_Edit.h.

bool MyGUI::Edit::getEditWordWrap ( )
inline

Get edit word wrap mode flag

Definition at line 166 of file MyGUI_Edit.h.

size_t MyGUI::Edit::getHScrollPosition ( )

Get current position of horizontal scroll (or 0 if no scroll)

Definition at line 1914 of file MyGUI_Edit.cpp.

size_t MyGUI::Edit::getHScrollRange ( )

Get range of horizontal scroll (or 0 if no scroll). Range measured in pixels (full text width minus Edit width). For example if Edit is 200 pixels width and the longest line is 600 pixels width, then return value is 400 ( = 600 - 200 ).

Definition at line 1909 of file MyGUI_Edit.cpp.

bool MyGUI::Edit::getInvertSelected ( )

Get invert selected text color property

Definition at line 1936 of file MyGUI_Edit.cpp.

size_t MyGUI::Edit::getMaxTextLength ( )
inline

Gets the max amount of text allowed in the edit field.

Definition at line 110 of file MyGUI_Edit.h.

UString MyGUI::Edit::getOnlyText ( )

Get edit text without tags

Definition at line 1774 of file MyGUI_Edit.cpp.

bool MyGUI::Edit::getOverflowToTheLeft ( )
inline

Returns true if surplus characters will be pushed off the left rather than ignored.

Definition at line 105 of file MyGUI_Edit.h.

Char MyGUI::Edit::getPasswordChar ( )
inline

Get edit password character

Definition at line 157 of file MyGUI_Edit.h.

UString MyGUI::Edit::getSelectedText ( )
inline
Deprecated:
"use : UString Edit::getTextSelection()"

Definition at line 293 of file MyGUI_Edit.h.

bool MyGUI::Edit::getTabPrinting ( )
inline

Get edit tab printing wrap mode flag

Definition at line 175 of file MyGUI_Edit.h.

UString MyGUI::Edit::getText ( size_t  _start,
size_t  _count 
)
inline
Deprecated:
"use : UString Edit::getTextInterval(size_t _start, size_t _count)"

Definition at line 284 of file MyGUI_Edit.h.

size_t MyGUI::Edit::getTextCursor ( )
inline

Get text cursor position

Definition at line 84 of file MyGUI_Edit.h.

UString MyGUI::Edit::getTextInterval ( size_t  _start,
size_t  _count 
)

Get _count characters with tags from _start position

Definition at line 975 of file MyGUI_Edit.cpp.

size_t MyGUI::Edit::getTextLength ( ) const
inline

Get text length excluding tags For example "#00FF00Hello" length is 5

Definition at line 100 of file MyGUI_Edit.h.

void MyGUI::Edit::getTextSelect ( size_t &  _start,
size_t &  _end 
)
Deprecated:
"use : size_t Edit::getTextSelectionStart() , size_t getTextSelectionEnd()"
UString MyGUI::Edit::getTextSelection ( )

Get selected text

Definition at line 1102 of file MyGUI_Edit.cpp.

size_t MyGUI::Edit::getTextSelectionEnd ( )

Get index of last selected character or ITEM_NONE if nothing selected

Definition at line 1744 of file MyGUI_Edit.cpp.

size_t MyGUI::Edit::getTextSelectionLength ( )

Get length of selected text

Definition at line 1764 of file MyGUI_Edit.cpp.

size_t MyGUI::Edit::getTextSelectionStart ( )

Get index of first selected character or ITEM_NONE if nothing selected

Definition at line 1739 of file MyGUI_Edit.cpp.

virtual const std::string& MyGUI::Edit::getTypeName ( ) const
inlinevirtual

Get type name as string

Reimplemented from MyGUI::StaticText.

Reimplemented in MyGUI::ComboBox.

Definition at line 42 of file MyGUI_Edit.h.

size_t MyGUI::Edit::getVScrollPosition ( )

Get current position of vertical scroll (or 0 if no scroll)

Definition at line 1887 of file MyGUI_Edit.cpp.

size_t MyGUI::Edit::getVScrollRange ( )

Get range of vertical scroll (or 0 if no scroll). Range measured in pixels (full text heiht minus Edit height). For example if Edit is 200 pixels height and 40 lines of text 30 pixels height each (i.e. 600 pixels total), then return value is 400 ( = 600 - 200 ).

Definition at line 1882 of file MyGUI_Edit.cpp.

void MyGUI::Edit::insertText ( const UString _text,
size_t  _index = ITEM_NONE 
)

Inser text at _index position (text end by default)

Definition at line 1779 of file MyGUI_Edit.cpp.

bool MyGUI::Edit::isShowHScroll ( )
inline
Deprecated:
"use : bool Edit::isVisibleHScroll()"

Definition at line 267 of file MyGUI_Edit.h.

bool MyGUI::Edit::isShowVScroll ( )
inline
Deprecated:
"use : bool Edit::isVisibleVScroll()"

Definition at line 263 of file MyGUI_Edit.h.

bool MyGUI::Edit::isTextSelect ( )
inline
Deprecated:
"use : bool Edit::isTextSelection()"

Definition at line 296 of file MyGUI_Edit.h.

bool MyGUI::Edit::isTextSelection ( )

Is any text selected

Definition at line 1749 of file MyGUI_Edit.cpp.

template<typename Type >
bool MyGUI::Edit::isType ( ) const
inline

Compare with selected type

Reimplemented from MyGUI::StaticText.

Reimplemented in MyGUI::ComboBox.

Definition at line 42 of file MyGUI_Edit.h.

virtual bool MyGUI::Edit::isType ( const std::type_info &  _type) const
inlinevirtual

Compare with selected type

Reimplemented from MyGUI::StaticText.

Reimplemented in MyGUI::ComboBox.

Definition at line 42 of file MyGUI_Edit.h.

bool MyGUI::Edit::isVisibleHScroll ( )
inline

Get Show HScroll flag

Definition at line 217 of file MyGUI_Edit.h.

bool MyGUI::Edit::isVisibleVScroll ( )
inline

Get Show VScroll flag

Definition at line 201 of file MyGUI_Edit.h.

void MyGUI::Edit::notifyMouseButtonDoubleClick ( Widget _sender)
protected

Definition at line 233 of file MyGUI_Edit.cpp.

void MyGUI::Edit::notifyMouseDrag ( Widget _sender,
int  _left,
int  _top 
)
protected

Definition at line 201 of file MyGUI_Edit.cpp.

void MyGUI::Edit::notifyMouseLostFocus ( Widget _sender,
Widget _new 
)
protected

Definition at line 169 of file MyGUI_Edit.cpp.

void MyGUI::Edit::notifyMousePressed ( Widget _sender,
int  _left,
int  _top,
MouseButton  _id 
)
protected

Definition at line 176 of file MyGUI_Edit.cpp.

void MyGUI::Edit::notifyMouseReleased ( Widget _sender,
int  _left,
int  _top,
MouseButton  _id 
)
protected

Definition at line 195 of file MyGUI_Edit.cpp.

void MyGUI::Edit::notifyMouseSetFocus ( Widget _sender,
Widget _old 
)
protected

Definition at line 162 of file MyGUI_Edit.cpp.

void MyGUI::Edit::notifyMouseWheel ( Widget _sender,
int  _rel 
)
protected

Definition at line 1551 of file MyGUI_Edit.cpp.

void MyGUI::Edit::notifyScrollChangePosition ( VScroll _sender,
size_t  _position 
)
protected

Definition at line 1532 of file MyGUI_Edit.cpp.

void MyGUI::Edit::onKeyButtonPressed ( KeyCode  _key,
Char  _char 
)
protectedvirtual

Reimplemented from MyGUI::WidgetEvent.

Reimplemented in MyGUI::ComboBox.

Definition at line 318 of file MyGUI_Edit.cpp.

void MyGUI::Edit::onKeyLostFocus ( Widget _new)
protectedvirtual

Reimplemented from MyGUI::WidgetEvent.

Definition at line 299 of file MyGUI_Edit.cpp.

void MyGUI::Edit::onKeySetFocus ( Widget _old)
protectedvirtual

Reimplemented from MyGUI::WidgetEvent.

Definition at line 276 of file MyGUI_Edit.cpp.

void MyGUI::Edit::onMouseDrag ( int  _left,
int  _top 
)
protectedvirtual

Reimplemented from MyGUI::WidgetEvent.

Definition at line 269 of file MyGUI_Edit.cpp.

void MyGUI::Edit::setCaption ( const UString _value)
virtual

Set edit text applying tags

Reimplemented from MyGUI::Widget.

Definition at line 1484 of file MyGUI_Edit.cpp.

void MyGUI::Edit::setCoord ( const IntCoord _value)
virtual

Set widget position and size

Reimplemented from MyGUI::Widget.

Definition at line 1477 of file MyGUI_Edit.cpp.

void MyGUI::Edit::setCoord ( int  _left,
int  _top,
int  _width,
int  _height 
)
inline

See Widget::setCoord(const IntCoord& _coord)

Reimplemented from MyGUI::Widget.

Definition at line 196 of file MyGUI_Edit.h.

void MyGUI::Edit::setEditMultiLine ( bool  _value)

Enable or disable edit multiline mode
Multile mode: new line character moves text to new line.
Otherwise new lines replaced with space and all text is in single line.
Disabled (false) by default.

Definition at line 1801 of file MyGUI_Edit.cpp.

void MyGUI::Edit::setEditPassword ( bool  _value)

Enable or disable edit password mode
Password mode: you see password chars (*** by default) instead text.
Disabled (false) by default.

Definition at line 1110 of file MyGUI_Edit.cpp.

void MyGUI::Edit::setEditReadOnly ( bool  _value)

Enable or disable edit read only mode
Read only mode: you can't edit text, but can select it.
Disabled (false) by default.

Definition at line 1794 of file MyGUI_Edit.cpp.

void MyGUI::Edit::setEditStatic ( bool  _value)

Enable or disable edit static mode
Static mode is same as read only, but you also can't select text.
Disabled (false) by default.

Definition at line 1815 of file MyGUI_Edit.cpp.

void MyGUI::Edit::setEditWordWrap ( bool  _value)

Enable or disable edit word wrap mode
Word Wrap mode: move words to new line if they goes out of width. Also in this mode you can't edit or select text.
Disabled (false) by default.

Definition at line 1594 of file MyGUI_Edit.cpp.

void MyGUI::Edit::setFontHeight ( int  _value)
virtual

Set widget text font height

Reimplemented from MyGUI::StaticText.

Definition at line 1610 of file MyGUI_Edit.cpp.

void MyGUI::Edit::setFontName ( const std::string &  _value)
virtual

Set widget text font

Reimplemented from MyGUI::StaticText.

Definition at line 1603 of file MyGUI_Edit.cpp.

void MyGUI::Edit::setHScrollPosition ( size_t  _index)

Set current position of horizontal scroll

Definition at line 1919 of file MyGUI_Edit.cpp.

void MyGUI::Edit::setInvertSelected ( bool  _value)

Enable or disable inverting color of selected text
Enabled (true) by default

Definition at line 1941 of file MyGUI_Edit.cpp.

void MyGUI::Edit::setMaxTextLength ( size_t  _value)
inline

Sets the max amount of text allowed in the edit field.

Definition at line 108 of file MyGUI_Edit.h.

void MyGUI::Edit::setOnlyText ( const UString _value)

Set edit text without tags

Definition at line 1769 of file MyGUI_Edit.cpp.

void MyGUI::Edit::setOverflowToTheLeft ( bool  _value)
inline

Sets if surplus characters should push characters off the left side rather than ignored.

Definition at line 103 of file MyGUI_Edit.h.

void MyGUI::Edit::setPasswordChar ( Char  _value)

Set edit password character ('*' by default)

Definition at line 1431 of file MyGUI_Edit.cpp.

void MyGUI::Edit::setPasswordChar ( const UString _char)

Set edit password character ('*' by default). First character of string used.

Definition at line 1827 of file MyGUI_Edit.cpp.

void MyGUI::Edit::setPosition ( const IntPoint _value)
virtual

Set widget position (position of left top corner)

Reimplemented from MyGUI::Widget.

Definition at line 1453 of file MyGUI_Edit.cpp.

void MyGUI::Edit::setPosition ( int  _left,
int  _top 
)
inline

See Widget::setPosition(const IntPoint& _pos)

Reimplemented from MyGUI::Widget.

Definition at line 192 of file MyGUI_Edit.h.

void MyGUI::Edit::setPosition ( const IntCoord _coord)
inline
Deprecated:
"use : void Widget::setCoord(const IntCoord& _coord)"

Reimplemented from MyGUI::Widget.

Definition at line 270 of file MyGUI_Edit.h.

void MyGUI::Edit::setPosition ( int  _left,
int  _top,
int  _width,
int  _height 
)
inline
Deprecated:
"use : void Widget::setCoord(int _left, int _top, int _width, int _height)"

Reimplemented from MyGUI::Widget.

Definition at line 272 of file MyGUI_Edit.h.

void MyGUI::Edit::setProperty ( const std::string &  _key,
const std::string &  _value 
)
virtual

Set any widget property

Parameters
_keyProperty name (for example Widget_Alpha or Edit_MultiLine)
_valueValue converted to string

Reimplemented from MyGUI::StaticText.

Reimplemented in MyGUI::ComboBox.

Definition at line 1844 of file MyGUI_Edit.cpp.

void MyGUI::Edit::setSize ( const IntSize _value)
virtual

Set widget size

Reimplemented from MyGUI::Widget.

Definition at line 1470 of file MyGUI_Edit.cpp.

void MyGUI::Edit::setSize ( int  _width,
int  _height 
)
inline

See Widget::setSize(const IntSize& _size)

Reimplemented from MyGUI::Widget.

Definition at line 194 of file MyGUI_Edit.h.

void MyGUI::Edit::setTabPrinting ( bool  _value)
inline

Enable or disable tab printing mode
Tab printing mode: when editing text and pressing Tab key it displayed. If this mode disabled Tab key ignored.
Disabled (false) by default.

Definition at line 173 of file MyGUI_Edit.h.

void MyGUI::Edit::setTextAlign ( Align  _value)
virtual

Set widget text align

Reimplemented from MyGUI::StaticText.

Definition at line 1524 of file MyGUI_Edit.cpp.

virtual void MyGUI::Edit::setTextColour ( const Colour _value)
inlinevirtual

Set widget text colour

Reimplemented from MyGUI::StaticText.

Definition at line 275 of file MyGUI_Edit.h.

void MyGUI::Edit::setTextColour ( size_t  _start,
size_t  _count,
const Colour _colour 
)
inline
Deprecated:
"use : void Edit::setTextIntervalColour(size_t _start, size_t _count, const Colour& _colour)"

Definition at line 278 of file MyGUI_Edit.h.

void MyGUI::Edit::setTextCursor ( size_t  _index)

Set text cursor position

Definition at line 793 of file MyGUI_Edit.cpp.

void MyGUI::Edit::setTextIntervalColour ( size_t  _start,
size_t  _count,
const Colour _colour 
)

Colour interval

Definition at line 1734 of file MyGUI_Edit.cpp.

void MyGUI::Edit::setTextSelect ( size_t  _start,
size_t  _end 
)
inline
Deprecated:
"use : void Edit::setTextSelection(size_t _start, size_t _end)"

Definition at line 287 of file MyGUI_Edit.h.

void MyGUI::Edit::setTextSelectColour ( const Colour _colour)
inline
Deprecated:
"use : void Edit::setTextSelectionColour(const Colour& _colour)"

Definition at line 299 of file MyGUI_Edit.h.

void MyGUI::Edit::setTextSelection ( size_t  _start,
size_t  _end 
)

Set selected text interval

Parameters
_startof interval
_endof interval

Definition at line 809 of file MyGUI_Edit.cpp.

void MyGUI::Edit::setTextSelectionColour ( const Colour _value)

Colour selected text

Definition at line 1759 of file MyGUI_Edit.cpp.

void MyGUI::Edit::setVisibleHScroll ( bool  _value)

Show HScroll when text size larger than Edit

Definition at line 1838 of file MyGUI_Edit.cpp.

void MyGUI::Edit::setVisibleVScroll ( bool  _value)

Show VScroll when text size larger than Edit

Definition at line 1832 of file MyGUI_Edit.cpp.

void MyGUI::Edit::setVScrollPosition ( size_t  _index)

Set current position of vertical scroll

Definition at line 1892 of file MyGUI_Edit.cpp.

void MyGUI::Edit::showHScroll ( bool  _visible)
inline
Deprecated:
"use : void Edit::setVisibleHScroll(bool _visible)"

Definition at line 265 of file MyGUI_Edit.h.

void MyGUI::Edit::showVScroll ( bool  _visible)
inline
Deprecated:
"use : void Edit::setVisibleVScroll(bool _visible)"

Definition at line 261 of file MyGUI_Edit.h.

void MyGUI::Edit::updateView ( )
protected

Definition at line 1617 of file MyGUI_Edit.cpp.

void MyGUI::Edit::updateViewWithCursor ( )
protected

Definition at line 1623 of file MyGUI_Edit.cpp.

Field Documentation

EventPair<EventHandle_WidgetVoid, EventHandle_EditPtr> MyGUI::Edit::eventEditSelectAccept

Event : Enter pressed (Ctrl+enter in multiline mode).
signature : void method(MyGUI::Edit* _sender)

Parameters
_senderwidget that called this event

Definition at line 246 of file MyGUI_Edit.h.

EventPair<EventHandle_WidgetVoid, EventHandle_EditPtr> MyGUI::Edit::eventEditTextChange

Event : Text changed.
signature : void method(MyGUI::Edit* _sender)

Parameters
_senderwidget that called this event

Definition at line 252 of file MyGUI_Edit.h.

float MyGUI::Edit::mActionMouseTimer
protected

Definition at line 403 of file MyGUI_Edit.h.

Char MyGUI::Edit::mCharPassword
protected

Definition at line 434 of file MyGUI_Edit.h.

bool MyGUI::Edit::mCursorActive
protected

Definition at line 401 of file MyGUI_Edit.h.

size_t MyGUI::Edit::mCursorPosition
protected

Definition at line 406 of file MyGUI_Edit.h.

float MyGUI::Edit::mCursorTimer
protected

Definition at line 402 of file MyGUI_Edit.h.

size_t MyGUI::Edit::mEndSelect
protected

Definition at line 412 of file MyGUI_Edit.h.

bool MyGUI::Edit::mIsFocus
protected

Definition at line 399 of file MyGUI_Edit.h.

bool MyGUI::Edit::mIsPressed
protected

Definition at line 397 of file MyGUI_Edit.h.

size_t MyGUI::Edit::mMaxTextLength
protected

Definition at line 437 of file MyGUI_Edit.h.

bool MyGUI::Edit::mModeMultiline
protected

Definition at line 422 of file MyGUI_Edit.h.

bool MyGUI::Edit::mModePassword
protected

Definition at line 421 of file MyGUI_Edit.h.

bool MyGUI::Edit::mModeReadOnly
protected

Definition at line 420 of file MyGUI_Edit.h.

bool MyGUI::Edit::mModeStatic
protected

Definition at line 423 of file MyGUI_Edit.h.

bool MyGUI::Edit::mModeWordWrap
protected

Definition at line 424 of file MyGUI_Edit.h.

bool MyGUI::Edit::mMouseLeftPressed
protected

Definition at line 418 of file MyGUI_Edit.h.

std::string MyGUI::Edit::mOriginalPointer
protected

Definition at line 432 of file MyGUI_Edit.h.

bool MyGUI::Edit::mOverflowToTheLeft
protected

Definition at line 436 of file MyGUI_Edit.h.

UString MyGUI::Edit::mPasswordText
protected

Definition at line 429 of file MyGUI_Edit.h.

size_t MyGUI::Edit::mStartSelect
protected

Definition at line 411 of file MyGUI_Edit.h.

bool MyGUI::Edit::mTabPrinting
protected

Definition at line 426 of file MyGUI_Edit.h.

size_t MyGUI::Edit::mTextLength
protected

Definition at line 408 of file MyGUI_Edit.h.

DequeUndoRedoInfo MyGUI::Edit::mVectorRedoChangeInfo
protected

Definition at line 416 of file MyGUI_Edit.h.

DequeUndoRedoInfo MyGUI::Edit::mVectorUndoChangeInfo
protected

Definition at line 415 of file MyGUI_Edit.h.


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