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

Public Types

enum  { kDefaultIID = IID_ICALCULATEDTEXT }
 

Public Member Functions

virtual ICalculatedTextResultNewCalculatedText (const IDrawingStyle *baseStyle, void *data=nil) const =0
 
virtual ICalculatedTextResultNewApproxCalculatedText (const IDrawingStyle *baseStyle, void *data=nil) const =0
 
virtual void GetCalculatedTextStringForStoryEditor (WideString &ws, void *data=nil) const =0
 
virtual bool16 ResetCalculatedText (void *data, bool16 damageIfChanged=kTrue) const =0
 
virtual bool16 Recalculate () const =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 ICalculatedText::GetCalculatedTextStringForStoryEditor (WideStringws,
void * data = nil 
) const
pure virtual

Get a string representing the calculated text as it should appear in the story editor.

Note
Should only be called by the manager of this object (e.g. the table that translates (this) UID into a number or string)
Parameters
data- private data, if any, for the specific type of calculated text
ws- will be filled out with the string.
See Also
NewCalculatedText.
virtual ICalculatedTextResult* ICalculatedText::NewApproxCalculatedText (const IDrawingStylebaseStyle,
void * data = nil 
) const
pure virtual

Fill out the string with the approximate calculated text. This is called by the composer (or anyone else) that is only interested in an approximation of the calculated text. It is a way to improve efficiency at the expense of accuracy.

Parameters
baseStyle- the style applied to the character marking this as calculated text.
data- private data, if any, for the specific type of calculated text
Returns
An object representing the value of the calculated text.
Note
This method can be used to approximate the calculated text. If not, it's equivalent to QueryCalculatedText().
The composer calls this, for instance, at line breaking time. It will use the width of this text to determine line breaks. Later during glyph generation, if the true text is not the same width the line is expanded or compressed to fit.
For example, footnotes that restart every page do this.
virtual ICalculatedTextResult* ICalculatedText::NewCalculatedText (const IDrawingStylebaseStyle,
void * data = nil 
) const
pure virtual

Fill out the string with the calculated text result. Called by anyone that wants the true result of the calculation.

Parameters
baseStyle- the style applied to the character marking this as calculated text.
data- private data, if any, for the specific type of calculated text
Returns
An object representing the value of the calculated text.
See Also
QueryApproxCalculatedText.
virtual bool16 ICalculatedText::Recalculate () const
pure virtual

Tells the object to recalculate.

Returns
kTrue if the object's data changed.
Note
Should only be called by the manager of this object (e.g. the table that translates (this) UID into a number or string)
virtual bool16 ICalculatedText::ResetCalculatedText (void * data,
bool16 damageIfChanged = kTrue 
) const
pure virtual

ResetCalculatedText tells the object to invalidate its data.

Parameters
anydata associated with the reset (well-known between this object and its manager).
damageIfChangedtells the object to whether to damage its Wax or not when the data changes.
Returns
kFalse if the object was already damaged.
Note
Should only be called by the manager of this object (e.g. the table that translates (this) UID into a number or string)