A paragraph, consisting of a number of runs of content. More...
#include <layout.h>
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. | |
A paragraph, consisting of a number of runs of content.
Horizontal alignment or justification for the paragraph.
|
pure virtual |
Add a run to the end of the paragraph.
run | The run to add. |
|
pure virtual |
Clone the paragraph.
Note that this will make a shallow clone of any runs added to the paragraph.
|
static |
Create a paragraph.
horizontalAlignment | The horizontal alignment for this paragraph. |
spacingAfter | The spacing after the paragraph, in default DOM units (96ths of an inch). |
spacingBefore | The spacing before the paragraph, in default DOM units (96ths of an inch). |
leading | The leading (line spacing). |
defaultColor | The default color to use if an enclosed run does not specify a color. If null, a DeviceGray black will be used. |
defaultFont | An IDOMOpenTypeFont instance used as a default if a if an enclosed run does not specify a font. |
defaultFontIndex | The index of the font within the default font file. Required if the default font is specified and is in a TrueType Collection, ignored otherwise. |
defaultFontSize | The default font size to use if an enclosed font does not specify a font size. Optional. |
|
static |
Create a paragraph.
horizontalAlignment | The horizontal alignment for this paragraph. |
spacingAfter | The spacing after the paragraph, in default DOM units (96ths of an inch). |
spacingBefore | The spacing before the paragraph, in default DOM units (96ths of an inch). |
leading | The leading (line spacing). |
defaultColor | The default color to use if an enclosed run does not specify a color. If null, a DeviceGray black will be used. |
defaultFont | An ILayoutFont instance used to select a font to use as a default if an enclosed run does not specify a font. Optional. |
exact | When 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. |
defaultFontSize | The default font size to use if an enclosed font does not specify a font size. Optional. |
|
pure virtual |
Get the default color for the paragraph.
|
pure virtual |
Get the default font for the paragraph.
|
pure virtual |
Get the font index within the default font file.
|
pure virtual |
Get the default font size on DOM units.
|
pure virtual |
Get the horizontal alignment for this paragraph.
|
pure virtual |
Get the leading (line spacing).
|
pure virtual |
Get the runs present in this paragraph.
|
pure virtual |
Get the paragraph spacing.
before | true to set spacing before the paragraph, or false after. The default is false. |
|
pure virtual |
Set a default color for the paragraph, or nullptr to clear the default.
defaultColor | The default color to use. Optional. |
|
pure virtual |
Set an the default font for the the paragraph, or nullptr to clear the default.
defaultFont | The font to use as a default if an enclosed run does not specify a font. Optional. |
defaultFontIndex | The index of the font within the font file. Required if the font is specified and is in a TrueType Collection, ignored otherwise. |
|
pure virtual |
Set an ILayoutFont instance to select a default font for the the paragraph, or nullptr to clear the default.
defaultFont | An ILayoutFont instance used to select a font to use as a default if an enclosed run does not specify a font. Optional. |
exact | When 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. |
|
pure virtual |
Set the default font size of the paragraph.
defaultFontSize | The default font size to use if an enclosed font does not specify a font size. Set a negative value to remove the setting. |
|
pure virtual |
Set the leading (line spacing).
leading | The 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. |
|
pure virtual |
Set the paragraph spacing.
spacing | The spacing in default DOM units (96ths of an inch). |
before | true to set spacing before the paragraph, or false after. The default is false. |