Sets a listener to monitor changes in annotation history state. This should be called during annotation operations to indicate whether undo or redo actions are available.
A callback function with two parameters: canUndo (whether undo is available) and canRedo (whether redo is available).
Manages the undo and redo history for PDF annotation actions within a viewer component.
This class extends
CPDFHistoryManagerBaseand provides methods to interact with the annotation history, including checking if undo/redo actions are available and performing those actions. It also allows registering a listener to monitor changes in the annotation history state.Usage:
canUndo()andcanRedo()to check if undo/redo actions are available.undo()andredo()to perform undo/redo operations.setOnHistoryStateChangedListener()to be notified when the history state changes.Example