Main Page   Modules   Compound List   File List   Compound Members   File Members  

STText methods


Functions

STStatus STTextNewEmpty (STText *oText, STTypeEnv iEnv)
 Creates a new STText - Text object. More...

STStatus STTextNew (STText *oText, STTypeEnv iEnv, utf16 *iChars, STCharCount iCharCount)
 Creates a new STText and assign text to it. More...

STStatus STTextNewCopy (STText *oText, STText iOldText)
 Duplicates an existing STText. More...

STStatus STTextDispose (STText iText)
 Destroys an existing STText object. More...

STStatus STTextSerialize (STText iText, int iFileDes)
 Writes an XML representation of the STText object environment to the output stream. More...

STStatus STTextDeserialize (STText *oText, int iFileDes)
 Reads a previously serialized STText object from an input stream and creates a new STText object. More...

STStatus STTextClear (STText iText)
 Restores the state of the STText to its initial state - removes all assigned text removes all layout attributes. More...

STStatus STTextSetMetrics (STText iText, STExtLineMetrics *iLineMetrics, STBaselines *iBaselines)
 Sets one or more STText metrics attributes. More...

STStatus STTextGetMetrics (STText iText, STExtLineMetrics **oLineMetrics, STBaselines **oBaselines)
 Retrieves previously set STText metrics attributes. More...

STStatus STTextSetControls (STText iText, STTextMask iMask, STDirection iDirection, STJustification iJustification, STFlushFactor iFlushFactor, STLanguage iLanguage, STFontFallbackPolicy iPolicy, STLayoutOptions iLayoutOptions)
 Sets one or more STText controls. More...

STStatus STTextGetControls (STText iText, STTextMask *oMask, STDirection *oDirection, STJustification *oJustification, STFlushFactor *oFlushFactor, STLanguage *oLanguage, STFontFallbackPolicy *oPolicy, STLayoutOptions *oLayoutOptions)
 Retrieves previously set STText controls. More...

STStatus STTextSetFontFallbacks (STText iText, STCount iFontCount, STFont *iFontArray)
 Specifies a list of fonts for displaying characters missing from fonts set by Style objects for the STText object. More...

STStatus STTextGetFontFallbacks (STText iText, STCount *oFontCount, STFont **oFontArray)
 Returns a list of substitution fonts set for this text layout object. More...

STStatus STTextCopyAttributes (STText iTo, STTextMask iMask, STText iFrom)
 Copies attributes set by STTextSetMetrics() and STTextSetControls() and the font fallback list from one STText to another. More...

STStatus STTextResetAttributes (STText iText, STTextMask iMask)
 Restores default STText attributes. More...

STStatus STTextSetText (STText iText, utf16 *iChars, STCharCount iCharCount)
 Assigns text to an STText object. More...

STStatus STTextGetText (STText iText, utf16 **oChars, STCharCount *oCharCount)
 Retrieves source text information from the STText object. More...

STStatus STTextGetStyledGlyphs (STText iText, STPosition iStartFrom, STCharCount iCharCount, STStyledGlyph **oGlyphs, STCount *oGlyphCount)
 Retrieves an array of styled glyphs that correspond to a range of logical text from a text object. More...

STStatus STLineGetStyledGlyphs (STLine iLine, STPosition iPosition, STCharCount iCharCount, STStyledGlyph **oGlyphs, STCount *oGlyphCount)
 Retrieves an array of styled glyphs that correspond to a range of logical text from a line object. More...

STStatus STTextUpdate (STText iText, STTextChanged iChange, STPosition iTextOffset, STCharCount iTextLength)
 Informs the STText object that the text has been inserted or deleted. More...

STStatus STTextSetStyle (STText iText, STStyle iStyle, STPosition iFirstChar, STCharCount iCharCount)
 Assigns a Style to a sequence of characters of an STText object. More...

STStatus STTextGetStyle (STText iText, STPosition iPosition, STStyle *oStyle, STPosition *oFirstChar, STCharCount *oCharCount)
 Returns a copy of a Style object assigned to character at offset iTextOffset in the STText object. More...

STStatus STTextGetCommonStyle (STText iText, STPosition iPosition, STCharCount iCharCount, STStyle *oStyle)
 Creates a new Style object that represents all common style characteristics of a set of characters in an STText. More...

