MyScript Interactive Ink SDK 4.2.0
IGestureHandler.h
1// Copyright @ MyScript. All rights reserved.
2
3#pragma once
4
5#include <iink/Engine.h>
6#include <iink/ToolController.h>
7
8#include <memory>
9
10namespace myscript {
11namespace iink {
12
13class Editor;
14class ContentSelection;
15
21enum class GestureAction
22{
26 IGNORE,
29};
30
37{
38public:
39 virtual ~IGestureHandler() = default;
40
51 virtual GestureAction onTap(std::shared_ptr<Editor> editor, PointerTool tool, const String& gestureStrokeId, float x, float y) = 0;
52
63 virtual GestureAction onDoubleTap(std::shared_ptr<Editor> editor, PointerTool tool, const std::vector<String>& gestureStrokeIds, float x, float y) = 0;
64
75 virtual GestureAction onLongPress(std::shared_ptr<Editor> editor, PointerTool tool, const String& gestureStrokeId, float x, float y) = 0;
76
89 virtual GestureAction onUnderline(std::shared_ptr<Editor> editor, PointerTool tool, const String& gestureStrokeId, std::shared_ptr<ContentSelection> selection) = 0;
90
103 virtual GestureAction onSurround(std::shared_ptr<Editor> editor, PointerTool tool, const String& gestureStrokeId, std::shared_ptr<ContentSelection> selection) = 0;
104
119 virtual GestureAction onJoin(std::shared_ptr<Editor> editor, PointerTool tool, const String& gestureStrokeId, std::shared_ptr<ContentSelection> before, std::shared_ptr<ContentSelection> after) = 0;
120
135 virtual GestureAction onInsert(std::shared_ptr<Editor> editor, PointerTool tool, const String& gestureStrokeId, std::shared_ptr<ContentSelection> before, std::shared_ptr<ContentSelection> after) = 0;
136
149 virtual GestureAction onStrikethrough(std::shared_ptr<Editor> editor, PointerTool tool, const String& gestureStrokeId, std::shared_ptr<ContentSelection> selection) = 0;
150
163 virtual GestureAction onScratch(std::shared_ptr<Editor> editor, PointerTool tool, const String& gestureStrokeId, std::shared_ptr<ContentSelection> selection) = 0;
164};
165
166}
167}
Definition: IGestureHandler.h:37
virtual ~IGestureHandler()=default
virtual GestureAction onUnderline(std::shared_ptr< Editor > editor, PointerTool tool, const String &gestureStrokeId, std::shared_ptr< ContentSelection > selection)=0
virtual GestureAction onTap(std::shared_ptr< Editor > editor, PointerTool tool, const String &gestureStrokeId, float x, float y)=0
virtual GestureAction onStrikethrough(std::shared_ptr< Editor > editor, PointerTool tool, const String &gestureStrokeId, std::shared_ptr< ContentSelection > selection)=0
virtual GestureAction onLongPress(std::shared_ptr< Editor > editor, PointerTool tool, const String &gestureStrokeId, float x, float y)=0
virtual GestureAction onScratch(std::shared_ptr< Editor > editor, PointerTool tool, const String &gestureStrokeId, std::shared_ptr< ContentSelection > selection)=0
virtual GestureAction onDoubleTap(std::shared_ptr< Editor > editor, PointerTool tool, const std::vector< String > &gestureStrokeIds, float x, float y)=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 onSurround(std::shared_ptr< Editor > editor, PointerTool tool, const String &gestureStrokeId, std::shared_ptr< ContentSelection > selection)=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
Definition: String.h:27
GestureAction
Definition: IGestureHandler.h:22
PointerTool
Definition: ToolController.h:15
Definition: Configuration.h:10