TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
List of all members
iTextObject Struct Referenceabstract
Inheritance diagram for iTextObject:
iUnknown

General

virtual iGraphicsGetGraphics () const =0
 Get the graphics object that created the text object. {Property}. More...
 
virtual void SetDefaultFont (iFont *apFont)=0
 Set the default font used by the text object. {Property}. More...
 
virtual iFontGetDefaultFont () const =0
 Get the default font used by the text object. {Property}. More...
 
virtual void SetLoadFontCallback (iCallback *apLoadFontCallback)=0
 Set the load font callback used by the text object. {Property}. More...
 
virtual iCallbackGetLoadFontCallback () const =0
 Get the load font callback used by the text object. {Property}. More...
 
virtual void SetSize (const sVec2f &avSize)=0
 Set the size of the text object. {Property}. More...
 
virtual sVec2f GetSize () const =0
 Get the size of the text object. {Property}. More...
 
virtual void SetTruncation (eTextTruncation aType)=0
 Set the word truncation mode. {Property}. More...
 
virtual eTextTruncation GetTruncation () const =0
 Get the word truncation mode. {Property}. More...
 
virtual void SetTruncationText (const achar *aaszString)=0
 Set the truncation text. {Property}. More...
 
virtual const acharGetTruncationText () const =0
 Get the truncation text. {Property}. More...
 
virtual void SetTrimLeadingSpaces (tBool abTrimLeadingSpaces)=0
 Set whether to trim the leading spaces. {Property}. More...
 
virtual tBool GetTrimLeadingSpaces () const =0
 Get whether to trim the leading spaces. {Property}. More...
 
virtual void SetKerning (tBool abKerning)=0
 Set whether to use kerning. {Property}. More...
 
virtual tBool GetKerning () const =0
 Get whether to use kerning. {Property}. More...
 
virtual sVec2f GetTextSize () const =0
 Get the computed size of the text after layout. {Property}. More...
 
virtual void SetExpressionContext (iExpressionContext *apContext)=0
 Set the expression context used for the <expr> tags. {Property}. More...
 
virtual iExpressionContextGetExpressionContext () const =0
 Get the expression context used for the <expr> tags. {Property}. More...
 
virtual void Update ()=0
 Update. More...
 
virtual tBool Draw (iCanvas *apCanvas, const sRectf &aClippingRect)=0
 Draw the text object in the specified canvas. More...
 

Text occluders

virtual iTextOccluderAddOccluder (const sRectf &aRect, const Var &aUserData)=0
 Add a text occluder. More...
 
virtual tBool RemoveOccluder (tU32 anIndex)=0
 Remove the text occluder at the specified index. More...
 
virtual void ClearOccluders ()=0
 Removes all text occluders. More...
 
virtual tU32 GetNumOccluders () const =0
 Get number of occluders. {Property}. More...
 
virtual iTextOccluderGetOccluder (tU32 anIndex) const =0
 Get occluder from index. {Property}. More...
 

Text manipulation

virtual void SetText (const achar *aaszText)=0
 Set the text of the text object. {Property}. More...
 
virtual const acharGetText () const =0
 Get the text of the text object. {Property}. More...
 
virtual void AddText (const achar *aaszString)=0
 Add Text the the widget. More...
 
virtual void SetSelectionColor (sVec4f avColor)=0
 Set the selection background color. {Property}. More...
 
virtual sVec4f GetSelectionColor () const =0
 Get the selection background color. {Property}. More...
 
virtual cString GetSelectedString () const =0
 Get the selected string. {Property}. More...
 
virtual void ClearSelection ()=0
 Clear the current selection. More...
 
virtual void SelectRange (tU32 anBegin, tU32 anEnd)=0
 Select the specified word range. More...
 
virtual tU32 FindWordIndexFromPosition (sVec2f avPosition) const =0
 Find the index of the word nearest of the specified position. More...
 

Additional Inherited Members

- Public Member Functions inherited from iUnknown
virtual tBool IsOK () const =0
 Check if the object is valid. More...
 
virtual tI32 AddRef ()=0
 Signal that one more reference of the object has been created. More...
 
virtual tI32 Release ()=0
 Release a reference of the object. More...
 
virtual void DeleteThis ()=0
 Bypass any reference counting and delete this object. More...
 
virtual void Invalidate ()=0
 Invalidate the object. More...
 
virtual iUnknownQueryInterface (const tUUID &aIID)=0
 Query an interface. More...
 
