MyGUI: MyGUI::EditText Class Reference

MyGUI 3.4.3

Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes
MyGUI::EditText Class Reference

`#include <MyGUI_EditText.h>`

Inheritance diagram for MyGUI::EditText:
[legend]

## Public Types
typedef RTTIBase | Base
typedef EditText | RTTIBase
Public Types inherited from MyGUI::ISubWidgetText
typedef RTTIBase | Base
typedef ISubWidgetText | RTTIBase
Public Types inherited from MyGUI::ISubWidget
typedef RTTIBase | Base
typedef ISubWidget | RTTIBase
Public Types inherited from MyGUI::IObject
typedef IObject | RTTIBase

## Public Member Functions
virtual std::string_view | getTypeName () const override
virtual bool | isType (const std::type_info &_type) const override
template<typename Type>
bool | isType () const
| EditText ()
void | setVisible (bool _visible) override
void | updateRawData () const
void | doRender () override
void | setCaption (const UString &_value) override
const UString & | getCaption () const override
void | setTextColour (const Colour &_value) override
const Colour & | getTextColour () const override
void | setAlpha (float _value) override
void | setFontName (std::string_view _value) override
std::string_view | getFontName () const override
void | setFontHeight (int _value) override
int | getFontHeight () const override
void | createDrawItem (ITexture *_texture, ILayerNode *_node) override
void | destroyDrawItem () override
void | setTextAlign (Align _value) override
Align | getTextAlign () const override
size_t | getTextSelectionStart () const override
size_t | getTextSelectionEnd () const override
void | setTextSelection (size_t _start, size_t _end) override
bool | getSelectBackground () const override
void | setSelectBackground (bool _normal) override
bool | isVisibleCursor () const override
void | setVisibleCursor (bool _value) override
bool | getInvertSelected () const override
void | setInvertSelected (bool _value) override
size_t | getCursorPosition () const override
void | setCursorPosition (size_t _index) override
IntSize | getTextSize () const override
void | setViewOffset (const IntPoint &_point) override
IntPoint | getViewOffset () const override
size_t | getCursorPosition (const IntPoint &_point) const override
IntCoord | getCursorCoord (size_t _position) const override
bool | getShadow () const override
void | setShadow (bool _value) override
void | setShiftText (bool _value) override
void | setWordWrap (bool _value) override
void | setStateData (IStateInfo *_data) override
void | setShadowColour (const Colour &_value) override
const Colour & | getShadowColour () const override
void | _updateView () override
void | _correctView () override
void | _setAlign (const IntSize &_oldsize) override
virtual const VectorLineInfo & | getLineInfo () const
Public Member Functions inherited from MyGUI::ISubWidgetText
template<typename Type>
bool | isType () const
IntPoint | getCursorPoint (size_t _position) const
IntRect | getCursorRect (size_t _position) const
Public Member Functions inherited from MyGUI::ISubWidget
template<typename Type>
bool | isType () const
virtual void | setAlign (Align _value)
virtual void | doManualRender (IVertexBuffer *, ITexture *, size_t)
Public Member Functions inherited from MyGUI::ICroppedRectangle
virtual | ~ICroppedRectangle ()=default
ICroppedRectangle * | getCroppedParent ()
virtual void | setPosition (const IntPoint &_value)
virtual void | setSize (const IntSize &_value)
virtual void | setCoord (const IntCoord &_value)
IntPoint | getPosition () const
IntSize | getSize () const
const IntCoord & | getCoord () const
const IntPoint & | getAbsolutePosition () const
IntRect | getAbsoluteRect () const
IntCoord | getAbsoluteCoord () const
int | getAbsoluteLeft () const
int | getAbsoluteTop () 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
void | _setCroppedParent (ICroppedRectangle *_parent)
const IntRect & | _getMargin () const
int | _getMarginLeft () const
int | _getMarginRight () const
int | _getMarginTop () const
int | _getMarginBottom () const
Public Member Functions inherited from MyGUI::IObject
template<typename Type>
bool | isType () const
template<typename Type>
Type * | castType (bool _throw=true)
template<typename Type>
const Type * | castType (bool _throw=true) const
virtual | ~IObject ()=default

## Static Public Member Functions
static std::string_view | getClassTypeName ()
Static Public Member Functions inherited from MyGUI::ISubWidgetText
static std::string_view | getClassTypeName ()
Static Public Member Functions inherited from MyGUI::ISubWidget
static std::string_view | getClassTypeName ()
Static Public Member Functions inherited from MyGUI::IObject
static std::string_view | getClassTypeName ()

