MyScript Interactive Ink SDK  4.1.2
Public Member Functions | List of all members
myscript::iink::ContentBlock Class Referenceabstract

#include <ContentBlock.h>

Inheritance diagram for myscript::iink::ContentBlock:
myscript::iink::ContentSelection

Public Member Functions

virtual ~ContentBlock ()=default
 
virtual String getType ()=0
 
virtual String getId ()=0
 
virtual String getRenderingId ()=0
 
virtual std::vector< std::shared_ptr< ContentBlock > > getChildren ()=0
 
virtual String getAttributes ()=0
 
virtual std::shared_ptr< ContentBlock > getParent ()=0
 
virtual myscript::iink::graphics::Rectangle getBox ()=0
 
virtual std::underlying_type< ConversionState >::type getConversionState ()=0
 
- Public Member Functions inherited from myscript::iink::ContentSelection
virtual ~ContentSelection ()=default
 
virtual std::shared_ptr< ContentPart > getPart ()=0
 
virtual bool isValid () noexcept=0
 

Detailed Description

Represents a block of content. The tree of content blocks provides the hierarchical structure of a content part into semantic units.

Constructor & Destructor Documentation

◆ ~ContentBlock()

virtual myscript::iink::ContentBlock::~ContentBlock ( )
virtualdefault

Member Function Documentation

◆ getType()

virtual String myscript::iink::ContentBlock::getType ( )
pure virtual

Returns the type of this block.

Returns
the type name.
Exceptions
std::runtime_errorwhen block is invalid.

◆ getId()

virtual String myscript::iink::ContentBlock::getId ( )
pure virtual

Returns the identifier of this block.

Returns
the identifier.
Exceptions
std::runtime_errorwhen block is invalid.

◆ getRenderingId()

virtual String myscript::iink::ContentBlock::getRenderingId ( )
pure virtual

Returns an identifier that can be used to match corresponding calls to graphics::ICanvas#startGroup.

Returns
the rendering identifier.
Exceptions
std::runtime_errorwhen block is invalid.

◆ getChildren()

virtual std::vector<std::shared_ptr<ContentBlock> > myscript::iink::ContentBlock::getChildren ( )
pure virtual

Returns the children of this block. The returned array is a copy of the list of child blocks, which makes it safe against concurrent changes.

Returns
an array of the child blocks.
Exceptions
std::runtime_errorwhen block is invalid.

◆ getAttributes()

virtual String myscript::iink::ContentBlock::getAttributes ( )
pure virtual

Returns the block's attributes as a JSON string.

Returns
the attributes.
Exceptions
std::runtime_errorwhen block is invalid.
Since
1.1

◆ getParent()

virtual std::shared_ptr<ContentBlock> myscript::iink::ContentBlock::getParent ( )
pure virtual

Returns the parent of this block.

Returns
the parent of this block, or nullptr if this block is the root block.
Exceptions
std::runtime_errorwhen block is invalid.
Since
1.4

◆ getBox()

virtual myscript::iink::graphics::Rectangle myscript::iink::ContentBlock::getBox ( )
pure virtual

Returns the bounding box of this block.

Returns
the box (document coordinates in mm).
Exceptions
std::runtime_errorwhen block is invalid.

◆ getConversionState()

virtual std::underlying_type<ConversionState>::type myscript::iink::ContentBlock::getConversionState ( )
pure virtual

Returns the current conversion state of this block as a bitwise or combination of ConversionState values.

Returns
the conversion state combination.
Exceptions
std::runtime_errorwhen block is invalid.

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