UNPKG

@mescius/dsimageviewer

Version:

Document Solutions Image Viewer

55 lines (54 loc) 1.74 kB
import { GcImageViewer } from '../GcImageViewer'; import { ViewerOptions } from '../ViewerOptions'; /** * Keyboard shortcuts worker. **/ export declare class KeyboardWorker { private readonly _viewer; options: Partial<ViewerOptions>; /** * Event handlers attached to current frame window. * */ private _windowHandlers; /** * Event handlers attached to the top-most window. * */ private _topWindowHandlers; /** * Event handlers attached to the pdf eventbus. * */ private _eventBusHandlers; /** * true when shift key is pressed. * */ private _shiftKeyPressedFlag; constructor(_viewer: GcImageViewer, options: Partial<ViewerOptions>); dispose(): void; /** * Called when options property changed. * */ applyOptions(options?: Partial<ViewerOptions> | null): void; tool_zoomPageWidth(): boolean; tool_zoomActualSize(): boolean; tool_zoomIn(): boolean; tool_zoomOut(): boolean; tool_print(): boolean; tool_undo(): boolean; tool_redo(): boolean; tool_open(): boolean; tool_save(): boolean; tool_rotate(): boolean; tool_rotateBackward(): boolean; tool_confirmChanges(): void; tool_cancelChanges(): void; handleShortcut(e: KeyboardEvent): any; private _bindWindowEvents; private _unbindWindowEvents; private _bindEventBusEvents; private _unbindEventBusEvents; onWindowKeyDown(event: KeyboardEvent): boolean; onWindowKeyUp(event: KeyboardEvent): boolean; onTopWindowKeyDown(event: KeyboardEvent): void; onTopWindowKeyUp(event: KeyboardEvent): void; _handleShiftKey(shiftKeyPressed: boolean): void; }