GuiMLTextCtrl Class Reference

#include <guiMLTextCtrl.h>

Inheritance diagram for GuiMLTextCtrl:

Inheritance graph
[legend]
List of all members.

Public Types

 LeftJustify
 RightJustify
 CenterJustify
enum  Justification {
  LeftJustify,
  RightJustify,
  CenterJustify
}

Public Member Functions

 GuiMLTextCtrl ()
 ~GuiMLTextCtrl ()
U32 getNumChars () const
U32 getText (char *pBuffer, const U32 bufferSize) const
U32 getWrappedText (char *pBuffer, const U32 bufferSize) const
const char * getTextContent ()
void insertChars (const char *inputChars, const U32 numInputChars, const U32 position)
void setText (const char *textBuffer, const U32 numChars)
void addText (const char *textBuffer, const U32 numChars, bool reformat)
void setAlpha (F32 alpha)
bool setCursorPosition (const S32)
void ensureCursorOnScreen ()
void scrollToTag (U32 id)
void scrollToTop ()
void scrollToBottom ()
virtual void reflow ()
 DECLARE_CONOBJECT (GuiMLTextCtrl)
void setScriptValue (const char *value)
 Sets the value of the variable bound to this object.
const char * getScriptValue ()
 Returns the value of the variable bound to this object.
void setSelectionStart (U32 start)
void setSelectionEnd (U32 end)
void setSelectionActive (bool active)
S32 getCursorPosition ()

Static Public Member Functions

static void initPersistFields ()
 Register dynamic fields in a subclass of ConsoleObject.
static char * stripControlChars (const char *inString)

Protected Member Functions

void freeLineBuffers ()
void freeResources ()
BitmapallocBitmap (const char *bitmapName, U32 bitmapNameLen)
FontallocFont (const char *faceName, U32 faceNameLen, U32 size)
LineTagallocLineTag (U32 id)
void emitNewLine (U32 textStart)
AtombuildTextAtom (U32 start, U32 len, U32 left, U32 right, URL *url)
void emitTextToken (U32 textStart, U32 len)
void emitBitmapToken (Bitmap *bmp, U32 textStart, bool bitmapBreak)
void processEmitAtoms ()
AtomsplitAtomListEmit (Atom *list, U32 width)
void drawAtomText (bool sel, U32 start, U32 end, Atom *atom, Line *line, Point2I offset)
AtomfindHitAtom (const Point2I localCoords)
StyleallocStyle (Style *style)
void deleteChars (const U32 rangeStart, const U32 rangeEnd)
void copyToClipboard (const U32 rangeStart, const U32 rangeEnd)
bool isSelectionActive () const
void clearSelection ()
S32 getTextPosition (const Point2I &localPosition)
bool onAdd ()
 Called when this object is added to the scene.
bool onWake ()
 Called when this object is asked to wake up returns true if it's actually awake at the end.
void onSleep ()
 Called when this object is asked to sleep.
void onPreRender ()
 Do special pre-render processing.
void onRender (Point2I offset, const RectI &updateRect)
 Called when this control is to render itself.
void getCursorPositionAndColor (Point2I &cursorTop, Point2I &cursorBottom, ColorI &color)
void inspectPostApply ()
 Called after any property of the object is changed in the world editor.
void parentResized (const RectI &oldParentRect, const RectI &newParentRect)
 Called when this objects parent is resized.
bool onKeyDown (const GuiEvent &event)
 Happens when a key is depressed.
void onMouseDown (const GuiEvent &)
void onMouseDragged (const GuiEvent &)
void onMouseUp (const GuiEvent &)

Protected Attributes