virtual void ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0
 Fill a UUID list containing the UUIDs of the implemented interfaces. More...
 
virtual tI32 SetNumRefs (tI32 anNumRefs)=0
 Set the reference counter directly. More...
 
virtual tI32 GetNumRefs () const =0
 Get the number of references to this object. More...
 

Member Function Documentation

virtual iGraphics* GetGraphics ( ) const
pure virtual

Get the graphics object that created the text object. {Property}.

virtual void SetDefaultFont ( iFont apFont)
pure virtual

Set the default font used by the text object. {Property}.

Remarks
If an invalid font is passed the default font of the graphics's instance is used.
virtual iFont* GetDefaultFont ( ) const
pure virtual

Get the default font used by the text object. {Property}.

virtual void SetLoadFontCallback ( iCallback apLoadFontCallback)
pure virtual

Set the load font callback used by the text object. {Property}.

Remarks
The callback's signature: iFont* LoadFont(iHString* ahspFontName)
If none are provided the default font will be used everywhere.
virtual iCallback* GetLoadFontCallback ( ) const
pure virtual

Get the load font callback used by the text object. {Property}.

virtual void SetSize ( const sVec2f avSize)
pure virtual

Set the size of the text object. {Property}.

virtual sVec2f GetSize ( ) const
pure virtual

Get the size of the text object. {Property}.

virtual void SetTruncation ( eTextTruncation  aType)
pure virtual

Set the word truncation mode. {Property}.

virtual eTextTruncation GetTruncation ( ) const
pure virtual

Get the word truncation mode. {Property}.

virtual void SetTruncationText ( const achar aaszString)
pure virtual

Set the truncation text. {Property}.

virtual const achar* GetTruncationText ( ) const
pure virtual

Get the truncation text. {Property}.

virtual void SetTrimLeadingSpaces ( tBool  abTrimLeadingSpaces)
pure virtual

Set whether to trim the leading spaces. {Property}.

virtual tBool GetTrimLeadingSpaces ( ) const
pure virtual

Get whether to trim the leading spaces. {Property}.

virtual void SetKerning ( tBool  abKerning)
pure virtual

Set whether to use kerning. {Property}.

virtual tBool GetKerning ( ) const
pure virtual

Get whether to use kerning. {Property}.

virtual sVec2f GetTextSize ( ) const
pure virtual

Get the computed size of the text after layout. {Property}.

virtual void SetExpressionContext ( iExpressionContext apContext)
pure virtual

Set the expression context used for the <expr> tags. {Property}.

virtual iExpressionContext* GetExpressionContext ( ) const
pure virtual

Get the expression context used for the <expr> tags. {Property}.

virtual void Update ( )
pure virtual

Update.

virtual tBool Draw ( iCanvas apCanvas,
const sRectf aClippingRect 
)
pure virtual

Draw the text object in the specified canvas.

virtual iTextOccluder* AddOccluder ( const sRectf aRect,
const Var aUserData 
)
pure virtual

Add a text occluder.

virtual tBool RemoveOccluder ( tU32  anIndex)
pure virtual

Remove the text occluder at the specified index.

virtual void ClearOccluders ( )
pure virtual

Removes all text occluders.

virtual tU32 GetNumOccluders ( ) const
pure virtual

Get number of occluders. {Property}.

virtual iTextOccluder* GetOccluder ( tU32  anIndex) const
pure virtual

Get occluder from index. {Property}.

virtual void SetText ( const achar aaszText)
pure virtual

Set the text of the text object. {Property}.

virtual const achar* GetText ( ) const
pure virtual

Get the text of the text object. {Property}.

virtual void AddText ( const achar aaszString)
pure virtual

Add Text the the widget.

Remarks
Will push back and layout the desired string without processing the already-processed parts uselessly.
virtual void SetSelectionColor ( sVec4f  avColor)
pure virtual

Set the selection background color. {Property}.

virtual sVec4f GetSelectionColor ( ) const
pure virtual

Get the selection background color. {Property}.

virtual cString GetSelectedString ( ) const
pure virtual

Get the selected string. {Property}.

virtual void ClearSelection ( )
pure virtual

Clear the current selection.

virtual void SelectRange ( tU32  anBegin,
tU32  anEnd 
)
pure virtual

Select the specified word range.

virtual tU32 FindWordIndexFromPosition ( sVec2f  avPosition) const
pure virtual

Find the index of the word nearest of the specified position.

Returns
eInvalidHandle if no words can be found.