## Protected Attributes
bool | mEmptyView {false}
uint32 | mCurrentColourNative {0xFFFFFFFF}
uint32 | mInverseColourNative {0xFF000000}
uint32 | mShadowColourNative {0x00000000}
IntCoord | mCurrentCoord
UString | mCaption
UString::utf32string | mUtf32Caption
bool | mTextOutDate {false}
Align | mTextAlign {Align::Default}
Colour | mColour {Colour::White}
Colour | mShadowColour {Colour::Black}
float | mAlpha {ALPHA_MAX}
VertexColourType | mVertexFormat
IFont * | mFont {nullptr}
ITexture * | mTexture {nullptr}
int | mFontHeight {0}
int | mCustomFontHeight = 0
bool | mBackgroundNormal {true}
size_t | mStartSelect {0}
size_t | mEndSelect {0}
size_t | mCursorPosition {0}
bool | mVisibleCursor {false}
bool | mInvertSelect {true}
bool | mShadow {false}
IntPoint | mViewOffset
ILayerNode * | mNode {nullptr}
RenderItem * | mRenderItem {nullptr}
size_t | mCountVertex
bool | mIsAddCursorWidth {true}
bool | mShiftText {false}
bool | mWordWrap {false}
bool | mManualColour {false}
int | mOldWidth {0}
TextView | mTextView
Protected Attributes inherited from MyGUI::ISubWidget
Align | mAlign
bool | mVisible {true}
Protected Attributes inherited from MyGUI::ICroppedRectangle
IntRect | mMargin
IntCoord | mCoord
IntPoint | mAbsolutePosition
bool | mIsMargin {false}
ICroppedRectangle * | mCroppedParent {nullptr}

## Additional Inherited Members
Protected Member Functions inherited from MyGUI::ICroppedRectangle
bool | _checkMargin ()
bool | _checkOutside () const

## Detailed Description

Definition at line 25 of file MyGUI_EditText.h.

## Member Typedef Documentation

## ◆ Base

typedef RTTIBase MyGUI::EditText::Base

Definition at line 27 of file MyGUI_EditText.h.

## ◆ RTTIBase

typedef EditText MyGUI::EditText::RTTIBase

Definition at line 27 of file MyGUI_EditText.h.

## Constructor & Destructor Documentation

## ◆ EditText()

MyGUI::EditText::EditText | ( |  | ) |

Definition at line 23 of file MyGUI_EditText.cpp.

## Member Function Documentation

## ◆ _correctView()

void MyGUI::EditText::_correctView | ( |  | ) |
| overridevirtual

Reimplemented from MyGUI::ISubWidget.

Definition at line 39 of file MyGUI_EditText.cpp.

## ◆ _setAlign()

void MyGUI::EditText::_setAlign | ( | const IntSize & | _oldsize | ) |
| overridevirtual

Reimplemented from MyGUI::ISubWidget.

Definition at line 45 of file MyGUI_EditText.cpp.

## ◆ _updateView()

void MyGUI::EditText::_updateView | ( |  | ) |
| overridevirtual

Reimplemented from MyGUI::ISubWidget.

Definition at line 97 of file MyGUI_EditText.cpp.

## ◆ createDrawItem()

void MyGUI::EditText::createDrawItem | ( | ITexture * | _texture,
|  | ILayerNode * | _node )
| overridevirtual

Implements MyGUI::ISubWidget.

Definition at line 268 of file MyGUI_EditText.cpp.

## ◆ destroyDrawItem()

void MyGUI::EditText::destroyDrawItem | ( |  | ) |
| overridevirtual

Implements MyGUI::ISubWidget.

Definition at line 281 of file MyGUI_EditText.cpp.

## ◆ doRender()

void MyGUI::EditText::doRender | ( |  | ) |
| overridevirtual

Implements MyGUI::ISubWidget.

Reimplemented in MyGUI::SimpleText.

Definition at line 485 of file MyGUI_EditText.cpp.

## ◆ getCaption()

const UString & MyGUI::EditText::getCaption | ( |  | ) | const
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 165 of file MyGUI_EditText.cpp.

## ◆ getClassTypeName()

std::string_view MyGUI::EditText::getClassTypeName | ( |  | ) |
| inlinestatic