STStatus STTextAugmentStyle (STText iText, STPosition iPosition, STCharCount iCharCount, STStyle iStyle)
 Attributes in the styles assigned to the iText object from iPosition to iPosition + iCharCount are replaced if present, or added if not, with style attributes set in the iStyle object. More...

STStatus STTextOverwriteStyle (STText iText, STPosition iPosition, STCharCount iCharCount, STStyle iStyle)
 All attributes set in the styles assigned to the iText object from iPosition to iPosition + iCharCount that are also set in the iStyle object are replaced with style attributes from iStyle object. More...

STStatus STTextUnderwriteStyle (STText iText, STPosition iPosition, STCharCount iCharCount, STStyle iStyle)
 All attributes not set in the styles assigned to the iText object from iPosition to iPosition + iCharCount but set in the iStyle object are replaced with style attributes from iStyle object. More...

STStatus STTextFindMissingChars (STText iText, STCount *oSegCount, STPosition **oSegOffset, STCharCount **oSegLength, STFont **oFontArray)
 Finds all text segments that contain missing characters and returns font IDs for the substituted fonts used to render these segments. More...


Function Documentation

STStatus STLineGetStyledGlyphs STLine    iLine,
STPosition    iPosition,
STCharCount    iCharCount,
STStyledGlyph **    oGlyphs,
STCount   oGlyphCount
 

Retrieves an array of styled glyphs that correspond to a range of logical text from a line object.

ST allocates an array of styled glyphs and it is the responsibility of the caller to free the memory.

Parameters:
iLine  a text object
iPosition  index of the first character or ST_BEGINNING
iCharCount  number of characters in the range or ST_ALL
oGlyphs  array of styled glyphs
oGlyphCount  number of styled glyphs
Returns:
STStatus

STStatus STTextAugmentStyle STText    iText,
STPosition    iPosition,
STCharCount    iCharCount,
STStyle    iStyle
 

Attributes in the styles assigned to the iText object from iPosition to iPosition + iCharCount are replaced if present, or added if not, with style attributes set in the iStyle object.

If necessary iText styles are split and new styles created and assigned to the text object.

Parameters:
iText  a text object
iPosition  offset of the first character
iCharCount  number of characters
iStyle  style attributes from this style are used

STStatus STTextClear STText    iText
 

Restores the state of the STText to its initial state - removes all assigned text removes all layout attributes.

  • * -
Parameters:
iText  STText to be cleared
Returns:
STStatus

STStatus STTextCopyAttributes STText    iTo,
STTextMask    iMask,
STText    iFrom
 

Copies attributes set by STTextSetMetrics() and STTextSetControls() and the font fallback list from one STText to another.

Parameters:
iTo  destination STText
iMask  bitmask of attributes to copy
iFrom  source STText
return STStatus

STStatus STTextDeserialize STText   oText,
int    iFileDes
 

Reads a previously serialized STText object from an input stream and creates a new STText object.

Parameters:
oText  new STText object
iFileDes  file descriptor of an open file
Returns:
STStatus

STStatus STTextDispose STText    iText
 

Destroys an existing STText object.

Parameters:
iText  STText object to be destroyed

STStatus STTextFindMissingChars STText    iText,
STCount   oSegCount,
STPosition **    oSegOffset,
STCharCount **    oSegLength,
STFont **    oFontArray
 

Finds all text segments that contain missing characters and returns font IDs for the substituted fonts used to render these segments.

This function allocates memory for three arrays (oSegOffset, oSegLength, and oFontArray) and the caller is supposed to free it.

Parameters:
iText  STText object
oSegCount  number of segments with missing characters is stored here oSegOffset, oSegLength, and oFontArray arrays contain oSegCount elements
oSegOffset  array of offsets to first characters in segments with missing characters
oSegLength  number of characters in each segment
oFontArray  array of font IDs that were substituted for the default fonts
Returns:
STStatus

STStatus STTextGetCommonStyle STText    iText,
STPosition    iPosition,
STCharCount    iCharCount,
STStyle   oStyle
 

Creates a new Style object that represents all common style characteristics of a set of characters in an STText.

Parameters:
iText  STText
iPosition  offset of the character being queried
iCharCount  number of characters being queried
oStyle  pointer to the Style object is returned here
return STStatus

