5 #include <iink/Engine.h>
6 #include <iink/PointerEvent.h>
7 #include <iink/graphics/Point.h>
8 #include <iink/graphics/Rectangle.h>
9 #include <iink/text/IFontMetricsProvider.h>
10 #include <iink/ContentSelection.h>
11 #include <iink/MimeType.h>
15 #include <type_traits>
25 class IEditorListener;
26 class IGestureHandler;
124 virtual void addListener(std::shared_ptr<IEditorListener> listener) noexcept = 0;
131 virtual void removeListener(std::shared_ptr<IEditorListener> listener) noexcept = 0;
154 virtual void setFontMetricsProvider(std::shared_ptr<myscript::iink::text::IFontMetricsProvider> fontMetricsProvider) noexcept = 0;
161 virtual std::shared_ptr<Engine>
getEngine() noexcept = 0;
749 virtual
void paste(
float x,
float y) = 0;
Definition: Configuration.h:20
Definition: ContentBlock.h:21
Definition: ContentPart.h:24
Definition: ContentSelection.h:33
virtual std::underlying_type< TransformError >::type getTransformStatus(std::shared_ptr< ContentSelection > selection, const myscript::iink::graphics::Transform &transform)=0
virtual void setTheme(const String &styleSheet)=0
virtual int getPossibleUndoCount()=0
virtual bool isScrollAllowed() noexcept=0
virtual void setGestureHandler(std::shared_ptr< IGestureHandler > handler)=0
virtual void erase(std::shared_ptr< ContentSelection > selection)=0
virtual ContentSelectionMode getSelectionMode()=0
virtual void setFontMetricsProvider(std::shared_ptr< myscript::iink::text::IFontMetricsProvider > fontMetricsProvider) noexcept=0
virtual void drawStroke(const std::vector< PointerEvent > &events, std::shared_ptr< graphics::ICanvas > canvas)=0
virtual void removeListener(std::shared_ptr< IEditorListener > listener) noexcept=0
virtual int getViewHeight()=0
virtual void clampViewOffset(graphics::Point &viewOffset)=0
virtual std::shared_ptr< Configuration > getConfiguration() noexcept=0
virtual std::shared_ptr< ContentBlock > getBlockById(const String &id)=0
virtual void setViewSize(int width, int height)=0
virtual bool canRedo() noexcept=0
virtual void setTextFormat(std::shared_ptr< ContentSelection > selection, TextFormat format)=0
virtual int getPossibleRedoCount()=0
virtual bool isIdle() noexcept=0
virtual void applyStyle(std::shared_ptr< ContentSelection > selection, const String &style)=0
virtual myscript::iink::graphics::Rectangle getBox(std::shared_ptr< ContentSelection > selection)=0
virtual void removeGestureHandler()=0
virtual void addListener(std::shared_ptr< IEditorListener > listener) noexcept=0
virtual std::shared_ptr< Engine > getEngine() noexcept=0
virtual void pointerEvents(const std::vector< PointerEvent > &events, bool processGestures=true)=0
virtual bool isEmpty(std::shared_ptr< ContentSelection > selection)=0
virtual std::vector< ConversionState > getSupportedTargetConversionStates(std::shared_ptr< ContentSelection > selection)=0
virtual void setSelectionMode(ContentSelectionMode mode)=0
virtual std::vector< String > getSupportedAddBlockTypes() noexcept=0
virtual std::vector< MimeType > getSupportedImportMimeTypes(std::shared_ptr< ContentSelection > selection)=0
virtual bool canUndo() noexcept=0
virtual void setPart(std::shared_ptr< ContentPart > part)=0
virtual void convert(std::shared_ptr< ContentSelection > selection, ConversionState targetState)=0
virtual std::shared_ptr< ContentBlock > addBlock(float x, float y, const String &type)=0
virtual std::vector< MimeType > getSupportedAddBlockDataMimeTypes(const String &type) noexcept=0
virtual void setSelection(std::shared_ptr< ContentSelection > selection)=0
virtual IndentationLevels getIndentationLevels(std::shared_ptr< ContentSelection > selection)=0
virtual void import_(MimeType mimeType, const String &data, std::shared_ptr< ContentSelection > selection=nullptr, std::shared_ptr< ParameterSet > overrideConfiguration=nullptr)=0
virtual std::vector< TextFormat > getSupportedTextFormats(std::shared_ptr< ContentSelection > selection)=0
virtual String getTheme() const noexcept=0
virtual void setSelectionType(std::shared_ptr< ContentSelection > selection, const String &type, bool forceSingleBlock)=0
virtual void paste(float x, float y)=0
virtual void pointerUp(float x, float y, int64_t t, float f, PointerType pointerType, int pointerId)=0
virtual std::shared_ptr< ContentBlock > getRootBlock()=0
virtual std::shared_ptr< ContentBlock > addImage(float x, float y, const String &inputFile, MimeType mimeType)=0
virtual std::shared_ptr< ContentBlock > hitBlock(float x, float y)=0
virtual std::shared_ptr< ContentSelection > hitSelection(float x, float y)=0
virtual std::vector< String > getIntersectingBlocks(std::shared_ptr< ContentSelection > selection)=0
virtual int getUndoStackIndex()=0
virtual bool hasSelection()=0
virtual void waitForIdle() noexcept=0
virtual std::vector< String > getIncludedBlocks(std::shared_ptr< ContentSelection > selection)=0
virtual std::shared_ptr< Renderer > getRenderer() noexcept=0
virtual std::shared_ptr< ContentSelection > getSelection()=0
virtual String export_(std::shared_ptr< ContentSelection > selection, MimeType mimeType, std::shared_ptr< ParameterSet > overrideConfiguration=nullptr)=0
virtual String pointerDown(float x, float y, int64_t t, float f, PointerType pointerType, int pointerId)=0
virtual ~Editor()=default
virtual std::shared_ptr< ToolController > getToolController() noexcept=0
virtual std::vector< ContentSelectionMode > getAvailableSelectionModes()=0
virtual int getViewWidth()=0
virtual void transform(std::shared_ptr< ContentSelection > selection, const myscript::iink::graphics::Transform &transform)=0
virtual void pointerCancel(int pointerId)=0
virtual void indent(std::shared_ptr< ContentSelection > selection, int offset)=0
virtual std::vector< String > getAvailableSelectionTypes(std::shared_ptr< ContentSelection > selection)=0
virtual std::underlying_type< ConversionState >::type getConversionState(std::shared_ptr< ContentSelection > selection)=0
virtual String getUndoRedoIdAt(int stackIndex)=0
virtual void pointerMove(float x, float y, int64_t t, float f, PointerType pointerType, int pointerId)=0
virtual std::vector< MimeType > getSupportedExportMimeTypes(std::shared_ptr< ContentSelection > selection)=0
virtual std::shared_ptr< ContentPart > getPart() noexcept=0
virtual void copy(std::shared_ptr< ContentSelection > selection)=0
Definition: IImagePainter.h:19
Definition: ParameterSet.h:16
Definition: Renderer.h:21
TransformError
Definition: Editor.h:43
@ HAS_SCALE
Definition: Editor.h:59
@ TEXT_BLOCKS
Definition: Editor.h:51
@ INVALID
Definition: Editor.h:55
@ MATH_BLOCKS
Definition: Editor.h:52
@ NULL_SELECTION
Definition: Editor.h:47
@ ALLOWED
Definition: Editor.h:44
@ HAS_NEGATIVE_SCALE
Definition: Editor.h:60
@ HAS_SHEAR
Definition: Editor.h:61
@ GUIDES
Definition: Editor.h:54
@ MULTIPLE_BLOCKS
Definition: Editor.h:49
@ BAD_NUMERIC
Definition: Editor.h:57
@ BEAUTIFIED_BLOCKS
Definition: Editor.h:50
@ NON_INVERTIBLE
Definition: Editor.h:56
@ HAS_ROTATION
Definition: Editor.h:58
@ UNSUPPORTED
Definition: Editor.h:46
@ PARTIAL_BLOCKS
Definition: Editor.h:48
@ HAS_TRANSLATION
Definition: Editor.h:62
@ DRAWING_BLOCKS
Definition: Editor.h:53
TextFormat
Definition: Editor.h:71
ConversionState
Definition: ContentSelection.h:21
PointerType
Definition: PointerEvent.h:16
ContentSelectionMode
Definition: Editor.h:99
MimeType
Definition: MimeType.h:15
Definition: Configuration.h:11
IndentationLevels(size_t low_, size_t high_, size_t max_)
Definition: Editor.h:87
size_t max
Definition: Editor.h:92
size_t low
Definition: Editor.h:90
size_t high
Definition: Editor.h:91
Definition: PointerEvent.h:43