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

A run of text content to be added to an ILayoutParagraph. More...

#include <layout.h>

Inheritance diagram for JawsMako::ILayoutTextRun:

Public Member Functions

virtual const U8StringgetText () const =0
 Get the text in the run as UTF-8.
 
virtual const IDOMFontOpenTypePtr & getFont () const =0
 Get the font.
 
virtual uint32 getFontIndex () const =0
 Get the font index within the font file.
 
virtual double getSize () const =0
 Get the em size of the font in default DOM units (96ths of an inch)
 
virtual void setColor (const IDOMColorPtr &color)=0
 Set the text color.
 
virtual const IDOMColorPtr & getColor () const =0
 Get the text color.
 
virtual void setLetterSpacing (double letterSpacing)=0
 Set the letter spacing.
 
virtual double getLetterSpacing () const =0
 Get the letter spacing.
 
- 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 ILayoutTextRunPtr create (const U8String &text, const IDOMFontOpenTypePtr &font, uint32 fontIndex, double size, const IDOMColorPtr &color=IDOMColorPtr(), double letterSpacing=0.0)
 Create a text run.
 
static JAWSMAKO_API ILayoutTextRunPtr create (const String &text, const IDOMFontOpenTypePtr &font, uint32 fontIndex, double size, const IDOMColorPtr &color=IDOMColorPtr(), double letterSpacing=0.0)
 Create a text run.
 
static JAWSMAKO_API ILayoutTextRunPtr create (const U8String &text, const ILayoutFontPtr &font, double size, bool exact=true, const IDOMColorPtr &color=IDOMColorPtr(), double letterSpacing=0.0)
 Create a text run.
 
static JAWSMAKO_API ILayoutTextRunPtr create (const String &text, const ILayoutFontPtr &font, double size, bool exact=true, const IDOMColorPtr &color=IDOMColorPtr(), double letterSpacing=0.0)
 Create a text run.
 

Additional Inherited Members

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

Detailed Description

A run of text content to be added to an ILayoutParagraph.

Member Function Documentation

◆ create() [1/4]

static JAWSMAKO_API ILayoutTextRunPtr JawsMako::ILayoutTextRun::create ( const String & text,
const IDOMFontOpenTypePtr & font,
uint32 fontIndex,
double size,
const IDOMColorPtr & color = IDOMColorPtr(),
double letterSpacing = 0.0 )
static

Create a text run.

Parameters
textThe text for the run as a wide character Unicode string.
fontThe desired font for the run. If nullptr, the paragraph default font (which must be set in this circumstance) will be used.
fontIndexThe index of the font within the font file. Required if the font is specified and is in a TrueType Collection, ignored otherwise.
sizeThe desired em size of the text, in default DOM units (96ths of an inch). If negative, the default paragraph font size (which must be set in this circumstance) will be used.
colorThe color to use for the text. If null, the paragraph default font color will be used.
letterSpacingThe desired letter spacing, in ems. A positive value expands, and a negative value condenses the spacing between letters.
Returns
ILayoutTextRunPtr The new run.

◆ create() [2/4]

static JAWSMAKO_API ILayoutTextRunPtr JawsMako::ILayoutTextRun::create ( const String & text,
const ILayoutFontPtr & font,
double size,
bool exact = true,
const IDOMColorPtr & color = IDOMColorPtr(),
double letterSpacing = 0.0 )
static

Create a text run.

Will throw an exception if the supplied ILayoutFont fails to select a font.

Parameters
textThe text for the run as a wide character Unicode string.
fontAn ILayoutFont instance used to select a font for the run. If nullptr, the paragraph default font (which must be set) will be used.
sizeThe desired em size of the text, in default DOM units (96ths of an inch). If negative, the default paragraph font size (which must be set in this circumstance) will be used.
exactWhen true only exact font matches will be returned when selecting fonts. When false the font determined to be the closest match will be returned. The default is true.
colorThe color to use for the text.
letterSpacingThe desired letter spacing, in ems. A positive value expands, and a negative value condenses the spacing between letters.
Returns
ILayoutTextRunPtr The new run.

◆ create() [3/4]

static JAWSMAKO_API ILayoutTextRunPtr JawsMako::ILayoutTextRun::create ( const U8String & text,
const IDOMFontOpenTypePtr & font,
uint32 fontIndex,
double size,
const IDOMColorPtr & color = IDOMColorPtr(),
double letterSpacing = 0.0 )
static

Create a text run.

Parameters
textThe text for the run as UTF-8.
fontThe desired font for the run. If nullptr, the paragraph default font (which must be set) will be used.
fontIndexThe index of the font within the font file. Required if the font is specified and is in a TrueType Collection, ignored otherwise.
sizeThe desired em size of the text, in default DOM units (96ths of an inch).
colorThe color to use for the text.
letterSpacingThe desired letter spacing, in ems. A positive value expands, and a negative value condenses the spacing between letters.
Returns
ILayoutTextRunPtr The new run.

◆ create() [4/4]

static JAWSMAKO_API ILayoutTextRunPtr JawsMako::ILayoutTextRun::create ( const U8String & text,
const ILayoutFontPtr & font,
double size,
bool exact = true,
const IDOMColorPtr & color = IDOMColorPtr(),
double letterSpacing = 0.0 )
static

Create a text run.

Will throw an exception if the supplied ILayoutFont fails to select a font.

Parameters
textThe text for the run as UTF-8.
fontAn ILayoutFont instance used to select a font for the run. If nullptr, the paragraph default font (which must be set) will be used.
sizeThe desired em size of the text, in default DOM units (96ths of an inch). If negative, the default paragraph font size (which must be set in this circumstance) will be used.
exactWhen true only exact font matches will be returned when selecting fonts. When false the font determined to be the closest match will be returned. The default is true.
colorThe color to use for the text.
letterSpacingThe desired letter spacing, in ems. A positive value expands, and a negative value condenses the spacing between letters.
Returns
ILayoutTextRunPtr The new run.

◆ getColor()

virtual const IDOMColorPtr & JawsMako::ILayoutTextRun::getColor ( ) const
pure virtual

Get the text color.

Returns
The text color, or NULL if no color was set.

◆ getFont()

virtual const IDOMFontOpenTypePtr & JawsMako::ILayoutTextRun::getFont ( ) const
pure virtual

Get the font.

Returns
IDOMFontOpenTypePtr The font. NULL if not font is set.

◆ getFontIndex()

virtual uint32 JawsMako::ILayoutTextRun::getFontIndex ( ) const
pure virtual

Get the font index within the font file.

Returns
uint32 The font index.

◆ getLetterSpacing()

virtual double JawsMako::ILayoutTextRun::getLetterSpacing ( ) const
pure virtual

Get the letter spacing.

Returns
The letter spacing.

◆ getSize()

virtual double JawsMako::ILayoutTextRun::getSize ( ) const
pure virtual

Get the em size of the font in default DOM units (96ths of an inch)

Returns
The size of the font.

◆ getText()

virtual const U8String & JawsMako::ILayoutTextRun::getText ( ) const
pure virtual

Get the text in the run as UTF-8.

Returns
U8String The text.

◆ setColor()

virtual void JawsMako::ILayoutTextRun::setColor ( const IDOMColorPtr & color)
pure virtual

Set the text color.

Parameters
colorThe text color.

◆ setLetterSpacing()

virtual void JawsMako::ILayoutTextRun::setLetterSpacing ( double letterSpacing)
pure virtual

Set the letter spacing.

Parameters
letterSpacingThe letter spacing, in ems.

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