Mako 7.4.0 API
Loading...
Searching...
No Matches
JawsMako::ILayout Class Referenceabstract

An instance of a Layout engine that can layout and flow text into one or more frames, resulting in DOM that describes the final laid-out text. More...

#include <layout.h>

Inheritance diagram for JawsMako::ILayout:

Public Member Functions

virtual void addFrame (const ILayoutFramePtr &frame)=0
 Add a frame to the list of frames into which the engine will flow text. Text will be laid out into the first frame, and any that does not fit will flow into the second, and so forth.
 
virtual IDOMNodePtr layout (const CLayoutParagraphVect &paragraphs)=0
 Lay out the given paragraphs into the frames, returning a DOM representation of the result.
 
virtual IDOMNodePtr layout (const ILayoutParagraphPtr &paragraph)=0
 Lay out a single paragraph.
 
virtual IDOMNodePtr layout (const ILayoutRunPtr &run, ILayoutParagraph::eHorizontalAlignment horizontalAlignment, double spacingAfter=0.0, double spacingBefore=0.0, double leading=1.0)=0
 Lay out a run of content.
 
- 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 ILayoutPtr create (const IJawsMakoPtr &jawsMako)
 Create an instance of the layout engine.
 

Additional Inherited Members

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

Detailed Description

An instance of a Layout engine that can layout and flow text into one or more frames, resulting in DOM that describes the final laid-out text.

Member Function Documentation

◆ addFrame()

virtual void JawsMako::ILayout::addFrame ( const ILayoutFramePtr & frame)
pure virtual

Add a frame to the list of frames into which the engine will flow text. Text will be laid out into the first frame, and any that does not fit will flow into the second, and so forth.

Parameters
frameThe frame to add.

◆ create()

static JAWSMAKO_API ILayoutPtr JawsMako::ILayout::create ( const IJawsMakoPtr & jawsMako)
static

Create an instance of the layout engine.

Parameters
jawsMakoThe IJawsMako object.
Returns
ILayoutPtr The new layout engine object.

◆ layout() [1/3]

virtual IDOMNodePtr JawsMako::ILayout::layout ( const CLayoutParagraphVect & paragraphs)
pure virtual

Lay out the given paragraphs into the frames, returning a DOM representation of the result.

Parameters
paragraphsThe paragraphs to lay out.
Returns
IDOMNodePtr The resulting DOM.

◆ layout() [2/3]

virtual IDOMNodePtr JawsMako::ILayout::layout ( const ILayoutParagraphPtr & paragraph)
pure virtual

Lay out a single paragraph.

Convenience function to lay out a single paragraph into frames.

Parameters
paragraphThe paragraph to lay out.
Returns
IDOMNodePtr The resulting DOM.

◆ layout() [3/3]

virtual IDOMNodePtr JawsMako::ILayout::layout ( const ILayoutRunPtr & run,
ILayoutParagraph::eHorizontalAlignment horizontalAlignment,
double spacingAfter = 0.0,
double spacingBefore = 0.0,
double leading = 1.0 )
pure virtual

Lay out a run of content.

Convenience function to lay out a run of content into frames. Internally the run will be added to a newly created ILayoutParagraph instance.

Parameters
runThe run of content to lay out.
horizontalAlignmentThe horizontal alignment to use for the ILayoutParagraph instance.
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).
Returns
IDOMNodePtr The resulting DOM.

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