Definition at line 27 of file MyGUI_EditText.h.

## ◆ getCursorCoord()

IntCoord MyGUI::EditText::getCursorCoord | ( | size_t | _position | ) | const
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 423 of file MyGUI_EditText.cpp.

## ◆ getCursorPosition() [1/2]

size_t MyGUI::EditText::getCursorPosition | ( |  | ) | const
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 340 of file MyGUI_EditText.cpp.

## ◆ getCursorPosition() [2/2]

size_t MyGUI::EditText::getCursorPosition | ( | const IntPoint & | _point | ) | const
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 407 of file MyGUI_EditText.cpp.

## ◆ getFontHeight()

int MyGUI::EditText::getFontHeight | ( |  | ) | const
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 263 of file MyGUI_EditText.cpp.

## ◆ getFontName()

std::string_view MyGUI::EditText::getFontName | ( |  | ) | const
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 245 of file MyGUI_EditText.cpp.

## ◆ getInvertSelected()

bool MyGUI::EditText::getInvertSelected | ( |  | ) | const
| overridevirtual

Get invert selected text color property.

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 610 of file MyGUI_EditText.cpp.

## ◆ getLineInfo()

const VectorLineInfo & MyGUI::EditText::getLineInfo | ( |  | ) | const
| virtual

Definition at line 389 of file MyGUI_EditText.cpp.

## ◆ getSelectBackground()

bool MyGUI::EditText::getSelectBackground | ( |  | ) | const
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 310 of file MyGUI_EditText.cpp.

## ◆ getShadow()

bool MyGUI::EditText::getShadow | ( |  | ) | const
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 615 of file MyGUI_EditText.cpp.

## ◆ getShadowColour()

const Colour & MyGUI::EditText::getShadowColour | ( |  | ) | const
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 642 of file MyGUI_EditText.cpp.

## ◆ getTextAlign()

Align MyGUI::EditText::getTextAlign | ( |  | ) | const
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 363 of file MyGUI_EditText.cpp.

## ◆ getTextColour()

const Colour & MyGUI::EditText::getTextColour | ( |  | ) | const
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 191 of file MyGUI_EditText.cpp.

## ◆ getTextSelectionEnd()

size_t MyGUI::EditText::getTextSelectionEnd | ( |  | ) | const
| overridevirtual

Get index of end of selection

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 296 of file MyGUI_EditText.cpp.

## ◆ getTextSelectionStart()

size_t MyGUI::EditText::getTextSelectionStart | ( |  | ) | const
| overridevirtual

Get index of start of selection

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 291 of file MyGUI_EditText.cpp.

## ◆ getTextSize()

IntSize MyGUI::EditText::getTextSize | ( |  | ) | const
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 368 of file MyGUI_EditText.cpp.

## ◆ getTypeName()

virtual std::string_view MyGUI::EditText::getTypeName | ( |  | ) | const
| inlineoverridevirtual

Get type name as string

Reimplemented from MyGUI::ISubWidgetText.

Reimplemented in MyGUI::SimpleText.

Definition at line 27 of file MyGUI_EditText.h.

## ◆ getViewOffset()

IntPoint MyGUI::EditText::getViewOffset | ( |  | ) | const
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 402 of file MyGUI_EditText.cpp.

## ◆ isType() [1/2]

template<typename Type>

bool MyGUI::EditText::isType | ( |  | ) | const
| inline

Compare with selected type

Definition at line 27 of file MyGUI_EditText.h.

## ◆ isType() [2/2]

virtual bool MyGUI::EditText::isType | ( | const std::type_info & | _type | ) | const
| inlineoverridevirtual

Compare with selected type

Reimplemented from MyGUI::ISubWidgetText.

Reimplemented in MyGUI::SimpleText.

Definition at line 27 of file MyGUI_EditText.h.

## ◆ isVisibleCursor()

bool MyGUI::EditText::isVisibleCursor | ( |  | ) | const
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 325 of file MyGUI_EditText.cpp.

## ◆ setAlpha()

void MyGUI::EditText::setAlpha | ( | float | _value | ) |
| overridevirtual

Reimplemented from MyGUI::ISubWidget.

Definition at line 196 of file MyGUI_EditText.cpp.

## ◆ setCaption()

void MyGUI::EditText::setCaption | ( | const UString & | _value | ) |
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 136 of file MyGUI_EditText.cpp.