STStatus STTextGetControls STText    iText,
STTextMask   oMask,
STDirection   oDirection,
STJustification   oJustification,
STFlushFactor   oFlushFactor,
STLanguage   oLanguage,
STFontFallbackPolicy   oPolicy,
STLayoutOptions   oLayoutOptions
 

Retrieves previously set STText controls.

Parameters:
iText  STText object
oMask  Pointer to bitmask which will be set to the OR'ed together bitflags indicating which fields in the STText object have been set by the client application
oDirection  text directionality
oJustification  text justification
oFlushFactor  text alignment
oLanguage  text language
oPolicy  font fallback policy
oLayoutOptions  layout options
Returns:
STStatus

STStatus STTextGetFontFallbacks STText    iText,
STCount   oFontCount,
STFont **    oFontArray
 

Returns a list of substitution fonts set for this text layout object.

This function allocates memory for the array of font IDs, and the caller is supposed to free it.

Parameters:
iText  STText object
oFontCount  number of fonts
oFontArray  font IDs are stored in this array
Returns:
STStatus

STStatus STTextGetMetrics STText    iText,
STExtLineMetrics **    oLineMetrics,
STBaselines **    oBaselines
 

Retrieves previously set STText metrics attributes.

Parameters:
iText  STText object
oTextWidth  previously set text width is stored here
oLineMetrics  returns a pointer to previously set line metrics structure or NULL if none was set
oBaselines  returns a pointer to previously set baselines array or NULL if none was set
Returns:
STStatus

STStatus STTextGetStyle STText    iText,
STPosition    iPosition,
STStyle   oStyle,
STPosition   oFirstChar,
STCharCount   oCharCount
 

Returns a copy of a Style object assigned to character at offset iTextOffset in the STText object.

The caller is responsible for calling the Style's destructor when it is no longer needed.

Parameters:
iText  STText
iPosition  offset of the character being queried
oStyle  pointer to the Style object returned here
oFirstChar  offset of the first character belonging to the Style
oCharCount  number of character in the Style
return STStatus

STStatus STTextGetStyledGlyphs STText    iText,
STPosition    iStartFrom,
STCharCount    iCharCount,
STStyledGlyph **    oGlyphs,
STCount   oGlyphCount
 

Retrieves an array of styled glyphs that correspond to a range of logical text from a text object.

ST allocates an array of styled glyphs and it is the responsibility of the caller to free the memory.

Parameters:
iText  a text object
iStartFrom  index of the first character or ST_BEGINNING
iCharCount  number of characters in the range or ST_ALL
oGlyphs  array of styled glyphs
oGlyphCount  number of styled glyphs
Returns:
STStatus

STStatus STTextGetText STText    iText,
utf16 **    oChars,
STCharCount   oCharCount
 

Retrieves source text information from the STText object.

Parameters:
iText  STText object
oChars  pointer to the character array
oCharCount  number of characters
return STStatus

STStatus STTextNew STText   oText,
STTypeEnv    iEnv,
utf16   iChars,
STCharCount    iCharCount
 

Creates a new STText and assign text to it.

Parameters:
oText  points to the newly created STText object
iEnv  STTypeEnv object
iChars  a pointer to the beginning of a paragraph of text
iCharCount  number of characters in a paragraph of text

STStatus STTextNewCopy STText   oText,
STText    iOldText
 

Duplicates an existing STText.

Parameters:
oText  points to the newly created STText object
iOldText  original STText object

STStatus STTextNewEmpty STText   oText,
STTypeEnv    iEnv
 

Creates a new STText - Text object.

STText is an opaque object that represents a unit of text and styles associated with it.

STText object does not duplicate source text, instead it stores pointer to it. It is the user's responsibility to maintain the source text buffer, insert and remove text from it and notify STText of it by calling STTextChangeText.

STText uses coordinates relative to the upper-left corner of its typographic bounding box.

STText consists of one or more lines of text (STLine object.) A line of text is an atomic displayable unit of text in ST.

Styles (STStyle object) are assigned to STText. If none are assigned a default style is taken from STTypeEnv.

STText has several attributes:

  • Width
  • Global Direction
  • Justification
  • Alignment
  • Language
Parameters:
oText  pointer to the newly created STText is stored there
iEnv  STTypeEnv object

STStatus STTextOverwriteStyle STText    iText,
STPosition    iPosition,
STCharCount    iCharCount,
STStyle    iStyle
 

