InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IGalleyInfoUtils Class Referenceabstract

#include <IGalleyInfoUtils.h>

Inheritance diagram for IGalleyInfoUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IGALLEYINFOUTILS }
 
enum  FitType {
  kDepthFit = 0, kWordCountFit, kLineCountFit, kPageCountFit,
  kGeometryFit, kCharacterFit, kDisableFit
}
 

Public Member Functions

virtual int32 StoryCountWords (ITextModel *textModel, TextIndex begin, TextIndex end)=0
 
virtual int32 StoryCountLines (ITextModel *textModel, TextIndex begin, TextIndex end)=0
 
virtual int32 StoryCountFit (ITextModel *textModel, PMReal *pctFilled=nil, FitType fitMethod=kDepthFit, PMReal *fractionalFitValue=nil)=0
 
virtual FitInformation StoryCountFit (ITextModel *textModel, FitType fitMethod)=0
 
virtual bool16 ToggleIdle (bool16 start=kTrue, IPMUnknown *pIdleLoc=nil)=0
 
virtual bool16 ShouldCountLine (IWaxLine **waxLine, IWaxIterator *waxIterator)=0
 
virtual PMReal StoryCountDepth (ITextModel *textModel, const StatsScope &scope)=0
 
virtual int32 GetTotalLines (void)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

This interface contains methods for calculating text statistic like amount of text overset, underset etc.

Member Function Documentation

virtual int32 IGalleyInfoUtils::GetTotalLines (void )
pure virtual

Get count for TotalLines that are possible inside textFrame

virtual bool16 IGalleyInfoUtils::ShouldCountLine (IWaxLine ** waxLine,
IWaxIteratorwaxIterator 
)
pure virtual

Returns whether a specific text line should be added to the line count when calling StoryCountLines() above.

Parameters
waxLineline to check if it should be counted
waxIteratoriterator used to get the waxline
Returns
kTrue if line should be counted.
virtual PMReal IGalleyInfoUtils::StoryCountDepth (ITextModeltextModel,
const StatsScopescope 
)
pure virtual

Returns the physical composed (layout view) on screen depth of a story or part of a story if a range is asked for which is not the entire story. The depth is returned in default InDesign units. This will return -1.0 if it was unable to calculate the depth for some reason.

Parameters
textModelstory to measure the depth of
beginfirst textindex to measure depth from.
Returns
end last TextIndex to measure depth to (if start and end are the total range of the story then the depth of the complete story is measured).
virtual int32 IGalleyInfoUtils::StoryCountFit (ITextModeltextModel,
PMRealpctFilled = nil,
FitType fitMethod = kDepthFit,
PMRealfractionalFitValue = nil 
)
pure virtual

Will calculate the how well the text fits based on several methods. Recommend that the routine returning FitInformation be used instead although this one is provided for legacy.

  1. kDepthFit calculate how well the text fits based on standalone text statistics settings (document setup)
  2. kWordCountFit using the settings in document setup calculate how close the fit is based on user defined fit word count
  3. kLineCountFit using the settings in document setup calculate how close the fit is based on user defined line count
  4. kPageFit using the setting in document setup calculate fit based on user defined page count.
  5. kGeometryFit calculate how well the text fits based on geometry
    Parameters
    textModelstory to measure the depth of
    pctFilledreturn parameter gives the total percentage fit 1.0 is totally fit smaller than 1.0 is a percentage
    fitMethodwhat type of fit calculation to perform
    canreturn a real value instead of a int32 in this parameter if more precision is needed
    Returns
    0 if totally fit, positive (num lines/words/pages over), negative (num lines/words/pages under).
virtual FitInformation IGalleyInfoUtils::StoryCountFit (ITextModeltextModel,
FitType fitMethod 
)
pure virtual

Will calculate the how well the text fits based on several methods. Returns better information than the above StoryCountFit routine.

  1. kDepthFit calculate how well the text fits based on standalone text statistics settings (document setup)
  2. kWordCountFit using the settings in document setup calculate how close the fit is based on user defined fit word count
  3. kLineCountFit using the settings in document setup calculate how close the fit is based on user defined line count
  4. kPageFit using the setting in document setup calculate fit based on user defined page count.
  5. kGeometryFit calculate how well the text fits based on geometry
    Parameters
    textModelstory to measure the depth of
    pctFilledreturn parameter gives the total percentage fit 1.0 is totally fit smaller than 1.0 is a percentage
    fitMethodwhat type of fit calculation to perform
    canreturn a real value instead of a int32 in this parameter if more precision is needed
    Returns
    a FitInformation class filled out. See comments on that class above
virtual int32 IGalleyInfoUtils::StoryCountLines (ITextModeltextModel,
TextIndex begin,
TextIndex end 
)
pure virtual

No longer used by InCopy was used in 2.x to calculate the number of lines has been replaced to use ITypeToolSuite::GetWordCountInfo instead and the new method is shared with InDesign.

Parameters
textModelstory to count lines of
begintext index to start counting lines at.
endtext index to stop counting lines at.
Returns
number of lines in the range requested.
virtual int32 IGalleyInfoUtils::StoryCountWords (ITextModeltextModel,
TextIndex begin,
TextIndex end 
)
pure virtual

No longer used by InCopy was used in 2.x to calculate the number of words has been replaced to use ITypeToolSuite::GetWordCountInfo instead and the new method is shared with InDesign.

Parameters
textModelstory to count words of
begintext index to start counting words at.
endtext index to stop counting words at.
Returns
number of words in the range requested.
virtual bool16 IGalleyInfoUtils::ToggleIdle (bool16 start = kTrue,
IPMUnknownpIdleLoc = nil 
)
pure virtual

Toggle the text statistics idle task on or off

Parameters
startkTrue to turn it on
pIdleLocan interface in the same boss as the idle task
Returns
kTrue doesn't seem to mean anything