Annotating Controller
Controller for annotation mode, provided via OnAnnotatingModeChangeListener callbacks.
This is the primary interface for programmatically interacting with annotation mode. It provides methods for managing the active annotation tool, querying and modifying the current annotation selection, toggling the property inspector, and accessing annotation preferences.
Not to be confused with AnnotatingInspectorController, which controls the property inspector panel UI (show/hide, bind/unbind lifecycle).
Functions
Link copied to clipboard
Register a OnAnnotatingModeChangeListener to get notified when annotation mode (creation or editing) gets updated.
Link copied to clipboard
Register a OnAnnotatingModeSettingsChangeListener to get notified when annotation mode settings get updated.
Link copied to clipboard
abstract fun bindAnnotationInspectorController(@NonNull annotationInspectorController: AnnotationInspectorController)
Binds to the annotation inspector controller for managing annotation inspector.
Link copied to clipboard
abstract fun changeAnnotationCreationMode(@NonNull annotationTool: AnnotationTool, @NonNull annotationToolVariant: AnnotationToolVariant)
Starts an annotation creation mode with different annotation tool selected.
Link copied to clipboard
Clears the current annotation selection.
Link copied to clipboard
Deletes currently selected annotations from the document.
Link copied to clipboard
Displays/hides an annotation inspector for the measurement annotation types.
Link copied to clipboard
Starts playback mode for the currently selected sound annotation.
Link copied to clipboard
Starts recording mode for the currently selected sound annotation.
Link copied to clipboard
Returns annotation creation tool that is currently active.
Link copied to clipboard
Returns the variant of the annotation creation tool that is currently active.
Link copied to clipboard
Gets alpha set to the annotation creation mode.
Link copied to clipboard
Returns an annotation editing preferences.
Link copied to clipboard
Gets border style preset set to the annotation creation mode.
Link copied to clipboard
Returns an active configuration.
Link copied to clipboard
Returns currently selected annotations (if any).
Link copied to clipboard
Returns the currently selected annotation - only if there's just a single one selected.
Link copied to clipboard
Gets fill color set to the annotation creation mode.
Link copied to clipboard
Returns current line ending styles for drawn lines.
Link copied to clipboard
Gets the MeasurementValueConfiguration for measurement annotations.
Link copied to clipboard
Gets outline color set to the annotation creation mode.
Link copied to clipboard
Gets the overlay text set to the annotation creation mode.
Link copied to clipboard
Returns whether the overlay text should be repeated or not.
Link copied to clipboard
Gets text size set to the annotation creation mode.
Link copied to clipboard
Gets thickness set to the annotation creation mode.
Link copied to clipboard
Returns whether there are any currently selected annotations.
Link copied to clipboard
Checks if all currently selected annotations can be copied.
Checks if all provided annotations can be copied.
Link copied to clipboard
Checks if all currently selected annotations can be cut.
Checks if all provided annotations can be cut.
Link copied to clipboard
Checks if all currently selected annotations can be deleted.
Checks if all provided annotations can be deleted.
Link copied to clipboard
open fun recordAnnotationZIndexEdit(@NonNull annotation: Annotation, oldZIndex: Int, newZIndex: Int)
Records the z-index being changed on the specified annotation.
Link copied to clipboard
abstract fun removeOnAnnotatingModeChangeListener(@NonNull listener: OnAnnotatingModeChangeListener)
Remove a previously registered OnAnnotatingModeChangeListener.
Link copied to clipboard
abstract fun removeOnSettingsChangeListener(@NonNull listener: OnAnnotatingModeSettingsChangeListener)
Remove a previously registered OnAnnotatingModeSettingsChangeListener.
Link copied to clipboard
Selects the specified annotations for editing.
Link copied to clipboard
Sets alpha to the annotation creation mode.
Link copied to clipboard
Sets border preset to the annotation creation mode.
Link copied to clipboard
Sets fill color for the annotation creation mode.
Link copied to clipboard
Sets line ending style for drawn lines.
Link copied to clipboard
abstract fun setMeasurementValueConfiguration(@Nullable configuration: MeasurementValueConfiguration)
Sets the MeasurementValueConfiguration for measurement annotations.
Link copied to clipboard
Sets outline color for the annotation creation mode.
Link copied to clipboard
Sets the overlay text to the annotation creation mode.
Link copied to clipboard
Sets if the overlay text should be repeated.
Link copied to clipboard
Sets text size to the annotation creation mode.
Link copied to clipboard
Sets thickness to the annotation creation mode.
Link copied to clipboard
Whether annotation inspector toolbar icon should be visible.
Link copied to clipboard
Whether play button should be displayed for the selected sound annotation.
Link copied to clipboard
Whether record button should be displayed for the selected sound annotation.
Link copied to clipboard
Shows annotation editor for the passed annotation.
Link copied to clipboard
Temporarily hides the selected/edited annotation view and shows its relative position on the page.
Link copied to clipboard
Starts recording the edits for undo/redo support.
Link copied to clipboard
Stops recording the edits, notifies the result and clears current record, so calling startRecording will start from clean state.
Link copied to clipboard
Displays/hides an annotation inspector for the selected annotation type.
Link copied to clipboard
Unbinds from previously bound annotation inspector controller.