![]() |
MyScript Interactive Ink SDK 4.5.0
|
#include <Editor.h>
Public Member Functions | |
| virtual | ~Editor ()=default |
| virtual void | addListener (std::shared_ptr< IEditorListener > listener) noexcept=0 |
| virtual void | removeListener (std::shared_ptr< IEditorListener > listener) noexcept=0 |
| virtual void | setGestureHandler (std::shared_ptr< IGestureHandler > handler)=0 |
| virtual void | removeGestureHandler ()=0 |
| virtual void | setFontMetricsProvider (std::shared_ptr< myscript::iink::text::IFontMetricsProvider > fontMetricsProvider) noexcept=0 |
| virtual std::shared_ptr< Engine > | getEngine () noexcept=0 |
| virtual std::shared_ptr< Renderer > | getRenderer () noexcept=0 |
| virtual std::shared_ptr< PlaceholderController > | getPlaceholderController ()=0 |
| virtual std::shared_ptr< ToolController > | getToolController () noexcept=0 |
| virtual std::shared_ptr< MathSolverController > | getMathSolverController ()=0 |
| virtual std::shared_ptr< ContentPart > | getPart () noexcept=0 |
| virtual void | setPart (std::shared_ptr< ContentPart > part, bool forceReconfigure=false)=0 |
| virtual void | clear ()=0 |
| virtual bool | canUndo () noexcept=0 |
| virtual void | undo ()=0 |
| virtual bool | canRedo () noexcept=0 |
| virtual void | redo ()=0 |
| virtual int | getUndoStackIndex ()=0 |
| virtual int | getPossibleUndoCount ()=0 |
| virtual int | getPossibleRedoCount ()=0 |
| virtual String | getUndoRedoIdAt (int stackIndex)=0 |
| virtual void | clearUndoRedoStack ()=0 |
| virtual String | pointerDown (float x, float y, int64_t t, float f, PointerType pointerType, int pointerId)=0 |
| virtual String | pointerDown (float x, float y, int64_t t, float f, float tilt, float orientation, PointerType pointerType, int pointerId)=0 |
| virtual void | pointerMove (float x, float y, int64_t t, float f, PointerType pointerType, int pointerId)=0 |
| virtual void | pointerMove (float x, float y, int64_t t, float f, float tilt, float orientation, PointerType pointerType, int pointerId)=0 |
| virtual void | pointerUp (float x, float y, int64_t t, float f, PointerType pointerType, int pointerId)=0 |
| virtual void | pointerUp (float x, float y, int64_t t, float f, float tilt, float orientation, PointerType pointerType, int pointerId)=0 |
| virtual void | pointerCancel (int pointerId)=0 |
| virtual void | pointerEvents (const std::vector< PointerEvent > &events, bool processGestures=true)=0 |
| virtual void | setViewSize (int width, int height)=0 |
| virtual int | getViewWidth ()=0 |
| virtual int | getViewHeight ()=0 |
| virtual void | clampViewOffset (graphics::Point &viewOffset)=0 |
| virtual void | setTheme (const String &styleSheet)=0 |
| virtual String | getTheme () const noexcept=0 |
| virtual std::shared_ptr< ContentBlock > | getRootBlock ()=0 |
| virtual std::shared_ptr< ContentBlock > | getBlockById (const String &id)=0 |
| virtual bool | isEmpty (std::shared_ptr< ContentSelection > selection)=0 |
| virtual std::vector< String > | getSupportedAddBlockTypes () noexcept=0 |
| virtual std::vector< MimeType > | getSupportedAddBlockDataMimeTypes (const String &type) noexcept=0 |
| virtual std::shared_ptr< ContentBlock > | addBlock (float x, float y, const String &type)=0 |
| virtual std::shared_ptr< ContentBlock > | addBlock (float x, float y, const String &type, MimeType mimeType, const String &data)=0 |
| virtual std::shared_ptr< ContentBlock > | addImage (float x, float y, const String &inputFile, MimeType mimeType)=0 |
| virtual void | setBackgroundImage (const String &inputFile, MimeType mimeType, ImageFit fit)=0 |
| virtual String | getBackgroundImage ()=0 |
| virtual void | erase (std::shared_ptr< ContentSelection > selection)=0 |
| virtual std::shared_ptr< ContentBlock > | hitBlock (float x, float y)=0 |
| virtual std::shared_ptr< ContentBlock > | hitSubBlock (float x, float y)=0 |
| virtual std::vector< ConversionState > | getSupportedTargetConversionStates (std::shared_ptr< ContentSelection > selection)=0 |
| virtual void | convert (std::shared_ptr< ContentSelection > selection, ConversionState targetState)=0 |
| virtual std::vector< MimeType > | getSupportedExportMimeTypes (std::shared_ptr< ContentSelection > selection)=0 |
| virtual String | export_ (std::shared_ptr< ContentSelection > selection, MimeType mimeType, std::shared_ptr< ParameterSet > overrideConfiguration=nullptr)=0 |
| virtual void | export_ (std::shared_ptr< ContentSelection > selection, const String &outputFile, std::shared_ptr< IImagePainter > imagePainter, std::shared_ptr< ParameterSet > overrideConfiguration=nullptr)=0 |
| virtual void | export_ (std::shared_ptr< ContentSelection > selection, const String &outputFile, MimeType mimeType, std::shared_ptr< IImagePainter > imagePainter, std::shared_ptr< ParameterSet > overrideConfiguration=nullptr)=0 |
| virtual std::vector< MimeType > | getSupportedImportMimeTypes (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 void | copy (std::shared_ptr< ContentSelection > selection)=0 |
| virtual void | paste (float x, float y)=0 |
| virtual bool | isIdle () noexcept=0 |
| virtual void | waitForIdle () noexcept=0 |
| virtual bool | isScrollAllowed () noexcept=0 |
| virtual std::shared_ptr< Configuration > | getConfiguration () noexcept=0 |
| virtual void | drawStroke (const std::vector< PointerEvent > &events, std::shared_ptr< graphics::ICanvas > canvas)=0 |
| virtual bool | hasSelection ()=0 |
| virtual std::shared_ptr< ContentSelection > | getSelection ()=0 |
| virtual void | setSelection (std::shared_ptr< ContentSelection > selection, ContentSelectionMode mode=ContentSelectionMode::NONE)=0 |
| virtual std::shared_ptr< ContentSelection > | hitSelection (float x, float y)=0 |
| virtual std::vector< String > | getIntersectingBlocks (std::shared_ptr< ContentSelection > selection)=0 |
| virtual std::vector< String > | getIncludedBlocks (std::shared_ptr< ContentSelection > selection)=0 |
| virtual std::underlying_type< TransformError >::type | getTransformStatus (std::shared_ptr< ContentSelection > selection, const myscript::iink::graphics::Transform &transform)=0 |
| virtual void | transform (std::shared_ptr< ContentSelection > selection, const myscript::iink::graphics::Transform &transform)=0 |
| virtual void | applyStyle (std::shared_ptr< ContentSelection > selection, const String &style)=0 |
| virtual std::vector< TextFormat > | getSupportedTextFormats (std::shared_ptr< ContentSelection > selection)=0 |
| virtual void | setTextFormat (std::shared_ptr< ContentSelection > selection, TextFormat format)=0 |
| virtual ContentSelectionMode | getSelectionMode ()=0 |
| virtual void | setSelectionMode (ContentSelectionMode mode)=0 |
| virtual std::vector< ContentSelectionMode > | getAvailableSelectionModes (std::shared_ptr< ContentSelection > selection=nullptr)=0 |
| virtual void | setSelectionType (std::shared_ptr< ContentSelection > selection, const String &type, bool forceSingleBlock)=0 |
| virtual std::vector< String > | getAvailableSelectionTypes (std::shared_ptr< ContentSelection > selection)=0 |
| virtual IndentationLevels | getIndentationLevels (std::shared_ptr< ContentSelection > selection)=0 |
| virtual void | indent (std::shared_ptr< ContentSelection > selection, int offset)=0 |
| virtual myscript::iink::graphics::Rectangle | getBox (std::shared_ptr< ContentSelection > selection)=0 |
| virtual std::underlying_type< ConversionState >::type | getConversionState (std::shared_ptr< ContentSelection > selection)=0 |
The Editor is the entry point to modify a part. An editor is associated with a single part.
|
virtualdefault |
|
pure virtualnoexcept |
Adds the specified listener to this editor.
| listener | the listener to be added. |
|
pure virtualnoexcept |
Removes the specified listener from this editor.
| listener | the listener to be removed. |
|
pure virtual |
Registers the specified gesture handler to this editor.
| handler | the gesture handler to be used. |
|
pure virtual |
Removes the gesture handler from this editor, if any.
|
pure virtualnoexcept |
Sets a font metrics provider to this editor.
| fontMetricsProvider | a IFontMetricsProvider. |
|
pure virtualnoexcept |
Returns the Engine to which this editor is attached.
|
pure virtualnoexcept |
Returns the Renderer associated with this editor.
|
pure virtual |
Returns the PlaceholderController attached to this editor.
|
pure virtualnoexcept |
|
pure virtual |
Returns the MathSolverController associated with this editor.
|
pure virtualnoexcept |
Returns the part managed by this editor.
|
pure virtual |
Sets the part managed by this editor.
| part | the part. |
| forceReconfigure | true to change the language associated with the part or the recognition assets it references. This call may trigger a complete reprocess of the part, interactivity will be limited until that processing is over. |
| std::runtime_error | when no IFontMetricProvider has been set, via setFontMetricsProvider(). |
| std::runtime_error | when part is already bound. |
| std::runtime_error | when this editor cannot be configured. |
|
pure virtual |
Removes all content from the part.
| pointer_sequence_error | when a sequence of pointer events is ongoing. |
|
pure virtualnoexcept |
Tells whether undo can be performed on the part or not
true if undo can be performed, otherwise false.
|
pure virtual |
Undo the last action on part.
| std::runtime_error | when undo operations failed. |
|
pure virtualnoexcept |
Tells whether redo can be performed on the part or not
true if redo can be performed, otherwise false.
|
pure virtual |
Redo the last action reverted by undo on part.
| std::runtime_error | when redo operations failed. |
|
pure virtual |
Returns the number of operations performed on the part, since content part was opened.
getPossibleUndoCount(), while the total number of operations since content part was opened is provided by getUndoStackIndex().| std::runtime_error | when editor is not associated with a part. |
|
pure virtual |
Returns the number of operations that can be undone (<= getUndoStackIndex()).
| std::runtime_error | when editor is not associated with a part. |
|
pure virtual |
Returns the number of operations that can be redone.
| std::runtime_error | when editor is not associated with a part. |
|
pure virtual |
Returns the id of an undo or redo action, based on its position in the stack index. Valid stack index values range from (current stack index - possible undo count) to (current stack index + possible redo count - 1).
| stackIndex | the index in the stack of the undo/redo action to retrieve. |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when stackIndex is invalid. |
|
pure virtual |
Resets the undo/redo stack of this editor.
|
pure virtual |
Registers a pointer down event.
| x | pointer event x coordinate (view coordinates in pixel). |
| y | pointer event y coordinate (view coordinates in pixel). |
| t | pointer event timestamp, in ms since Unix EPOCH. |
| f | normalized pressure, in [0,1]. |
| pointerType | the type of input. |
| pointerId | the id of the pointer. |
| std::invalid_argument | when pointerType is invalid. |
| std::invalid_argument | when x or y is not a number. |
| std::invalid_argument | when t exceeds year 9999. |
| std::invalid_argument | when f is not a number or is negative. |
| pointer_sequence_error | when pointerDown() has already been called. |
| std::runtime_error | in "Text Document" parts, when no view size is set. |
|
pure virtual |
Registers a pointer down event.
| x | pointer event x coordinate (view coordinates in pixel). |
| y | pointer event y coordinate (view coordinates in pixel). |
| t | pointer event timestamp, in ms since Unix EPOCH. |
| f | normalized pressure, in [0,1]. |
| tilt | the tilt in radians. 0 is perpendicular, Pi/2 if flat on screen. |
| orientation | the orientation in radians. 0 is pointing up, -Pi/2 is left, Pi/2 is right, +/-Pi is down. |
| pointerType | the type of input. |
| pointerId | the id of the pointer. |
| std::invalid_argument | when pointerType is invalid. |
| std::invalid_argument | when x or y is not a number. |
| std::invalid_argument | when t exceeds year 9999. |
| std::invalid_argument | when f is not a number or is negative. |
| std::invalid_argument | when tilt is not a number or is outside [0, Pi/2]. |
| std::invalid_argument | when orientation is not a number or is outside [-Pi, Pi]. |
| pointer_sequence_error | when pointerDown() has already been called. |
| std::runtime_error | in "Text Document" parts, when no view size is set. |
|
pure virtual |
Registers a pointer move event.
| x | pointer event x coordinate (view coordinates in pixel). |
| y | pointer event y coordinate (view coordinates in pixel). |
| t | pointer event timestamp, in ms since Unix EPOCH. |
| f | normalized pressure, in [0,1]. |
| pointerType | the type of input. |
| pointerId | the id of the pointer. |
| std::invalid_argument | when pointerType is invalid. |
| std::invalid_argument | when x or y is not a number. |
| std::invalid_argument | when t exceeds year 9999. |
| std::invalid_argument | when f is not a number or is negative. |
| std::invalid_argument | when stroke has too many points. |
| pointer_sequence_error | when pointerDown() has not been called before. |
|
pure virtual |
Registers a pointer move event.
| x | pointer event x coordinate (view coordinates in pixel). |
| y | pointer event y coordinate (view coordinates in pixel). |
| t | pointer event timestamp, in ms since Unix EPOCH. |
| f | normalized pressure, in [0,1]. |
| tilt | the tilt in radians. 0 is perpendicular, Pi/2 if flat on screen. |
| orientation | the orientation in radians. 0 is pointing up, -Pi/2 is left, Pi/2 is right, +/-Pi is down. |
| pointerType | the type of input. |
| pointerId | the id of the pointer. |
| std::invalid_argument | when pointerType is invalid. |
| std::invalid_argument | when x or y is not a number. |
| std::invalid_argument | when t exceeds year 9999. |
| std::invalid_argument | when f is not a number or is negative. |
| std::invalid_argument | when tilt is not a number or is outside [0, Pi/2]. |
| std::invalid_argument | when orientation is not a number or is outside [-Pi, Pi]. |
| std::invalid_argument | when stroke has too many points. |
| pointer_sequence_error | when pointerDown() has not been called before. |
|
pure virtual |
Registers a pointer up event.
| x | pointer event x coordinate (view coordinates in pixel). |
| y | pointer event y coordinate (view coordinates in pixel). |
| t | pointer event timestamp, in ms since Unix EPOCH. |
| f | normalized pressure, in [0,1]. |
| pointerType | the type of input. |
| pointerId | the id of the pointer. |
| std::invalid_argument | when pointerType is invalid. |
| std::invalid_argument | when x or y is not a number. |
| std::invalid_argument | when t exceeds year 9999. |
| std::invalid_argument | when f is not a number or is negative. |
| pointer_sequence_error | when pointerDown() has not been called before. |
|
pure virtual |
Registers a pointer up event.
| x | pointer event x coordinate (view coordinates in pixel). |
| y | pointer event y coordinate (view coordinates in pixel). |
| t | pointer event timestamp, in ms since Unix EPOCH. |
| f | normalized pressure, in [0,1]. |
| tilt | the tilt in radians. 0 is perpendicular, Pi/2 if flat on screen. |
| orientation | the orientation in radians. 0 is pointing up, -Pi/2 is left, Pi/2 is right, +/-Pi is down. |
| pointerType | the type of input. |
| pointerId | the id of the pointer. |
| std::invalid_argument | when pointerType is invalid. |
| std::invalid_argument | when x or y is not a number. |
| std::invalid_argument | when t exceeds year 9999. |
| std::invalid_argument | when f is not a number or is negative. |
| std::invalid_argument | when tilt is not a number or is outside [0, Pi/2]. |
| std::invalid_argument | when orientation is not a number or is outside [-Pi, Pi]. |
| pointer_sequence_error | when pointerDown() has not been called before. |
|
pure virtual |
Cancels an ongoing pointer trace.
| pointerId | the id of the pointer, -1 for all. |
|
pure virtual |
Sends a series of pointer events.
| events | the list of events (view coordinates in pixel). |
| processGestures | tells whether to process gestures or not. |
| std::invalid_argument | when a pointer event contains incorrect data. |
| std::invalid_argument | when a stroke has too many points. |
| std::invalid_argument | when events contain more than 20 strokes and processGestures is true. |
| pointer_sequence_error | when event sequence is not allowed. |
|
pure virtual |
Sets the size of the view.
| width | the view width (view coordinates in pixel). |
| height | the view height (view coordinates in pixel). |
| std::invalid_argument | when width or height is negative. |
| pointer_sequence_error | when a sequence of pointer events is ongoing. |
|
pure virtual |
Gets the width of the view.
|
pure virtual |
Gets the height of the view.
|
pure virtual |
Clamps the supplied view offset to the area that ensures standard scrolling behavior. For "Text" and "Text Document" it allows scrolling one screen outside of the view box downward. For other part types it allows scrolling one screen outside of the view box in each direction.
| viewOffset | the view offset to clamp (document coordinates in mm). |
|
pure virtual |
Changes the rendering theme style sheet, from a buffer containing CSS styling information.
| styleSheet | the style sheet, in CSS format. |
| std::invalid_argument | when styleSheet is invalid. |
| pointer_sequence_error | when a sequence of pointer events is ongoing. |
|
pure virtualnoexcept |
Returns the rendering theme style sheet, in CSS format.
|
pure virtual |
Returns the content block at the root of the current part.
|
pure virtual |
Returns the content block associated with a given id.
| id | the identifier of the block. |
id or nullptr if there is no such block in the current part.
|
pure virtual |
Checks whether a content selection is empty.
| selection | the content selection to check, nullptr means check the full part. |
true if selection is empty or invalid or editor is not associated with a part, otherwise false.
|
pure virtualnoexcept |
Returns the types of blocks that can be added to the part.
|
pure virtualnoexcept |
Returns the supported formats for adding a new block with data.
| type | the type of the new block. |
|
pure virtual |
Adds a new block to the part.
| x | the approximate x position of the new block (view coordinates in pixel). |
| y | the approximate y position of the new block (view coordinates in pixel). |
| type | the type of the new block. |
| std::runtime_error | when type is not supported by current part type. |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when a block already exists at this position, and is not a "Container" block. |
| std::runtime_error | when empty space around position is too small for a new block. |
| pointer_sequence_error | when a sequence of pointer events is ongoing. |
|
pure virtual |
Adds a new block to the part and fills it with data.
| x | the approximate x position of the new block (view coordinates in pixel). |
| y | the approximate y position of the new block (view coordinates in pixel). |
| type | the type of the new block. |
| mimeType | the mime type that specifies the format of data. |
| data | the data to put in the new block. |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when type is not supported by current part type. |
| std::runtime_error | when a block already exists at this position, and is not a "Container" block. |
| std::runtime_error | when the specified mime type is not supported by target block. |
| std::runtime_error | when empty space around position is too small for a new block. |
| std::runtime_error | when the content of data could not be added to the new block. |
| pointer_sequence_error | when a sequence of pointer events is ongoing. |
|
pure virtual |
Adds a new image to the part.
| x | the approximate x position of the new image (view coordinates in pixel). |
| y | the approximate y position of the new image (view coordinates in pixel). |
| inputFile | the image file to add. |
| mimeType | the mime type that specifies the format of inputFile. |
| std::invalid_argument | when inputFile does not exist. |
| std::invalid_argument | when mimeType is not an image type. |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when a block already exists at this position, and is not a "Container" block. |
| std::runtime_error | when empty space around position is too small for a new block. |
| std::runtime_error | when an I/O operation fails. |
| pointer_sequence_error | when a sequence of pointer events is ongoing. |
|
pure virtual |
Sets the background image for this part.
| inputFile | the image file to use as background, leave empty to remove the background image. |
| mimeType | the mime type that specifies the format of inputFile. |
| fit | the ImageFit mode to apply when fitting the background image into the part. |
| std::invalid_argument | when part is not a fixed page size part. |
| std::invalid_argument | when mimeType is not an image type. |
| std::invalid_argument | when fit is not a valid ImageFit value. |
| std::runtime_error | when inputFile does not exist. |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when an I/O operation fails. |
| pointer_sequence_error | when a sequence of pointer events is ongoing. |
|
pure virtual |
Gets the background image for this part. Image can then be retrieved via ContentPackage::extractObject().
|
pure virtual |
Erases a content selection from the part.
| selection | the content selection to erase. |
| std::invalid_argument | when selection is nullptr. |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when selection is not valid. |
| pointer_sequence_error | when a sequence of pointer events is ongoing. |
|
pure virtual |
Returns the block at the given position, or nullptr if there is no block at that position.
| x | the hit position x coordinate (view coordinates in pixel). |
| y | the hit position y coordinate (view coordinates in pixel). |
nullptr if no block was found.
|
pure virtual |
Returns the lowest sub block at the given position, or nullptr if there is no block at that position.
| x | the hit position x coordinate (view coordinates in pixel). |
| y | the hit position y coordinate (view coordinates in pixel). |
nullptr if no block was found.
|
pure virtual |
Returns the supported target conversion states for the specified selection.
| selection | the content selection for which the supported target conversion states are requested, nullptr means full part. |
|
pure virtual |
Converts the specified content selection to digital form.
| selection | the content selection to convert, nullptr means convert full part. For a ContentSelection, the intersecting blocks will be fully converted. |
| targetState | the target conversion state for the content selection. |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when selection is not valid. |
| std::invalid_argument | when the target conversion state is not reachable from the current state of the specified content selection. |
| pointer_sequence_error | when a sequence of pointer events is ongoing. |
|
pure virtual |
Returns the supported export formats for specified content selection.
| selection | the content selection to request, nullptr means full part. |
|
pure virtual |
Exports the specified content selection.
export_ because the C++ standard defines export as a keyword.| selection | the content selection to export, nullptr means export full part. |
| mimeType | the mime type that specifies the output format. |
| overrideConfiguration | the extra configuration used when exporting. |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when the specified mime type is not supported. |
| std::runtime_error | when an I/O operation fails. |
| std::runtime_error | when there are some ongoing operations on the part that prevent export, see isIdle(). |
| std::invalid_argument | when overrideConfiguration is invalid. |
|
pure virtual |
Exports the specified content selection.
export_ because the C++ standard defines export as a keyword.| selection | the content selection to export, nullptr means export full part. |
| outputFile | the file to export to. |
| imagePainter | an image painter that is required for some output formats. If you know that the specified output format does not require it you can leave it null. |
| overrideConfiguration | the extra configuration used when exporting. |
| std::runtime_error | when editor is not associated with a part. |
| std::invalid_argument | when outputFile is invalid. |
| std::runtime_error | when the mime type cannot be determined from the output file name. |
| std::runtime_error | when imagePainter does not create the expected file. |
| std::runtime_error | when an I/O operation fails. |
| std::runtime_error | when there are some ongoing operations on the part that prevent export, see isIdle(). |
| std::invalid_argument | when overrideConfiguration is invalid. |
|
pure virtual |
Exports the specified content selection.
export_ because the C++ standard defines export as a keyword.| selection | the content selection to export, nullptr means export full part. |
| outputFile | the file to export to. |
| mimeType | the mime type that specifies the output format. |
| imagePainter | an image painter that is required for some output formats. If you know that the specified output format does not require it you can leave it null. |
| overrideConfiguration | the extra configuration used when exporting. |
| std::runtime_error | when editor is not associated with a part. |
| std::invalid_argument | when outputFile is invalid. |
| std::runtime_error | when the specified mime type is not supported. |
| std::runtime_error | when imagePainter saveImage() fails. |
| std::runtime_error | when an I/O operation fails. |
| std::runtime_error | when there are some ongoing operations on the part that prevent export, see isIdle(). |
| std::invalid_argument | when overrideConfiguration is invalid. |
|
pure virtual |
Returns the supported import formats for specified content selection.
| selection | the content selection to request, nullptr means full part. |
|
pure virtual |
Imports data into the part or a content selection.
| mimeType | the mime type that specifies the format of data. |
| data | the data to import. |
| selection | the target content selection, or nullptr to let editor detect the target. |
| overrideConfiguration | the extra configuration used when importing. |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when the specified mime type is not supported. |
| std::runtime_error | when data could not be imported. |
| std::invalid_argument | when overrideConfiguration is invalid. |
| pointer_sequence_error | when a sequence of pointer events is ongoing. |
|
pure virtual |
Copies a content selection to the internal clipboard.
| selection | the content selection to copy, nullptr means full part. |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when selection is not valid. |
| std::runtime_error | when selection cannot be copied. |
| pointer_sequence_error | when a sequence of pointer events is ongoing. |
|
pure virtual |
Pastes the content of the internal clipboard at a given position. Internal clipboard is filled by calling copy(). If internal clipboard is empty, this does nothing.
| x | the target pasted block x coordinate (view coordinates in pixel). |
| y | the target pasted block y coordinate (view coordinates in pixel). |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when content of the clipboard cannot be pasted on the part. |
| pointer_sequence_error | when a sequence of pointer events is ongoing. |
|
pure virtualnoexcept |
Checks whether part modification operations are over.
true if no operation is ongoing on the part, otherwise false.
|
pure virtualnoexcept |
Waits until part modification operations are over.
|
pure virtualnoexcept |
Checks whether scrolling on the part is allowed at this time.
true if scrolling is allowed, otherwise false.
|
pure virtualnoexcept |
Returns the configuration associated with this editor.
|
pure virtual |
Draws pointer events, with current editor style settings, on the given canvas.
| events | the list of events (view coordinates in pixel). |
| canvas | the canvas on which editor should send the drawing commands. |
| std::runtime_error | when editor is not associated with a part. |
| std::invalid_argument | when canvas is nullptr. |
| std::invalid_argument | when renderer configuration is invalid. |
| std::invalid_argument | when a pointer event contains incorrect data. |
| std::invalid_argument | when a stroke has too many points. |
| pointer_sequence_error | when events sequence is invalid. |
|
pure virtual |
Tells if this editor has an active content selection.
true if the editor has an active content selection, otherwise false.| std::runtime_error | when editor is not associated with a part. |
|
pure virtual |
Returns the content selection associated with this editor.
| std::runtime_error | when editor is not associated with a part. |
|
pure virtual |
Sets the specified content selection as the active content selection in this editor.
nullptr.| selection | the content selection to set as active. |
| mode | the selection mode to set on the selection, NONE for default mode (since 4.5). |
| std::invalid_argument | when the mode is not supported. |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when selection is not valid. |
| pointer_sequence_error | when a sequence of pointer events is ongoing. |
|
pure virtual |
Returns the active content selection at the given position, or nullptr if there is no active content selection at that position.
| x | the hit position x coordinate (view coordinates in pixel). |
| y | the hit position y coordinate (view coordinates in pixel). |
nullptr.
|
pure virtual |
Returns the content block ids intersecting with the specified content selection.
| selection | the content selection on which to get the intersecting block ids. |
| std::invalid_argument | when selection is nullptr. |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when selection is not valid. |
|
pure virtual |
Returns the content block ids included in the specified content selection.
| selection | the content selection on which to get the included block ids. |
| std::invalid_argument | when selection is nullptr. |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when selection is not valid. |
|
pure virtual |
Checks if a transformation is allowed on a content selection.
| selection | the content selection on which to check the transformation. |
| transform | the transformation to check. |
TransformError.| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when selection is not valid. |
|
pure virtual |
Transforms a selection.
| selection | the content selection on which to apply the transformation. |
| transform | the transformation to apply. |
| std::invalid_argument | when selection is nullptr. |
| std::runtime_error | when selection is not valid. |
| std::invalid_argument | when transform is not valid for this operation. |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when the transform is not allowed on the content selection. |
| pointer_sequence_error | when a sequence of pointer events is ongoing. |
|
pure virtual |
Applies CSS style properties to a content selection.
| selection | the content selection on which to apply the style. |
| style | the CSS style properties to apply. |
| std::invalid_argument | when selection is nullptr. |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when selection is not valid. |
| pointer_sequence_error | when a sequence of pointer events is ongoing. |
|
pure virtual |
Returns the supported text formats for specified content selection.
| selection | the content selection to request, nullptr means full part. |
| std::runtime_error | when selection is not valid. |
|
pure virtual |
Applies Format to all text blocks in selection.
| selection | the content selection on which to apply the format. |
| format | the text format value. |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when selection is not valid. |
| pointer_sequence_error | when a sequence of pointer events is ongoing. |
|
pure virtual |
Returns the selection mode of the active content selection associated with this editor.
| std::runtime_error | when editor is not associated with a part. |
|
pure virtual |
Sets the specified selection mode to the active content selection associated with this editor.
| mode | the selection mode to set on the active content selection. |
| std::invalid_argument | when the mode is not supported. |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when editor has no active selection. |
| pointer_sequence_error | when a sequence of pointer events is ongoing. |
|
pure virtual |
Returns the available selection modes for the specified content selection.
| selection | the content selection on which to get the modes, nullptr for the active selection (since 4.5). |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when selection is not valid. |
|
pure virtual |
Sets a selection to the specified type.
| selection | the content selection on which to set the type. |
| type | the content type to set. See getAvailableSelectionTypes(). |
| forceSingleBlock | true to force converting the selection to a single block, false otherwise. |
| std::invalid_argument | when the type is not supported. |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when selection is not valid. |
| std::runtime_error | when selection is not compatible with the type. |
| pointer_sequence_error | when a sequence of pointer events is ongoing. |
|
pure virtual |
Returns the available types for a selection.
| selection | the content selection on which to get the types. |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when selection is not valid. |
|
pure virtual |
Returns the indentation levels of a selection.
| selection | the content selection on which to get indentation levels, nullptr means full part. |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when selection is not valid. |
| std::runtime_error | when selection is empty. |
|
pure virtual |
Indents/de-indents a selection by the specified offset.
[0, max_indentation[. See getIndentationLevels().| selection | the content selection to indent/de-indent. |
| offset | the number of levels to indent/de-indent the selection. |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when selection is not valid. |
| std::runtime_error | when selection is empty. |
| std::runtime_error | when selection is not indentable. |
| pointer_sequence_error | when a sequence of pointer events is ongoing. |
|
pure virtual |
Returns the bounding box of the given selection.
| selection | the content selection for which the box is requested. |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when selection is not valid. |
|
pure virtual |
Returns the current conversion state of the given selection as a bitwise or combination of ConversionState values.
| selection | the content selection for which the conversion state is requested. |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when selection is not valid. |