GuiMLTextCtrl

Engine/source/gui/controls/guiMLTextCtrl.h

More...

Classes:

Public Types

enum
Justification {
  LeftJustify 
  RightJustify 
  CenterJustify 
}

Private Types

Parent 

Protected Static Attributes

Public Functions

addText(const char * textBuffer, const U32 numChars, bool reformat)
DECLARE_CALLBACK(void , onResize , (S32 width, S32 maxY) )
DECLARE_CALLBACK(void , onURL , (const char *url) )
DECLARE_CATEGORY("Gui Text" )
DECLARE_DESCRIPTION("A <a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1abb04e3738c4c5a96b3ade6fa47013a6c">control</a> that displays multiple lines of text." )
const char *

Returns the value of the variable bound to this object.

getText(char * pBuffer, const U32 bufferSize)
getWrappedText(char * pBuffer, const U32 bufferSize)
insertChars(const char * inputChars, const U32 numInputChars, const U32 position)
bool

Called when this object is added to the scene.

bool
resize(const Point2I & newPosition, const Point2I & newExtent)

Changes the size and/or position of this control.

setAlpha(F32 alpha)
setScriptValue(const char * value)

Sets the value of the variable bound to this object.

setSelectionActive(bool active)
setText(const char * textBuffer, const U32 numChars)

Public Static Functions

char *
stripControlChars(const char * inString)

Protected Functions

allocBitmap(const char * bitmapName, U32 bitmapNameLen)
Font *
allocFont(const char * faceName, U32 faceNameLen, U32 size)
allocStyle(Style * style)
Atom *
buildTextAtom(U32 start, U32 len, U32 left, U32 right, URL * url)
copyToClipboard(const U32 rangeStart, const U32 rangeEnd)
deleteChars(const U32 rangeStart, const U32 rangeEnd)
drawAtomText(bool sel, U32 start, U32 end, Atom * atom, Line * line, Point2I offset)
emitBitmapToken(Bitmap * bmp, U32 textStart, bool bitmapBreak)
emitNewLine(U32 textStart)
emitTextToken(U32 textStart, U32 len)
Atom *
findHitAtom(const Point2I localCoords)
getCursor(GuiCursor *& cursor, bool & showCursor, const GuiEvent & lastGuiEvent)

Get information about the cursor.

getCursorPositionAndColor(Point2I & cursorTop, Point2I & cursorBottom, ColorI & color)
getTextPosition(const Point2I & localPosition)

Called after any property of the object is changed in the world editor.

bool

Happens when a key is depressed.

Do special pre-render processing.

onRender(Point2I offset, const RectI & updateRect)

Called when this control is to render itself.

Called when this object is asked to sleep.

bool

Called when this object is asked to wake up returns true if it's actually awake at the end.

parentResized(const RectI & oldParentRect, const RectI & newParentRect)

Called when this objects parent is resized.

Atom *
splitAtomListEmit(Atom * list, U32 width)

Detailed Description

Public Types

Justification

Enumerator

LeftJustify
RightJustify
CenterJustify

Private Types

typedef GuiControl Parent 

Protected Attributes

bool mAllowColorChars 
F32 mAlpha 
Bitmap * mBitmapList 
BitmapRef * mBitmapRefList 
BitmapRef * mBlockList 
U32 mCurClipX 
U32 mCurDiv 
U32 mCurJustify 
U32 mCurLMargin 
U32 mCurRMargin 
U32 mCursorPosition 
Style * mCurStyle 
U32 mCurTabStop 
URL * mCurURL 
U32 mCurX 
U32 mCurY 
SFXTrack * mDeniedSound 
bool mDirty 
Atom ** mEmitAtomPtr 
Atom * mEmitAtoms 
Resource< GFont > mFont 
Font * mFontList 
URL * mHitURL 
StringTableEntry mInitialText 
bool mIsEditCtrl 
Atom ** mLineAtomPtr 
Atom * mLineAtoms 
Line ** mLineInsert 
Line * mLineList 
S32 mLineSpacingPixels 
U32 mLineStart 
S32 mMaxBufferSize 
U32 mMaxY 
DataChunker mResourceChunker 
U32 mScanPos 
bool mSelectionActive 
S32 mSelectionAnchor 
Point2I mSelectionAnchorDropped 
U32 mSelectionEnd 
U32 mSelectionStart 
BitmapRef mSentinel 
U32 mTabStopCount 
U32 * mTabStops 
LineTag * mTagList 
StringBuffer mTextBuffer 
bool mUseURLMouseCursor 
U32 mVertMoveAnchor 
bool mVertMoveAnchorValid 
DataChunker mViewChunker 

Protected Static Attributes

const U32 csmTextBufferGrowthSize 

Public Functions

GuiMLTextCtrl()

~GuiMLTextCtrl()

addText(const char * textBuffer, const U32 numChars, bool reformat)

DECLARE_CALLBACK(void , onResize , (S32 width, S32 maxY) )

DECLARE_CALLBACK(void , onURL , (const char *url) )

DECLARE_CATEGORY("Gui Text" )

DECLARE_CONOBJECT(GuiMLTextCtrl )

DECLARE_DESCRIPTION("A <a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1abb04e3738c4c5a96b3ade6fa47013a6c">control</a> that displays multiple lines of text." )

ensureCursorOnScreen()

getCursorPosition()

getNumChars()

getScriptValue()

Reimplemented from: GuiControl

getText(char * pBuffer, const U32 bufferSize)

getTextContent()

getWrappedText(char * pBuffer, const U32 bufferSize)

insertChars(const char * inputChars, const U32 numInputChars, const U32 position)

onAdd()

Reimplemented from: GuiControl

reflow()

resize(const Point2I & newPosition, const Point2I & newExtent)

Reimplemented from: GuiControl

Reimplemented by: GuiMLTextEditCtrl

scrollToBottom()

scrollToTag(U32 id)

scrollToTop()

setAlpha(F32 alpha)

setCursorPosition(const S32)

setScriptValue(const char * value)

Reimplemented from: GuiControl

setSelectionActive(bool active)

setSelectionEnd(U32 end)

setSelectionStart(U32 start)

setText(const char * textBuffer, const U32 numChars)

Public Static Functions

initPersistFields()

stripControlChars(const char * inString)

Protected Functions

allocBitmap(const char * bitmapName, U32 bitmapNameLen)

allocFont(const char * faceName, U32 faceNameLen, U32 size)

allocLineTag(U32 id)

allocStyle(Style * style)

buildTextAtom(U32 start, U32 len, U32 left, U32 right, URL * url)

clearSelection()

copyToClipboard(const U32 rangeStart, const U32 rangeEnd)

deleteChars(const U32 rangeStart, const U32 rangeEnd)

drawAtomText(bool sel, U32 start, U32 end, Atom * atom, Line * line, Point2I offset)

emitBitmapToken(Bitmap * bmp, U32 textStart, bool bitmapBreak)

emitNewLine(U32 textStart)

emitTextToken(U32 textStart, U32 len)

findHitAtom(const Point2I localCoords)

freeLineBuffers()

freeResources()

getCursor(GuiCursor *& cursor, bool & showCursor, const GuiEvent & lastGuiEvent)

Reimplemented from: GuiControl

getCursorPositionAndColor(Point2I & cursorTop, Point2I & cursorBottom, ColorI & color)

getTextPosition(const Point2I & localPosition)

inspectPostApply()

Reimplemented from: SimObject

isSelectionActive()

onKeyDown(const GuiEvent & event)

Reimplemented from: GuiControl

Reimplemented by: GuiMLTextEditCtrl

onMouseDown(const GuiEvent & )

Reimplemented from: GuiControl

onMouseDragged(const GuiEvent & )

Reimplemented from: GuiControl

onMouseUp(const GuiEvent & )

Reimplemented from: GuiControl

onPreRender()

Reimplemented from: GuiControl

onRender(Point2I offset, const RectI & updateRect)

Reimplemented from: GuiControl

Reimplemented by: GuiMLTextEditCtrl

onSleep()

Reimplemented from: GuiControl

onWake()

Reimplemented from: GuiControl

Reimplemented by: GuiMLTextEditCtrl

parentResized(const RectI & oldParentRect, const RectI & newParentRect)

Reimplemented from: GuiControl

processEmitAtoms()

splitAtomListEmit(Atom * list, U32 width)