## ◆ setCursorPosition()

void MyGUI::EditText::setCursorPosition | ( | size_t | _index | ) |
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 345 of file MyGUI_EditText.cpp.

## ◆ setFontHeight()

void MyGUI::EditText::setFontHeight | ( | int | _value | ) |
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 250 of file MyGUI_EditText.cpp.

## ◆ setFontName()

void MyGUI::EditText::setFontName | ( | std::string_view | _value | ) |
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 210 of file MyGUI_EditText.cpp.

## ◆ setInvertSelected()

void MyGUI::EditText::setInvertSelected | ( | bool | _value | ) |
| overridevirtual

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

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 600 of file MyGUI_EditText.cpp.

## ◆ setSelectBackground()

void MyGUI::EditText::setSelectBackground | ( | bool | _normal | ) |
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 315 of file MyGUI_EditText.cpp.

## ◆ setShadow()

void MyGUI::EditText::setShadow | ( | bool | _value | ) |
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 620 of file MyGUI_EditText.cpp.

## ◆ setShadowColour()

void MyGUI::EditText::setShadowColour | ( | const Colour & | _value | ) |
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 631 of file MyGUI_EditText.cpp.

## ◆ setShiftText()

void MyGUI::EditText::setShiftText | ( | bool | _value | ) |
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 439 of file MyGUI_EditText.cpp.

## ◆ setStateData()

void MyGUI::EditText::setStateData | ( | IStateInfo * | _data | ) |
| overridevirtual

Reimplemented from MyGUI::ISubWidget.

Definition at line 477 of file MyGUI_EditText.cpp.

## ◆ setTextAlign()

void MyGUI::EditText::setTextAlign | ( | Align | _value | ) |
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 355 of file MyGUI_EditText.cpp.

## ◆ setTextColour()

void MyGUI::EditText::setTextColour | ( | const Colour & | _value | ) |
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 170 of file MyGUI_EditText.cpp.

## ◆ setTextSelection()

void MyGUI::EditText::setTextSelection | ( | size_t | ,
|  | size_t | )
| overridevirtual

Set text selection

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 301 of file MyGUI_EditText.cpp.

## ◆ setViewOffset()

void MyGUI::EditText::setViewOffset | ( | const IntPoint & | _point | ) |
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Reimplemented in MyGUI::SimpleText.

Definition at line 394 of file MyGUI_EditText.cpp.

## ◆ setVisible()

void MyGUI::EditText::setVisible | ( | bool | _visible | ) |
| overridevirtual

Reimplemented from MyGUI::ISubWidget.

Definition at line 29 of file MyGUI_EditText.cpp.

## ◆ setVisibleCursor()

void MyGUI::EditText::setVisibleCursor | ( | bool | _value | ) |
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 330 of file MyGUI_EditText.cpp.

## ◆ setWordWrap()

void MyGUI::EditText::setWordWrap | ( | bool | _value | ) |
| overridevirtual

Reimplemented from MyGUI::ISubWidgetText.

Definition at line 449 of file MyGUI_EditText.cpp.

## ◆ updateRawData()

void MyGUI::EditText::updateRawData | ( |  | ) | const

Definition at line 458 of file MyGUI_EditText.cpp.

## Field Documentation

## ◆ mAlpha

float MyGUI::EditText::mAlpha {ALPHA_MAX}
| protected

Definition at line 147 of file MyGUI_EditText.h.

## ◆ mBackgroundNormal

bool MyGUI::EditText::mBackgroundNormal {true}
| protected

Definition at line 155 of file MyGUI_EditText.h.

## ◆ mCaption

UString MyGUI::EditText::mCaption
| protected

Definition at line 140 of file MyGUI_EditText.h.

## ◆ mColour

Colour MyGUI::EditText::mColour {Colour::White}
| protected

Definition at line 145 of file MyGUI_EditText.h.

## ◆ mCountVertex

size_t MyGUI::EditText::mCountVertex
| protected

Definition at line 167 of file MyGUI_EditText.h.

## ◆ mCurrentColourNative

uint32 MyGUI::EditText::mCurrentColourNative {0xFFFFFFFF}
| protected

Definition at line 135 of file MyGUI_EditText.h.

## ◆ mCurrentCoord

IntCoord MyGUI::EditText::mCurrentCoord
| protected

Definition at line 138 of file MyGUI_EditText.h.

## ◆ mCursorPosition