bool mIsEditCtrl
U32mTabStops
U32 mTabStopCount
U32 mCurTabStop
F32 mAlpha
DataChunker mViewChunker
DataChunker mResourceChunker
LinemLineList
BitmapmBitmapList
BitmapRefmBitmapRefList
FontmFontList
LineTagmTagList
bool mDirty
StylemCurStyle
U32 mCurLMargin
U32 mCurRMargin
U32 mCurJustify
U32 mCurDiv
U32 mCurY
U32 mCurClipX
AtommLineAtoms
Atom ** mLineAtomPtr
AtommEmitAtoms
Atom ** mEmitAtomPtr
BitmapRef mSentinel
Line ** mLineInsert
BitmapRefmBlockList
U32 mScanPos
U32 mCurX
U32 mMaxY
URLmCurURL
URLmHitURL
U32 mCursorPosition
StringBuffer mTextBuffer
U32 mLineStart
S32 mMaxBufferSize
StringTableEntry mInitialText
bool mSelectionActive
U32 mSelectionStart
U32 mSelectionEnd
U32 mVertMoveAnchor
bool mVertMoveAnchorValid
S32 mSelectionAnchor
Point2I mSelectionAnchorDropped
Resource< GFontmFont
U32 mMinSensibleWidth
U32 mLineSpacingPixels
bool mAllowColorChars
SFXProfilemDeniedSound

Static Protected Attributes

static const U32 csmTextBufferGrowthSize

Private Types

typedef GuiControl Parent

Classes

struct  Atom
struct  Bitmap
struct  BitmapRef
struct  Font
struct  Line
struct  LineTag
struct  Style
struct  URL

Member Typedef Documentation

typedef GuiControl GuiMLTextCtrl::Parent [private]

Reimplemented from GuiControl.

Reimplemented in GuiMLTextEditCtrl.


Member Enumeration Documentation

Enumerator:
LeftJustify 
RightJustify 
CenterJustify 


Constructor & Destructor Documentation

GuiMLTextCtrl::GuiMLTextCtrl (  ) 

GuiMLTextCtrl::~GuiMLTextCtrl (  ) 


Member Function Documentation

U32 GuiMLTextCtrl::getNumChars (  )  const

U32 GuiMLTextCtrl::getText ( char *  pBuffer,
const U32  bufferSize 
) const

U32 GuiMLTextCtrl::getWrappedText ( char *  pBuffer,
const U32  bufferSize 
) const

const char* GuiMLTextCtrl::getTextContent (  ) 

void GuiMLTextCtrl::insertChars ( const char *  inputChars,
const U32  numInputChars,
const U32  position 
)

void GuiMLTextCtrl::setText ( const char *  textBuffer,
const U32  numChars 
)

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

void GuiMLTextCtrl::setAlpha ( F32  alpha  )  [inline]

bool GuiMLTextCtrl::setCursorPosition ( const   S32  ) 

void GuiMLTextCtrl::ensureCursorOnScreen (  ) 

void GuiMLTextCtrl::scrollToTag ( U32  id  ) 

void GuiMLTextCtrl::scrollToTop (  ) 

void GuiMLTextCtrl::scrollToBottom (  ) 

virtual void GuiMLTextCtrl::reflow (  )  [virtual]

GuiMLTextCtrl::DECLARE_CONOBJECT ( GuiMLTextCtrl   ) 

static void GuiMLTextCtrl::initPersistFields (  )  [static]

Register dynamic fields in a subclass of ConsoleObject.

See also:
addField(), addFieldV(), addDeprecatedField(), addGroup(), endGroup()

Reimplemented from GuiControl.

Reimplemented in GuiMLTextEditCtrl.

void GuiMLTextCtrl::setScriptValue ( const char *  value  )  [virtual]

Sets the value of the variable bound to this object.

Reimplemented from GuiControl.

const char* GuiMLTextCtrl::getScriptValue (  )  [virtual]

Returns the value of the variable bound to this object.

Reimplemented from GuiControl.

static char* GuiMLTextCtrl::stripControlChars ( const char *  inString  )  [static]

void GuiMLTextCtrl::freeLineBuffers (  )  [protected]

void GuiMLTextCtrl::freeResources (  )  [protected]

Bitmap* GuiMLTextCtrl::allocBitmap ( const char *  bitmapName,
U32  bitmapNameLen 
) [protected]

Font* GuiMLTextCtrl::allocFont ( const char *  faceName,
U32  faceNameLen,
U32  size 
) [protected]

LineTag* GuiMLTextCtrl::allocLineTag ( U32  id  )  [protected]

void GuiMLTextCtrl::emitNewLine ( U32  textStart  )  [protected]