All attributes set in the styles assigned to the iText object from iPosition to iPosition + iCharCount that are also set in the iStyle object are replaced with style attributes from iStyle object.

If necessary iText styles are split and new styles created and assigned to the text object.

Parameters:
iText  a text object
iPosition  offset of the first character
iCharCount  number of characters
iStyle  style attributes from this style are used

STStatus STTextResetAttributes STText    iText,
STTextMask    iMask
 

Restores default STText attributes.

Parameters:
iText  STText
iMask  bitmask of attributes to copy
return STStatus

STStatus STTextSerialize STText    iText,
int    iFileDes
 

Writes an XML representation of the STText object environment to the output stream.

Parameters:
iText  STText object
iFileDes  file descriptor of an open file
Returns:
STStatus

STStatus STTextSetControls STText    iText,
STTextMask    iMask,
STDirection    iDirection,
STJustification    iJustification,
STFlushFactor    iFlushFactor,
STLanguage    iLanguage,
STFontFallbackPolicy    iPolicy,
STLayoutOptions    iLayoutOptions
 

Sets one or more STText controls.

Parameters:
iText  STText object
iMask  set of bitflags OR'ed together to indicate which fields in the STText object are to be set to the values of the following parameters
iDirection  specifies text directionality or CDirectionNotSet
iJustification  specifies text justification or CJustificationNotSet
iFlushFactor  specifies text alignment or CFlushFactorNotSet
iLanguage  specifies text language or CLanguageNotSet
iPolicy  specifies font fallback policy or CFontFallbackPolicyNotSet
Returns:
STStatus

STStatus STTextSetFontFallbacks STText    iText,
STCount    iFontCount,
STFont   iFontArray
 

Specifies a list of fonts for displaying characters missing from fonts set by Style objects for the STText object.

The order of fonts in the list matters: the search starts from the first font in the list and continues until all missing characters are found.

Parameters:
iText  STText object
iFontCount  number of fonts in the array
iFontArray  array of font IDs
Returns:
STStatus

STStatus STTextSetMetrics STText    iText,
STExtLineMetrics   iLineMetrics,
STBaselines   iBaselines
 

Sets one or more STText metrics attributes.

STText itself does not use any of these attributes but all lines derived from an STText object inherit them.

Parameters:
iText  STText object
iTextWidth  width of text lines in typographic points (1 point = 1/72 inch) or CWidthNotSet
iLineMetrics  line metrics imposed on lines of text or NULL
iBaselines  baselines imposed on lines of text or NULL
Returns:
STStatus

STStatus STTextSetStyle STText    iText,
STStyle    iStyle,
STPosition    iFirstChar,
STCharCount    iCharCount
 

Assigns a Style to a sequence of characters of an STText object.

STText creates a copy of the Style by calling its copy constructor, that it deallocates when STText's destructor is called.

Parameters:
iText  STText object
iStyle  Style object
iFirstChar  the first character that iStyle applies to
iCharCount  number of characters iStyle applies to
return STStatus

STStatus STTextSetText STText    iText,
utf16   iChars,
STCharCount    iCharCount
 

Assigns text to an STText object.

STText object does not create a private copy of this text, it keeps a pointer to it, so it is responsibility of the caller to maintain the text buffer, insert and delete text from it, etc.

Parameters:
iText  STText object
iChars  a pointer to the beginning of a paragraph of text
iCharCount  number of characters in a paragraph of text
return STStatus

STStatus STTextUnderwriteStyle STText    iText,
STPosition    iPosition,
STCharCount    iCharCount,
STStyle    iStyle
 

All attributes not set in the styles assigned to the iText object from iPosition to iPosition + iCharCount but set in the iStyle object are replaced with style attributes from iStyle object.

If necessary iText styles are split and new styles created and assigned to the text object.

Parameters:
iText  a text object
iPosition  offset of the first character
iCharCount  number of characters
iStyle  style attributes from this style are used

STStatus STTextUpdate STText    iText,
STTextChanged    iChange,
STPosition    iTextOffset,
STCharCount    iTextLength
 

Informs the STText object that the text has been inserted or deleted.

Parameters:
iText  STText object
iChange  notifies STText whether characters were inserted or removed
iTextOffset  position where text has been inserted or deleted
iTextLength  number of added or removed characters
return STStatus


Generated on Thu Mar 20 23:35:53 2003 for Standard Type Services by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001