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

#include <IGestureHandler.h>

Public Member Functions

virtual ~IGestureHandler ()=default
 
virtual GestureAction onTap (std::shared_ptr< Editor > editor, PointerTool tool, const String &gestureStrokeId, float x, float y)=0
 
virtual GestureAction onDoubleTap (std::shared_ptr< Editor > editor, PointerTool tool, const std::vector< String > &gestureStrokeIds, float x, float y)=0
 
virtual GestureAction onLongPress (std::shared_ptr< Editor > editor, PointerTool tool, const String &gestureStrokeId, float x, float y)=0
 
virtual GestureAction onUnderline (std::shared_ptr< Editor > editor, PointerTool tool, const String &gestureStrokeId, std::shared_ptr< ContentSelection > selection)=0
 
virtual GestureAction onSurround (std::shared_ptr< Editor > editor, PointerTool tool, const String &gestureStrokeId, std::shared_ptr< ContentSelection > selection)=0
 
virtual GestureAction onJoin (std::shared_ptr< Editor > editor, PointerTool tool, const String &gestureStrokeId, std::shared_ptr< ContentSelection > before, std::shared_ptr< ContentSelection > after)=0
 
virtual GestureAction onInsert (std::shared_ptr< Editor > editor, PointerTool tool, const String &gestureStrokeId, std::shared_ptr< ContentSelection > before, std::shared_ptr< ContentSelection > after)=0
 
virtual GestureAction onStrikethrough (std::shared_ptr< Editor > editor, PointerTool tool, const String &gestureStrokeId, std::shared_ptr< ContentSelection > selection)=0
 
virtual GestureAction onScratch (std::shared_ptr< Editor > editor, PointerTool tool, const String &gestureStrokeId, std::shared_ptr< ContentSelection > selection)=0
 

Detailed Description

The listener interface for handling gesture events.

Since
2.1

Constructor & Destructor Documentation

◆ ~IGestureHandler()

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

Member Function Documentation

◆ onTap()

virtual GestureAction myscript::iink::IGestureHandler::onTap ( std::shared_ptr< Editor >  editor,
PointerTool  tool,
const String &  gestureStrokeId,
float  x,
float  y 
)
pure virtual

Invoked when a tap has been detected.

Parameters
editorthe editor.
toolthe tool used to perform the gesture.
gestureStrokeIdthe id of the gesture stroke.
xthe tap x position (view coordinate in px).
ythe tap y position (view coordinate in px).
Returns
the GestureAction to perform.

◆ onDoubleTap()

virtual GestureAction myscript::iink::IGestureHandler::onDoubleTap ( std::shared_ptr< Editor >  editor,
PointerTool  tool,
const std::vector< String > &  gestureStrokeIds,
float  x,
float  y 
)
pure virtual

Invoked when a double tap has been detected.

Parameters
editorthe editor.
toolthe tool used to perform the gesture.
gestureStrokeIdsthe id of the gesture strokes.
xthe double tap x position (view coordinate in px).
ythe double tap y position (view coordinate in px).
Returns
the GestureAction to perform.

◆ onLongPress()

virtual GestureAction myscript::iink::IGestureHandler::onLongPress ( std::shared_ptr< Editor >  editor,
PointerTool  tool,
const String &  gestureStrokeId,
float  x,
float  y 
)
pure virtual

Invoked when a long press has been detected.

Parameters
editorthe editor.
toolthe tool used to perform the gesture.
gestureStrokeIdthe id of the gesture stroke.
xthe long press x position (view coordinate in px).
ythe long press y position (view coordinate in px).
Returns
the GestureAction to perform.

◆ onUnderline()

virtual GestureAction myscript::iink::IGestureHandler::onUnderline ( std::shared_ptr< Editor >  editor,
PointerTool  tool,
const String &  gestureStrokeId,
std::shared_ptr< ContentSelection >  selection 
)
pure virtual

Invoked when a portion of text has been underlined.

Parameters
editorthe editor.
toolthe tool used to perform the gesture.
gestureStrokeIdthe id of the gesture stroke.
selectionthe underlined portion of text.
Returns
the GestureAction to perform.

◆ onSurround()

virtual GestureAction myscript::iink::IGestureHandler::onSurround ( std::shared_ptr< Editor >  editor,
PointerTool  tool,
const String &  gestureStrokeId,
std::shared_ptr< ContentSelection >  selection 
)
pure virtual

Invoked when a portion of text has been surrounded.

Parameters
editorthe editor.
toolthe tool used to perform the gesture.
gestureStrokeIdthe id of the gesture stroke.
selectionthe surrounded portion of text.
Returns
the GestureAction to perform.

◆ onJoin()

virtual GestureAction myscript::iink::IGestureHandler::onJoin ( std::shared_ptr< Editor >  editor,
PointerTool  tool,
const String &  gestureStrokeId,
std::shared_ptr< ContentSelection >  before,
std::shared_ptr< ContentSelection >  after 
)
pure virtual

Invoked when a join gesture has been drawn between two portions of a text line, or at the beginning or end of a line.

Parameters
editorthe editor.
toolthe tool used to perform the gesture.
gestureStrokeIdthe id of the gesture stroke.
beforethe portion of the text line before the join gesture.
afterthe portion of the text line after the join gesture.
Returns
the GestureAction to perform.

◆ onInsert()

virtual GestureAction myscript::iink::IGestureHandler::onInsert ( std::shared_ptr< Editor >  editor,
PointerTool  tool,
const String &  gestureStrokeId,
std::shared_ptr< ContentSelection >  before,
std::shared_ptr< ContentSelection >  after 
)
pure virtual

Invoked when an insert gesture has been drawn between two portions of a text line, or at the beginning or end of a line.

Parameters
editorthe editor.
toolthe tool used to perform the gesture.
gestureStrokeIdthe id of the gesture stroke.
beforethe portion of the text line before the insert gesture.
afterthe portion of the text line after the insert gesture.
Returns
the GestureAction to perform.

◆ onStrikethrough()

virtual GestureAction myscript::iink::IGestureHandler::onStrikethrough ( std::shared_ptr< Editor >  editor,
PointerTool  tool,
const String &  gestureStrokeId,
std::shared_ptr< ContentSelection >  selection 
)
pure virtual

Invoked when a portion of text has been striked through.

Parameters
editorthe editor.
toolthe tool used to perform the gesture.
gestureStrokeIdthe id of the gesture stroke.
selectionthe striked through portion of text.
Returns
the GestureAction to perform.

◆ onScratch()

virtual GestureAction myscript::iink::IGestureHandler::onScratch ( std::shared_ptr< Editor >  editor,
PointerTool  tool,
const String &  gestureStrokeId,
std::shared_ptr< ContentSelection >  selection 
)
pure virtual

Invoked when a portion of text has been scratched.

Parameters
editorthe editor.
toolthe tool used to perform the gesture.
gestureStrokeIdthe id of the gesture stroke.
selectionthe scratched portion of text.
Returns
the GestureAction to perform.

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