Atom* GuiMLTextCtrl::buildTextAtom ( U32  start,
U32  len,
U32  left,
U32  right,
URL url 
) [protected]

void GuiMLTextCtrl::emitTextToken ( U32  textStart,
U32  len 
) [protected]

void GuiMLTextCtrl::emitBitmapToken ( Bitmap bmp,
U32  textStart,
bool  bitmapBreak 
) [protected]

void GuiMLTextCtrl::processEmitAtoms (  )  [protected]

Atom* GuiMLTextCtrl::splitAtomListEmit ( Atom list,
U32  width 
) [protected]

void GuiMLTextCtrl::drawAtomText ( bool  sel,
U32  start,
U32  end,
Atom atom,
Line line,
Point2I  offset 
) [protected]

Atom* GuiMLTextCtrl::findHitAtom ( const Point2I  localCoords  )  [protected]

Style* GuiMLTextCtrl::allocStyle ( Style style  )  [protected]

void GuiMLTextCtrl::deleteChars ( const U32  rangeStart,
const U32  rangeEnd 
) [protected]

void GuiMLTextCtrl::copyToClipboard ( const U32  rangeStart,
const U32  rangeEnd 
) [protected]

bool GuiMLTextCtrl::isSelectionActive (  )  const [protected]

void GuiMLTextCtrl::clearSelection (  )  [protected]

S32 GuiMLTextCtrl::getTextPosition ( const Point2I localPosition  )  [protected]

bool GuiMLTextCtrl::onAdd (  )  [protected, virtual]

Called when this object is added to the scene.

Reimplemented from GuiControl.

bool GuiMLTextCtrl::onWake (  )  [protected, virtual]

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

Reimplemented from GuiControl.

Reimplemented in GuiMLTextEditCtrl.

void GuiMLTextCtrl::onSleep (  )  [protected, virtual]

Called when this object is asked to sleep.

Reimplemented from GuiControl.

void GuiMLTextCtrl::onPreRender (  )  [protected, virtual]

Do special pre-render processing.

Reimplemented from GuiControl.

void GuiMLTextCtrl::onRender ( Point2I  offset,
const RectI updateRect 
) [protected, virtual]

Called when this control is to render itself.

Parameters:
offset The location this control is to begin rendering
updateRect The screen area this control has drawing access to

Reimplemented from GuiControl.

Reimplemented in GuiMLTextEditCtrl.

void GuiMLTextCtrl::getCursorPositionAndColor ( Point2I cursorTop,
Point2I cursorBottom,
ColorI color 
) [protected]

void GuiMLTextCtrl::inspectPostApply (  )  [protected, virtual]

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

See also:
inspectPreApply

Reimplemented from GuiControl.

void GuiMLTextCtrl::parentResized ( const RectI oldParentRect,
const RectI newParentRect 
) [protected, virtual]

Called when this objects parent is resized.

Parameters:
oldParentRect The old rectangle of the parent object
newParentRect The new rectangle of the parent object

Reimplemented from GuiControl.

bool GuiMLTextCtrl::onKeyDown ( const GuiEvent event  )  [protected, virtual]

Happens when a key is depressed.

Parameters:
event Event descriptor (which contains the key)

Reimplemented from GuiControl.

Reimplemented in GuiMLTextEditCtrl.

void GuiMLTextCtrl::onMouseDown ( const GuiEvent  )  [protected, virtual]

Reimplemented from GuiControl.

void GuiMLTextCtrl::onMouseDragged ( const GuiEvent  )  [protected, virtual]

Reimplemented from GuiControl.

void GuiMLTextCtrl::onMouseUp ( const GuiEvent  )  [protected, virtual]

Reimplemented from GuiControl.

void GuiMLTextCtrl::setSelectionStart ( U32  start  )  [inline]

void GuiMLTextCtrl::setSelectionEnd ( U32  end  )  [inline]

void GuiMLTextCtrl::setSelectionActive ( bool  active  )  [inline]

S32 GuiMLTextCtrl::getCursorPosition (  )  [inline]


Member Data Documentation

const U32 GuiMLTextCtrl::csmTextBufferGrowthSize [static, protected]