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

#include <ItemIdHelper.h>

Public Member Functions

virtual ~ItemIdHelper ()=default
 
virtual bool isEmpty (const String &blockId)=0
 
virtual String getBlockType (const String &blockId)=0
 
virtual myscript::iink::graphics::Rectangle getBlockBox (const String &blockId)=0
 
virtual myscript::iink::graphics::Rectangle getItemsBox (const std::vector< String > &itemIds)=0
 
virtual std::vector< String > getBlockChildrenIds (const String &blockId)=0
 
virtual String getBlockParentId (const String &blockId)=0
 
virtual String getItemParentId (const String &itemId)=0
 
virtual std::vector< String > getItemsByBlockId (const String &blockId)=0
 
virtual std::vector< String > combine (const std::vector< String > &itemIds1, const std::vector< String > &itemIds2, ItemIdCombinationModifier mode)=0
 
virtual bool isPartialItem (const String &itemId)=0
 
virtual String getFullItemId (const String &partialItemId)=0
 
virtual std::vector< PointerEvent > getPointsForItemId (const String &itemId)=0
 
virtual std::vector< String > toCanonicalItemIds (const std::vector< String > &itemIds)=0
 

Detailed Description

An ItemIdHelper allows working with item ids (e.g. strokes, glyphs, primitives, objects). It is associated with an offscreen editor.

Since
2.1

Constructor & Destructor Documentation

◆ ~ItemIdHelper()

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

Member Function Documentation

◆ isEmpty()

virtual bool myscript::iink::ItemIdHelper::isEmpty ( const String &  blockId)
pure virtual

Checks whether a block is empty.

Parameters
blockIdthe block id to check.
Returns
true if block is empty or invalid or editor is not associated with a part, otherwise false.

◆ getBlockType()

virtual String myscript::iink::ItemIdHelper::getBlockType ( const String &  blockId)
pure virtual

Returns the type of a block.

Parameters
blockIdthe identifier of the block.
Returns
the block type associated with blockId or empty if there is no such block in the current part.
Since
3.0

◆ getBlockBox()

virtual myscript::iink::graphics::Rectangle myscript::iink::ItemIdHelper::getBlockBox ( const String &  blockId)
pure virtual

Returns the bounding box of a block.

Parameters
blockIdthe identifier of the block.
Returns
the bounding box (with coordinates in input units) associated with blockId or empty if there is no such block in the current part.
Since
3.0

◆ getItemsBox()

virtual myscript::iink::graphics::Rectangle myscript::iink::ItemIdHelper::getItemsBox ( const std::vector< String > &  itemIds)
pure virtual

Returns the bounding box of an item ids list.

Parameters
itemIdsthe item ids list.
Returns
the bounding box (with coordinates in input units) associated with itemIds.
Exceptions
std::runtime_errorwhen editor is not associated with a part.
std::invalid_argumentwhen an item id is invalid.
Since
3.0

◆ getBlockChildrenIds()

virtual std::vector<String> myscript::iink::ItemIdHelper::getBlockChildrenIds ( const String &  blockId)
pure virtual

Returns the children block ids of a block.

Parameters
blockIdthe identifier of the block.
Returns
an array of the children block ids associated with blockId or empty if there is no such block in the current part.
Since
3.0

◆ getBlockParentId()

virtual String myscript::iink::ItemIdHelper::getBlockParentId ( const String &  blockId)
pure virtual

Returns the parent block id of a block.

Parameters
blockIdthe identifier of the block.
Returns
the parent block id associated with blockId or empty if block is root or if there is no such block in the current part.
Since
3.0

◆ getItemParentId()

virtual String myscript::iink::ItemIdHelper::getItemParentId ( const String &  itemId)
pure virtual

Returns the parent block id of an item.

Parameters
itemIdthe identifier of the item.
Returns
the parent block id associated with itemId.
Exceptions
std::runtime_errorwhen editor is not associated with a part.
std::invalid_argumentwhen item id is invalid.
Since
3.0

◆ getItemsByBlockId()

virtual std::vector<String> myscript::iink::ItemIdHelper::getItemsByBlockId ( const String &  blockId)
pure virtual

Returns the item ids associated with a given blockId.

Parameters
blockIdthe identifier of the block.
Returns
the item ids associated with blockId or empty if there is no such block in the current part.

◆ combine()

virtual std::vector<String> myscript::iink::ItemIdHelper::combine ( const std::vector< String > &  itemIds1,
const std::vector< String > &  itemIds2,
ItemIdCombinationModifier  mode 
)
pure virtual

Combines two item ids lists.

Parameters
itemIds1the first item ids list to combine.
itemIds2the second item ids list to combine.
modethe modifier specifying the combination mode.
Returns
the combined list of item ids.
Exceptions
std::runtime_errorwhen editor is not associated with a part.
std::invalid_argumentwhen an item id is invalid.
std::invalid_argumentwhen mode is not a valid ItemIdCombinationModifier value.

◆ isPartialItem()

virtual bool myscript::iink::ItemIdHelper::isPartialItem ( const String &  itemId)
pure virtual

Checks if an item is partial.

Parameters
itemIdthe item id to check.
Returns
true if item is partial, false otherwise.
Exceptions
std::runtime_errorwhen editor is not associated with a part.
std::invalid_argumentwhen item id is invalid.

◆ getFullItemId()

virtual String myscript::iink::ItemIdHelper::getFullItemId ( const String &  partialItemId)
pure virtual

Returns the full item id associated with a partial item id.

Parameters
partialItemIdthe partial item id.
Returns
the full item id.
Exceptions
std::runtime_errorwhen editor is not associated with a part.
std::invalid_argumentwhen partial item id is invalid.

◆ getPointsForItemId()

virtual std::vector<PointerEvent> myscript::iink::ItemIdHelper::getPointsForItemId ( const String &  itemId)
pure virtual

Returns the pointer events of an item.

Parameters
itemIdthe item id.
Returns
the pointer events of the item (with coordinates in input units).
Exceptions
std::runtime_errorwhen editor is not associated with a part.
std::invalid_argumentwhen item id is invalid.

◆ toCanonicalItemIds()

virtual std::vector<String> myscript::iink::ItemIdHelper::toCanonicalItemIds ( const std::vector< String > &  itemIds)
pure virtual

Converts an item ids list to its canonical form.

Parameters
itemIdsthe item ids list.
Returns
the canonical form of the item ids list.
Exceptions
std::runtime_errorwhen editor is not associated with a part.
std::invalid_argumentwhen an item id is invalid.

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