import { Vector } from "asciiflow/client/vector" ; import { IModifierKeys } from "asciiflow/client/store" ; /**
 * Common interface for different drawing functions, e.g. box, line, etc.
 */ export interface IDrawFunction { /**
     *  Start of drawing.
     */ start ( position , modifierKeys ) : void ; /**
     * Drawing move.
     */ move ( position , modifierKeys ) : void ; /**
     * End of drawing.
     */ end ( ) : void ; /**
     * Cursor for given cell.
     */ getCursor ( position , modifierKeys ) : string ; /**
     * Handle the key with given value being pressed.
     */ handleKey ( value , modifierKeys ) : void ; /**
     * When exiting the tool.
     */ cleanup ( ) : void ; } export abstract class AbstractDrawFunction implements IDrawFunction { start ( position , modifierKeys ) { } move ( position , modifierKeys ) { } end ( ) { } getCursor ( position , modifierKeys ) { return "default" ; } handleKey ( value , modifierKeys ) { } cleanup ( ) { } }