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

#include <IStaticTextLineBreaker.h>

Inheritance diagram for IStaticTextLineBreaker:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ISTATICTEXTLINEBREAKER }
 

Public Member Functions

virtual void CreateLineBreaks (const PMString &stringToBreak, const PMReal maxLineWidth, const InterfaceFontInfo &fontInfo)=0
 
virtual PMString GetNthLine (int32 lineIndex) const =0
 
virtual PMPoint GetNthLineSize (int32 lineIndex) const =0
 
virtual int32 GetNumLines () const =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 is used to break a long string into multiple lines. It's mainly used by multiline static text widgets.

Member Function Documentation

virtual void IStaticTextLineBreaker::CreateLineBreaks (const PMStringstringToBreak,
const PMReal maxLineWidth,
const InterfaceFontInfofontInfo 
)
pure virtual

Breaks the string into a set of lines, based on the given max line width and the font.

Parameters
stringToBreakThe string we're breaking into lines.
maxLineWidthThe max line width.
fontInfothe font to use in computing text width.
virtual PMString IStaticTextLineBreaker::GetNthLine (int32 lineIndex) const
pure virtual

Gets the nth line from the last call to CreateLineBreaks

Parameters
lineIndexwhich line to return
Returns
the string for the desired line.
virtual PMPoint IStaticTextLineBreaker::GetNthLineSize (int32 lineIndex) const
pure virtual

Gets the width and height for the nth line from the last call to CreateLineBreaks

Parameters
lineIndexwhich line to return
Returns
the point describing the width and height of the desired line
virtual int32 IStaticTextLineBreaker::GetNumLines () const
pure virtual

Gets the line count from the last call to CreateLineBreaks

Returns
the count of lines