Mako 7.5.0 API
Loading...
Searching...
No Matches
JawsMako::ILayoutParagraph Class Referenceabstract

A paragraph, consisting of a number of runs of content. More...

#include <layout.h>

Inheritance diagram for JawsMako::ILayoutParagraph:

Public Types

enum  eHorizontalAlignment { eHALeft , eHACenter , eHARight , eHAJustified }
 Horizontal alignment or justification for the paragraph. More...
 

Public Member Functions

virtual ILayoutParagraphPtr clone () const =0
 Clone the paragraph.
 
virtual void addRun (const ILayoutRunPtr &run)=0
 Add a run to the end of the paragraph.
 
virtual const CLayoutRunVect & getRuns () const =0
 Get the runs present in this paragraph.
 
virtual eHorizontalAlignment getHorizontalAlignment () const =0
 Get the horizontal alignment for this paragraph.
 
virtual void setSpacing (double spacing, bool before=false)=0
 Set the paragraph spacing.
 
virtual double getSpacing (bool before=false) const =0
 Get the paragraph spacing.
 
virtual void setLeading (double leading)=0
 Set the leading (line spacing).
 
virtual double getLeading () const =0
 Get the leading (line spacing).
 
virtual void setDefaultFont (const ILayoutFontPtr &defaultFont, bool exact=true)=0
 Set an ILayoutFont instance to select a default font for the the paragraph, or nullptr to clear the default.
 
virtual void setDefaultFont (const IDOMFontOpenTypePtr &defaultFont, uint32 defaultFontIndex)=0
 Set an the default font for the the paragraph, or nullptr to clear the default.
 
virtual const IDOMFontOpenTypePtr & getDefaultFont () const =0
 Get the default font for the paragraph.
 
virtual uint32 getDefaultFontIndex () const =0
 Get the font index within the default font file.
 
virtual void setDefaultFontSize (double defaultFontSize)=0
 Set the default font size of the paragraph.
 
virtual double getDefaultFontSize () const =0
 Get the default font size on DOM units.
 
virtual void setDefaultColor (const IDOMColorPtr &defaultColor)=0
 Set a default color for the paragraph, or nullptr to clear the default.
 
virtual const IDOMColorPtr & getDefaultColor () const =0
 Get the default color for the paragraph.
 
- Public Member Functions inherited from IRCObject
virtual void addRef () const =0
 Increases the reference count of the actual object pointed to. This would take place during an assignment or copying.
 
virtual bool decRef () const =0
 Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to.
 
virtual int32 getRefCount () const =0
 Retrieve the current reference count of the actual object pointed to.
 

Static Public Member Functions

static JAWSMAKO_API ILayoutParagraphPtr create (eHorizontalAlignment horizontalAlignment=eHALeft, double spacingAfter=0.0, double spacingBefore=0.0, double leading=1.0, const IDOMColorPtr &defaultColor=IDOMColorPtr(), const ILayoutFontPtr &defaultFont=ILayoutFontPtr(), bool exact=true, double defaultFontSize=-1.0)
 Create a paragraph.
 
static JAWSMAKO_API ILayoutParagraphPtr create (eHorizontalAlignment horizontalAlignment, double spacingAfter, double spacingBefore, double leading, const IDOMColorPtr &defaultColor, const IDOMFontOpenTypePtr &defaultFont, uint32 defaultFontIndex=0, double defaultFontSize=-1.0)
 Create a paragraph.
 

Additional Inherited Members

- Protected Member Functions inherited from IRCObject
virtual ~IRCObject ()
 Virtual destructor.
 

Detailed Description

A paragraph, consisting of a number of runs of content.

Member Enumeration Documentation

◆ eHorizontalAlignment

Horizontal alignment or justification for the paragraph.

Enumerator
eHALeft 

Align the content to the left boundary of the enclosing frame.

eHACenter 

Align the content to the center of the enclosing frame.

eHARight 

Align the content to the right boundary of the enclosing frame.

eHAJustified 

Justify the content left and right.

Member Function Documentation

◆ addRun()

virtual void JawsMako::ILayoutParagraph::addRun ( const ILayoutRunPtr & run)
pure virtual

Add a run to the end of the paragraph.

Parameters
runThe run to add.

◆ clone()

virtual ILayoutParagraphPtr JawsMako::ILayoutParagraph::clone ( ) const
pure virtual

Clone the paragraph.

Note that this will make a shallow clone of any runs added to the paragraph.

Returns
ILayoutParagraphPtr A smart pointer to the cloned ILayoutParagraph object.

◆ create() [1/2]

static JAWSMAKO_API ILayoutParagraphPtr JawsMako::ILayoutParagraph::create ( eHorizontalAlignment horizontalAlignment,
double spacingAfter,
double spacingBefore,
double leading,
const IDOMColorPtr & defaultColor,
const IDOMFontOpenTypePtr & defaultFont,
uint32 defaultFontIndex = 0,
double defaultFontSize = -1.0 )
static

Create a paragraph.

Parameters
horizontalAlignmentThe horizontal alignment for this paragraph.
spacingAfterThe spacing after the paragraph, in default DOM units (96ths of an inch).
spacingBeforeThe spacing before the paragraph, in default DOM units (96ths of an inch).
leadingThe leading (line spacing).
defaultColorThe default color to use if an enclosed run does not specify a color. If null, a DeviceGray black will be used.
defaultFontAn IDOMOpenTypeFont instance used as a default if a if an enclosed run does not specify a font.
defaultFontIndexThe index of the font within the default font file. Required if the default font is specified and is in a TrueType Collection, ignored otherwise.
defaultFontSizeThe default font size to use if an enclosed font does not specify a font size. Optional.
Returns
ILayoutParagraphPtr The newly created paragraph.

