#include <ItemIdHelper.h>
An ItemIdHelper allows working with item ids (e.g. strokes, glyphs, primitives, objects). It is associated with an offscreen editor.
- Since
- 2.1
◆ ~ItemIdHelper()
| virtual myscript::iink::ItemIdHelper::~ItemIdHelper |
( |
| ) |
|
|
virtualdefault |
◆ isEmpty()
| virtual bool myscript::iink::ItemIdHelper::isEmpty |
( |
const String & |
blockId | ) |
|
|
pure virtual |
Checks whether a block is empty.
- Parameters
-
| blockId | the 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
-
| blockId | the 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()
Returns the bounding box of a block.
- Parameters
-
| blockId | the 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
◆ getBlockOrientedBox()
| virtual std::array< graphics::Point, 4 > myscript::iink::ItemIdHelper::getBlockOrientedBox |
( |
const String & |
blockId | ) |
|
|
pure virtual |
Returns the four points of the oriented box of a block.
- Parameters
-
| blockId | the identifier of the block. |
- Returns
- the original top-left, top-right, bottom-right, bottom-left points after rotation (with coordinates in input units) or four zeros points if there is no such block in the current part.
- Since
- 4.2
◆ getItemsBox()
Returns the bounding box of an item ids list.
- Parameters
-
| itemIds | the item ids list. |
- Returns
- the bounding box (with coordinates in input units) associated with
itemIds.
- Exceptions
-
| std::runtime_error | when editor is not associated with a part. |
| std::invalid_argument | when 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
-
| blockId | the 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
-
| blockId | the 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
-
| itemId | the identifier of the item. |
- Returns
- the parent block id associated with
itemId.
- Exceptions
-
| std::runtime_error | when editor is not associated with a part. |
| std::invalid_argument | when 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
-
| blockId | the identifier of the block. |
- Returns
- the item ids associated with
blockId or empty if there is no such block in the current part.
◆ combine()
Combines two item ids lists.
- Parameters
-
| itemIds1 | the first item ids list to combine. |
| itemIds2 | the second item ids list to combine. |
| mode | the modifier specifying the combination mode. |
- Returns
- the combined list of item ids.
- Exceptions
-
| std::runtime_error | when editor is not associated with a part. |
| std::invalid_argument | when an item id is invalid. |
| std::invalid_argument | when 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
-
| itemId | the item id to check. |
- Returns
true if item is partial, false otherwise.
- Exceptions
-
| std::runtime_error | when editor is not associated with a part. |
| std::invalid_argument | when 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
-
| partialItemId | the partial item id. |
- Returns
- the full item id.
- Exceptions
-
| std::runtime_error | when editor is not associated with a part. |
| std::invalid_argument | when 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
-
- Returns
- the pointer events of the item (with coordinates in input units).
- Exceptions
-
| std::runtime_error | when editor is not associated with a part. |
| std::invalid_argument | when 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
-
| itemIds | the item ids list. |
- Returns
- the canonical form of the item ids list.
- Exceptions
-
| std::runtime_error | when editor is not associated with a part. |
| std::invalid_argument | when an item id is invalid. |
The documentation for this class was generated from the following file: