diff options
Diffstat (limited to 'editor/editor.d.ts')
| -rw-r--r-- | editor/editor.d.ts | 110 |
1 files changed, 57 insertions, 53 deletions
diff --git a/editor/editor.d.ts b/editor/editor.d.ts index ccd669e..29ab3b6 100644 --- a/editor/editor.d.ts +++ b/editor/editor.d.ts @@ -1,63 +1,67 @@ import { WuiVfsNodeInterface } from "../vfs/vfs"; export interface WuiEditorOptions { - id: string; - is_editable: boolean; - OnSelection(begin: number, end: number): void; - OnSave(content: string): void; + id: string; + is_editable: boolean; + OnSelection(begin: number, end: number): void; + OnSave(content: string): void; } export declare class WuiEditor { - opts: WuiEditorOptions; - id: string; - is_editable: boolean; - lines: WuiEditorLine[]; - private el; - private sel; - private active_file; - private active_text; - private range_begin; - private range_end; - private raw_lines; - private range; - private is_key_control; - private unre; - constructor(opts: WuiEditorOptions); - GetContent(): string; - GetSelectionRange(): WuiEditorSelectionRangeInterface; - OnClickText(text: HTMLElement): void; - OnKeyup(x: number, text: HTMLElement, ev: KeyboardEvent): boolean | undefined; - OnKeydownOnLine(x: number, el_text: HTMLElement, ev: KeyboardEvent): false | undefined; - OnMouseDownAtLine(x: number): void; - OnMouseUpAtLine(x: number): void; - SetEditOff(): void; - SetEditOn(): void; - Open(node: WuiVfsNodeInterface): void; - ClearSelection(): void; - private initStyle; - private doJoin; - private doSplit; - private doUpdate; - private doRedo; - private doUndo; - private deleteLine; - private insertNewline; - private onKeyupDocument; - private render; - private setCaret; + opts: WuiEditorOptions; + id: string; + is_editable: boolean; + lines: WuiEditorLine[]; + private el; + private sel; + private active_file; + private active_text; + private range_begin; + private range_end; + private raw_lines; + private range; + private is_key_control; + private unre; + constructor(opts: WuiEditorOptions); + GetContent(): string; + GetSelectionRange(): WuiEditorSelectionRangeInterface; + OnClickText(text: HTMLElement): void; + OnKeyup(x: number, text: HTMLElement, ev: KeyboardEvent): boolean | undefined; + OnKeydownOnLine( + x: number, + el_text: HTMLElement, + ev: KeyboardEvent, + ): false | undefined; + OnMouseDownAtLine(x: number): void; + OnMouseUpAtLine(x: number): void; + SetEditOff(): void; + SetEditOn(): void; + Open(node: WuiVfsNodeInterface): void; + ClearSelection(): void; + private initStyle; + private doJoin; + private doSplit; + private doUpdate; + private doRedo; + private doUndo; + private deleteLine; + private insertNewline; + private onKeyupDocument; + private render; + private setCaret; } declare class WuiEditorLine { - x: number; - text: string; - private line_num; - el: HTMLElement; - el_number: HTMLElement; - el_text: HTMLElement; - constructor(x: number, text: string, ed: WuiEditor); - SetNumber(x: number): void; - SetEditOn(): void; - SetEditOff(): void; + x: number; + text: string; + private line_num; + el: HTMLElement; + el_number: HTMLElement; + el_text: HTMLElement; + constructor(x: number, text: string, ed: WuiEditor); + SetNumber(x: number): void; + SetEditOn(): void; + SetEditOff(): void; } interface WuiEditorSelectionRangeInterface { - begin_at: number; - end_at: number; + begin_at: number; + end_at: number; } export {}; |