◆ create() [2/2]

static JAWSMAKO_API ILayoutParagraphPtr JawsMako::ILayoutParagraph::create ( eHorizontalAlignment horizontalAlignment = eHALeft,
double spacingAfter = 0.0,
double spacingBefore = 0.0,
double leading = 1.0,
const IDOMColorPtr & defaultColor = IDOMColorPtr(),
const ILayoutFontPtr & defaultFont = ILayoutFontPtr(),
bool exact = true,
double defaultFontSize = -1.0 )
static

Create a paragraph.

Parameters
horizontalAlignmentThe horizontal alignment for this paragraph.
spacingAfterThe spacing after the paragraph, in default DOM units (96ths of an inch).
spacingBeforeThe spacing before the paragraph, in default DOM units (96ths of an inch).
leadingThe leading (line spacing).
defaultColorThe default color to use if an enclosed run does not specify a color. If null, a DeviceGray black will be used.
defaultFontAn ILayoutFont instance used to select a font to use as a default if an enclosed run does not specify a font. Optional.
exactWhen true only exact font matches will be returned when selecting the default font (if provided). When false the font determined to be the closest match will be returned. The default is true.
defaultFontSizeThe default font size to use if an enclosed font does not specify a font size. Optional.
Returns
ILayoutParagraphPtr The newly created paragraph.

◆ getDefaultColor()

virtual const IDOMColorPtr & JawsMako::ILayoutParagraph::getDefaultColor ( ) const
pure virtual

Get the default color for the paragraph.

Returns
IDOMColorPtr The default color.

◆ getDefaultFont()

virtual const IDOMFontOpenTypePtr & JawsMako::ILayoutParagraph::getDefaultFont ( ) const
pure virtual

Get the default font for the paragraph.

Returns
IDOMFontOpenTypePtr The font.

◆ getDefaultFontIndex()

virtual uint32 JawsMako::ILayoutParagraph::getDefaultFontIndex ( ) const
pure virtual

Get the font index within the default font file.

Returns
uint32 The font index.

◆ getDefaultFontSize()

virtual double JawsMako::ILayoutParagraph::getDefaultFontSize ( ) const
pure virtual

Get the default font size on DOM units.

Returns
double The font size, or a negative value if no default has been set.

◆ getHorizontalAlignment()

virtual eHorizontalAlignment JawsMako::ILayoutParagraph::getHorizontalAlignment ( ) const
pure virtual

Get the horizontal alignment for this paragraph.

Returns
eHorizontalAlignment The horizontal alignment.

◆ getLeading()

virtual double JawsMako::ILayoutParagraph::getLeading ( ) const
pure virtual

Get the leading (line spacing).

Returns
double The leading value as a fraction of the default, for example 0.5 for half of the default leading.

◆ getRuns()

virtual const CLayoutRunVect & JawsMako::ILayoutParagraph::getRuns ( ) const
pure virtual

Get the runs present in this paragraph.

Returns
CLayoutRunVect The runs.

◆ getSpacing()

virtual double JawsMako::ILayoutParagraph::getSpacing ( bool before = false) const
pure virtual

Get the paragraph spacing.

Parameters
beforetrue to set spacing before the paragraph, or false after. The default is false.
Returns
double The spacing in default DOM units (96ths of an inch).

◆ setDefaultColor()

virtual void JawsMako::ILayoutParagraph::setDefaultColor ( const IDOMColorPtr & defaultColor)
pure virtual

Set a default color for the paragraph, or nullptr to clear the default.

Parameters
defaultColorThe default color to use. Optional.

◆ setDefaultFont() [1/2]

virtual void JawsMako::ILayoutParagraph::setDefaultFont ( const IDOMFontOpenTypePtr & defaultFont,
uint32 defaultFontIndex )
pure virtual

Set an the default font for the the paragraph, or nullptr to clear the default.

Parameters
defaultFontThe font to use as a default if an enclosed run does not specify a font. Optional.
defaultFontIndexThe index of the font within the font file. Required if the font is specified and is in a TrueType Collection, ignored otherwise.

◆ setDefaultFont() [2/2]

virtual void JawsMako::ILayoutParagraph::setDefaultFont ( const ILayoutFontPtr & defaultFont,
bool exact = true )
pure virtual

Set an ILayoutFont instance to select a default font for the the paragraph, or nullptr to clear the default.

Parameters
defaultFontAn ILayoutFont instance used to select a font to use as a default if an enclosed run does not specify a font. Optional.
exactWhen true only exact font matches will be returned when selecting the default font (if provided). When false the font determined to be the closest match will be returned. The default is true.

◆ setDefaultFontSize()

virtual void JawsMako::ILayoutParagraph::setDefaultFontSize ( double defaultFontSize)
pure virtual

Set the default font size of the paragraph.

Parameters
defaultFontSizeThe default font size to use if an enclosed font does not specify a font size. Set a negative value to remove the setting.

◆ setLeading()

virtual void JawsMako::ILayoutParagraph::setLeading ( double leading)
pure virtual

Set the leading (line spacing).

Parameters
leadingThe leading, which must be greater than or equal to zero. The value is a fraction of the default leading, for example a value of 0.5 would set leading to half of the default, 2 to double the default etc. The default is 1.

◆ setSpacing()

virtual void JawsMako::ILayoutParagraph::setSpacing ( double spacing,
bool before = false )
pure virtual

Set the paragraph spacing.

Parameters
spacingThe spacing in default DOM units (96ths of an inch).
beforetrue to set spacing before the paragraph, or false after. The default is false.

The documentation for this class was generated from the following file: