MyScript Interactive Ink SDK  3.1.3
Public Member Functions | List of all members
myscript::iink::text::Text Class Referenceabstract

#include <Text.h>

Public Member Functions

virtual ~Text ()=default
 
virtual String getLabel () const noexcept=0
 
virtual int getGlyphCount () const noexcept=0
 
virtual String getGlyphLabelAt (int index) const =0
 
virtual int getGlyphUtf8BeginAt (int index) const =0
 
virtual int getGlyphUtf8EndAt (int index) const =0
 
virtual int getGlyphUtf16BeginAt (int index) const =0
 
virtual int getGlyphUtf16EndAt (int index) const =0
 

Detailed Description

Allows to access the glyphs (i.e. grapheme clusters) within a label.

Note
what is called glyph here, is actually a grapheme cluster. For more details refer to http://unicode.org/reports/tr29/

Constructor & Destructor Documentation

◆ ~Text()

virtual myscript::iink::text::Text::~Text ( )
virtualdefault

Member Function Documentation

◆ getLabel()

virtual String myscript::iink::text::Text::getLabel ( ) const
pure virtualnoexcept

Returns the label of this text.

Returns
the label of this text.

◆ getGlyphCount()

virtual int myscript::iink::text::Text::getGlyphCount ( ) const
pure virtualnoexcept

Returns the number of glyphs associated with this text.

Returns
the number of glyphs in this text.

◆ getGlyphLabelAt()

virtual String myscript::iink::text::Text::getGlyphLabelAt ( int  index) const
pure virtual

Returns the label of a glyph.

Parameters
indexthe index of the glyph.
Returns
the label of the glyph at index.
Exceptions
std::invalid_argumentwhen index < 0 or index >= getGlyphCount().

◆ getGlyphUtf8BeginAt()

virtual int myscript::iink::text::Text::getGlyphUtf8BeginAt ( int  index) const
pure virtual

Returns the starting position of a glyph in the UTF-8 representation of the label of this text.

Parameters
indexthe index of the glyph.
Returns
the index of the first char of the glyph at index.
Exceptions
std::invalid_argumentwhen index < 0 or index >= getGlyphCount().

◆ getGlyphUtf8EndAt()

virtual int myscript::iink::text::Text::getGlyphUtf8EndAt ( int  index) const
pure virtual

Returns the ending position of a glyph in the UTF-8 representation of the label of this text.

Parameters
indexthe index of the glyph.
Returns
the index after the last char of the glyph at index.
Exceptions
std::invalid_argumentwhen index < 0 or index >= getGlyphCount().

◆ getGlyphUtf16BeginAt()

virtual int myscript::iink::text::Text::getGlyphUtf16BeginAt ( int  index) const
pure virtual

Returns the starting position of a glyph in the UTF-16 representation of the label of this text.

Parameters
indexthe index of the glyph.
Returns
the index of the first char16_t of the glyph at index.
Exceptions
std::invalid_argumentwhen index < 0 or index >= getGlyphCount().

◆ getGlyphUtf16EndAt()

virtual int myscript::iink::text::Text::getGlyphUtf16EndAt ( int  index) const
pure virtual

Returns the ending position of a glyph in the UTF-16 representation of the label of this text.

Parameters
indexthe index of the glyph.
Returns
the index after the last char16_t of the glyph at index.
Exceptions
std::invalid_argumentwhen index < 0 or index >= getGlyphCount().

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