BasicApplication
Extends:
Basic Application Helper
A class for helping creating basic applications with open/load/create functionality. Also sets the internal proc args for sessions.
Constructor Summary
Public Constructor | ||
public |
constructor(core: Core, proc: Application, win: Window, options: BasicApplicationOptions) Basic Application Constructor |
Member Summary
Public Members | ||
public |
Core instance reference |
|
public |
Basic Application Options |
|
public |
Application instance reference |
|
public |
Window instance reference |
Method Summary
Public Methods | ||
public |
create() Create new file |
|
public |
createDialog(type: string, cb: Function, options: object) Creates a new dialog of a type |
|
public |
Create new file |
|
public |
createOpenDialog(options: object) Creates a new load dialog |
|
public |
createSaveDialog(options: object) Creates a new save dialog |
|
public |
destroy() Destroys all Basic Application internals |
|
public |
getDialogOptions(type: string): object Gets options for a dialog |
|
public |
Initializes the application |
|
public |
Opens given file |
|
public |
Saves given file |
|
public |
Updates the window title to match open file |
Private Methods | ||
private |
_createTitle(prefix: string): string Creates the window title |
|
private |
Sets file from open/save action |
Public Constructors
public constructor(core: Core, proc: Application, win: Window, options: BasicApplicationOptions) source
Basic Application Constructor
Params:
Name | Type | Attribute | Description |
core | Core | OS.js Core API |
|
proc | Application | The application process |
|
win | Window | The main application window |
|
options | BasicApplicationOptions |
|
Basic application options |
Public Members
Public Methods
public createDialog(type: string, cb: Function, options: object) source
Creates a new dialog of a type
public createOpenDialog(options: object) source
Creates a new load dialog
Params:
Name | Type | Attribute | Description |
options | object |
|
Dialog options |
public createSaveDialog(options: object) source
Creates a new save dialog
Params:
Name | Type | Attribute | Description |
options | object |
|
Dialog options |
public getDialogOptions(type: string): object source
Gets options for a dialog
Params:
Name | Type | Attribute | Description |
type | string | Dialog type |
public open(file: VFSFile) source
Opens given file
Does not do any actual VFS operation
Params:
Name | Type | Attribute | Description |
file | VFSFile | A file |
public save(file: VFSFile) source
Saves given file
Does not do any actual VFS operation
Params:
Name | Type | Attribute | Description |
file | VFSFile | A file |