smoosic
Version:
<sub>[Github site](https://github.com/Smoosic/smoosic) | [source documentation](https://smoosic.github.io/Smoosic/release/docs/modules.html) | [change notes](https://aarondavidnewman.github.io/Smoosic/changes.html) | [application](https://smoosic.github.i
80 lines • 3.03 kB
TypeScript
import { KeyEvent } from '../smo/data/common';
import { SuiExceptionHandler } from '../ui/exceptions';
import { Qwerty } from '../ui/qwerty';
import { SuiPiano } from '../render/sui/piano';
import { CompleteNotifier } from '../ui/common';
import { SuiTracker } from '../render/sui/tracker';
import { SuiScoreViewOperations } from '../render/sui/scoreViewOperations';
import { BrowserEventSource } from '../ui/eventSource';
import { SuiKeyCommands } from './keyCommands';
import { KeyBinding, ModalEventHandler } from './common';
import { ModifierTab } from '../smo/xform/selections';
import { SuiMenuManager } from '../ui/menus/manager';
import { SmoConfiguration } from './configuration';
/**
* Handle keyboard/mouse events, and pass them to the renderer and other UI elements.
* @category SuiApplication
*/
export interface EventHandlerParams {
view: SuiScoreViewOperations;
eventSource: BrowserEventSource;
tracker: SuiTracker;
keyCommands: SuiKeyCommands;
menus: SuiMenuManager;
completeNotifier: CompleteNotifier;
keyBindings: KeyBinding[];
config: SmoConfiguration;
}
/**
* this is the default keyboard/mouse handler for smoosic in application mode.
* It diverts key events to tracker or key commmands as appropriate, and mouse events to
* tracker. Modal elements take this control away temporarily.
*
* It also handles some global events such as window resize and scroll of the music region.
* @category SuiApplication
*/
export declare class SuiEventHandler implements ModalEventHandler {
static reentry: boolean;
static keyboardUi: Qwerty;
static showQwerty(): void;
static instance: SuiEventHandler;
static debugMask: number;
static altKeyPressed: boolean;
static ctrlKeyPressed: boolean;
static shiftKeyPressed: boolean;
view: SuiScoreViewOperations;
eventSource: BrowserEventSource;
tracker: SuiTracker;
keyBind: KeyBinding[];
completeNotifier: CompleteNotifier;
keyCommands: SuiKeyCommands;
resizing: boolean;
undoStatus: number;
trackScrolling: boolean;
config: SmoConfiguration;
keyHandlerObj: any;
menus: SuiMenuManager;
piano: SuiPiano | null;
exhandler: SuiExceptionHandler;
constructor(params: EventHandlerParams);
static get scrollable(): string;
private static handleScrollEventDefer;
handleScrollEvent(): void;
createPiano(): void;
resizeEvent(): void;
createModifierDialog(modifierSelection: ModifierTab): import("./exports").SuiDialogBase | null;
trackerModifierSelect(ev: KeyEvent): void;
bindResize(): void;
get renderElement(): Element;
static get editorKeyBindingDefaults(): KeyBinding[];
static get trackerKeyBindingDefaults(): KeyBinding[];
helpControls(): void;
menuHelp(): void;
keyUp(evdata: any): void;
handleMetaKeyDown(evdata: any): void;
evKey(evdata: any): void;
mouseMove(ev: any): void;
mouseClick(ev: any): void;
bindEvents(): void;
}
//# sourceMappingURL=eventHandler.d.ts.map