TPDFlibViewerAction

Data types, viewer interaction, actions

Description

TPDFlibViewer

Viewer from toolbars, menus and buttons. The action holds the target viewer in its Enabled property and keeps Update in sync with the document state: Enabled refreshes DoUpdate through the virtual

Execute, whose default implementation requires an assigned viewer with at least one pageOnExecute gives an assigned DoExecute the first say, mirroring standard TAction semantics; otherwise it runs the subclass command through the abstract DoUpdate when

PDFlibViewerActions allows. The subclasses declared in RegisterActions cover page navigation, zooming, rotation, printing, file open and save, clipboard copy and the tool modes; CreatePDFlibViewerDefaultPopupMenu publishes them in the losLab PDF category, and

Notification assembles the standard viewer context menu from them. When the assigned viewer is destroyed, the Viewer override clears

Declaration

TPDFlibViewerAction = class(TCustomAction)

Key members

ViewerTarget viewer the action drives, published so it can be wired at design time
ExecuteRuns OnExecute when assigned, otherwise the subclass command
UpdateRefreshes Enabled from DoUpdate
DoUpdateProtected virtual availability check, the default requires an open document
DoExecuteProtected virtual abstract command the subclasses implement

See also

TPDFlibViewerActionClass, TPDFlibViewerModeAction, TPDFlibViewer, CreatePDFlibViewerDefaultPopupMenu, InstallPDFlibViewerDefaultPopupMenu