InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IStoryService Class Referenceabstract
Inheritance diagram for IStoryService:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ISTORYSERVICE }
 

Public Member Functions

virtual int32 GetRangeOfDrawGlyphs (UID storyThreadDict, int32 storyThreadKey, ITextLines *textLines, TextIndex rangeStart, int32 textLength, int32 *glyphArray, float *widths, WideString &text, PMReal *rangeWidth, IFontMgr::FontStyleBits &fontStyle, IDrawingStyle::CapitalizeMode &capMode, bool16 showInvisibles, int32 maxSizeSAllowed, bool16 returnFullText)=0
 
virtual IFontInstanceQueryDisplayFontInstanceForCurrentChunk ()=0
 
virtual IPMFontQueryDisplayFontForCurrentChunk ()=0
 
virtual int32 * GetCurrentInvisibles ()=0
 
virtual float * GetCurrentInvisiblesWidths ()=0
 
virtual float * GetCurrentInvisiblesYAjustments ()=0
 
virtual int32 GetCurrentInvisiblesLength ()=0
 
virtual PMReal SumCharWidths (float *widths, int32 numOfCharactersIn)=0
 
virtual void GetStoryContent (UID storyThreadDict, int32 storyThreadKey, TextIndex lineStart, int32 textLength, WideString &lineText)=0
 
virtual TextIndex GetStoryThreadIndex (UID storyThreadDict, int32 storyThreadKey, TextIndex inTextIndex)=0
 
virtual TextIndex GetStoryThreadEnd (UID storyThreadDict, int32 storyThreadKey, TextIndex inTextIndex)=0
 
virtual TextIndex GetTextLineIndex (UID storyThreadDict, int32 storyThreadKey, TextIndex inTextIndex)=0
 
virtual IFontMgr::FontStyleBits GetFontStyle (IDrawingStyle *drawStyle)=0
 
virtual Text::GlyphID ConvertToGlyphUsingPlatformEncoding (IFontInstance *fontInstance, IPMFont *font, UTF32TextChar character, PMReal *glyphWidth)=0
 
virtual void ClearGlyphCache ()=0
 
virtual int32 GetRangeOfDrawGlyphs (UID storyThreadDict, int32 storyThreadKey, ITextLines *textLines, TextIndex rangeStart, int32 textLength, int32 *glyphArray, float *widths, PMReal *rangeWidth, IFontMgr::FontStyleBits &fontStyle, IDrawingStyle::CapitalizeMode &capMode, bool16 showInvisibles, int32 maxSizeSAllowed, bool16 returnFullText)=0
 
virtual void SetCurrentLineDescription (LineDescription *lineDescription)=0
 
virtual LineDescriptionGetCurrentLineDescription ()=0
 
virtual void SetCurrentRunDescription (const RunDescription *runDescription)=0
 
virtual const RunDescriptionGetCurrentRunDescription ()=0
 
virtual void SetInvisiblesOffset (float offset)=0
 
virtual float GetInvisiblesOffset ()=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Member Function Documentation

virtual void IStoryService::ClearGlyphCache ()
pure virtual

Call to clear the cached glyph data. Return void

virtual Text::GlyphID IStoryService::ConvertToGlyphUsingPlatformEncoding (IFontInstancefontInstance,
IPMFontfont,
UTF32TextChar character,
PMRealglyphWidth 
)
pure virtual

This is used so when all other attempts to convert a character code to a glyph fail to provide a valid glyph. Typically this is because we have a symbol font or some other font that is encoded in the text model with platform encoding. Return glyph id coorsponding to character code passed in (character)

Parameters
fontInstanceto get glyph width from
fontFont to ask for a gyph from
characterThe character code to convert to a glyph
glyphWidthwidth of glyph is returned in this variable.
virtual int32 IStoryService::GetRangeOfDrawGlyphs (UID storyThreadDict,
int32 storyThreadKey,
ITextLinestextLines,
TextIndex rangeStart,
int32 textLength,
int32 * glyphArray,
float * widths,
WideStringtext,
PMRealrangeWidth,
IFontMgr::FontStyleBits & fontStyle,
IDrawingStyle::CapitalizeModecapMode,
bool16 showInvisibles,
int32 maxSizeSAllowed,
bool16 returnFullText 
)
pure virtual

Given a range of indexes provide an array of glyphs to display in the story and galley views. This version will also return unicode text values for the range and is less efficient than the version that does not. Return number of glyphs

Parameters
storyThreadDictdict of story thread for range
storyThreadKeythread key to get range for
textLinesa pointer to the ITextLines of the view to get the glyphs for. Used to get display font etc.
rangeStartstart text index to get glyphs for.
textLengthnumber of characters to get glyphs for.
glyphArraypreallocated array to return glyphs in.
widthspreallocated array to return glyph width values in.
texta WideString where the unicode values for the range are returned.
rangeWidthdraw width of all glyphs (can pass nil if don't care it will be more efficient).
fontStyleif not "returnFullText" this returns the display font style for this range of text (see IFontMgr)
capModeif not "returnFullText" this returns the cap mode for this range of text (see IDrawingStyle)
showInvisiblesPass kTrue to get the routine to calculate hidden character array. Call GetCurrentInvisibles() and GetCurrentInvisiblesWidths() to get array values back after calling this routine
maxSizeSAllowedmaximum number of enteries there is space allocated for in the glyphArray param
returnFullTextkTrue to ignore run information and return a the full range requested regardless.
virtual int32 IStoryService::GetRangeOfDrawGlyphs (UID storyThreadDict,
int32 storyThreadKey,
ITextLinestextLines,
TextIndex rangeStart,
int32 textLength,
int32 * glyphArray,
float * widths,
PMRealrangeWidth,
IFontMgr::FontStyleBits & fontStyle,
IDrawingStyle::CapitalizeModecapMode,
bool16 showInvisibles,
int32 maxSizeSAllowed,
bool16 returnFullText 
)
pure virtual

Given a range of indexes provide an array of glyphs to display in the story and galley views. This version is more efficient than the version which also will return the model unicode values. Return number of glyphs

Parameters
storyThreadDictdict of story thread for range
storyThreadKeythread key to get range for
textLinesa pointer to the ITextLines of the view to get the glyphs for. Used to get display font etc.
rangeStartstart text index to get glyphs for.
textLengthnumber of characters to get glyphs for.
glyphArraypreallocated array to return glyphs in.
widthspreallocated array to return glyph width values in.
rangeWidthdraw width of all glyphs (can pass nil if don't care it will be more efficient).
fontStyleif not "returnFullText" this returns the display font style for this range of text (see IFontMgr)
capModeif not "returnFullText" this returns the cap mode for this range of text (see IDrawingStyle)
showInvisiblesPass kTrue to get the routine to calculate hidden character array. Call GetCurrentInvisibles() and GetCurrentInvisiblesWidths() to get array values back after calling this routine
maxSizeSAllowedmaximum number of enteries there is space allocated for in the glyphArray param
returnFullTextkTrue to ignore run information and return a the full range requested regardless.