size_t MyGUI::EditText::mCursorPosition {0}
| protected

Definition at line 158 of file MyGUI_EditText.h.

## ◆ mCustomFontHeight

int MyGUI::EditText::mCustomFontHeight = 0
| protected

Definition at line 153 of file MyGUI_EditText.h.

## ◆ mEmptyView

bool MyGUI::EditText::mEmptyView {false}
| protected

Definition at line 134 of file MyGUI_EditText.h.

## ◆ mEndSelect

size_t MyGUI::EditText::mEndSelect {0}
| protected

Definition at line 157 of file MyGUI_EditText.h.

## ◆ mFont

IFont* MyGUI::EditText::mFont {nullptr}
| protected

Definition at line 150 of file MyGUI_EditText.h.

## ◆ mFontHeight

int MyGUI::EditText::mFontHeight {0}
| protected

Definition at line 152 of file MyGUI_EditText.h.

## ◆ mInverseColourNative

uint32 MyGUI::EditText::mInverseColourNative {0xFF000000}
| protected

Definition at line 136 of file MyGUI_EditText.h.

## ◆ mInvertSelect

bool MyGUI::EditText::mInvertSelect {true}
| protected

Definition at line 160 of file MyGUI_EditText.h.

## ◆ mIsAddCursorWidth

bool MyGUI::EditText::mIsAddCursorWidth {true}
| protected

Definition at line 168 of file MyGUI_EditText.h.

## ◆ mManualColour

bool MyGUI::EditText::mManualColour {false}
| protected

Definition at line 172 of file MyGUI_EditText.h.

## ◆ mNode

ILayerNode* MyGUI::EditText::mNode {nullptr}
| protected

Definition at line 165 of file MyGUI_EditText.h.

## ◆ mOldWidth

int MyGUI::EditText::mOldWidth {0}
| protected

Definition at line 173 of file MyGUI_EditText.h.

## ◆ mRenderItem

RenderItem* MyGUI::EditText::mRenderItem {nullptr}
| protected

Definition at line 166 of file MyGUI_EditText.h.

## ◆ mShadow

bool MyGUI::EditText::mShadow {false}
| protected

Definition at line 161 of file MyGUI_EditText.h.

## ◆ mShadowColour

Colour MyGUI::EditText::mShadowColour {Colour::Black}
| protected

Definition at line 146 of file MyGUI_EditText.h.

## ◆ mShadowColourNative

uint32 MyGUI::EditText::mShadowColourNative {0x00000000}
| protected

Definition at line 137 of file MyGUI_EditText.h.

## ◆ mShiftText

bool MyGUI::EditText::mShiftText {false}
| protected

Definition at line 170 of file MyGUI_EditText.h.

## ◆ mStartSelect

size_t MyGUI::EditText::mStartSelect {0}
| protected

Definition at line 156 of file MyGUI_EditText.h.

## ◆ mTextAlign

Align MyGUI::EditText::mTextAlign {Align::Default}
| protected

Definition at line 143 of file MyGUI_EditText.h.

## ◆ mTextOutDate

bool MyGUI::EditText::mTextOutDate {false}
| mutableprotected

Definition at line 142 of file MyGUI_EditText.h.

## ◆ mTexture

ITexture* MyGUI::EditText::mTexture {nullptr}
| protected

Definition at line 151 of file MyGUI_EditText.h.

## ◆ mTextView

TextView MyGUI::EditText::mTextView
| mutableprotected

Definition at line 175 of file MyGUI_EditText.h.

## ◆ mUtf32Caption

UString::utf32string MyGUI::EditText::mUtf32Caption
| protected

Definition at line 141 of file MyGUI_EditText.h.

## ◆ mVertexFormat

VertexColourType MyGUI::EditText::mVertexFormat
| protected

Definition at line 148 of file MyGUI_EditText.h.

## ◆ mViewOffset

IntPoint MyGUI::EditText::mViewOffset
| protected

Definition at line 163 of file MyGUI_EditText.h.

## ◆ mVisibleCursor

bool MyGUI::EditText::mVisibleCursor {false}
| protected

Definition at line 159 of file MyGUI_EditText.h.

## ◆ mWordWrap

bool MyGUI::EditText::mWordWrap {false}
| protected

Definition at line 171 of file MyGUI_EditText.h.

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

- MyGUI_EditText.h
- MyGUI_EditText.cpp