Desktop
Extends:
Desktop Class
Constructor Summary
| Public Constructor | ||
| public |
constructor(core: Core, options: DesktopOptions) Create Desktop |
|
Member Summary
| Public Members | ||
| public |
$icons: Element[] Icon DOM elements |
|
| public |
$theme: Element[] Theme DOM elements |
|
| public |
Default context menu entries |
|
| public |
Core instance reference |
|
| public |
Icon View instance |
|
| public |
keyboardContext: Element | null Keyboard context dom element |
|
| public |
Desktop Options |
|
| public |
Search instance |
|
| public |
Desktop subtraction rectangle TODO: typedef |
|
Method Summary
| Public Methods | ||
| public |
addContextMenu(entries: DesktopContextMenuEntry[]) Adds something to the default contextmenu entries |
|
| public |
applyIconView(settings: DesktopIconViewSettings) Adds or removes the icon view |
|
| public |
applyIcons(name: string): Promise<undefined> Sets the current icon theme from settings |
|
| public |
applySettings(settings: DesktopSettings): DesktopSettings Applies settings and updates desktop |
|
| public |
applyTheme(name: string): Promise<undefined> Sets the current style theme from settings |
|
| public |
createDropContextMenu(data: Object): Object[] Create drop context menu entries |
|
| public |
destroy() Destroy Desktop |
|
| public |
Gets the rectangle of available space |
|
| public |
init() Initializes Desktop |
|
| public |
Initializes base events |
|
| public |
Initializes connection events |
|
| public |
Initializes development tray icons |
|
| public |
Initializes drag-and-drop events |
|
| public |
Initializes global keyboard events |
|
| public |
Initializes keyboard events |
|
| public |
Initializes locales |
|
| public |
Initializes mouse events |
|
| public |
Initializes user interface events |
|
| public |
onContextMenu(ev: Event) When context menu is shown |
|
| public |
onDeveloperMenu(ev: Event) When developer menu is shown |
|
| public |
onDropContextMenu(ev: Event, data: Object) When drop menu is shown |
|
| public |
setKeyboardContext(ctx: Element) Sets the keyboard context. |
|
| public |
start() Starts desktop services |
|
| Private Methods | ||
| private |
_applySettingsByKey(k: string, v: *): Promise<boolean> Apply settings by key |
|
| private |
_applyTheme(name: string): Promise<undefined> Apply theme wrapper |
|
| private |
Removes current icon theme from DOM |
|
| private |
Removes current style theme from DOM |
|
| private |
Update CSS |
|
Public Constructors
Public Members
Public Methods
public addContextMenu(entries: DesktopContextMenuEntry[]) source
Adds something to the default contextmenu entries
Params:
| Name | Type | Attribute | Description |
| entries | DesktopContextMenuEntry[] |
public applyIconView(settings: DesktopIconViewSettings) source
Adds or removes the icon view
Params:
| Name | Type | Attribute | Description |
| settings | DesktopIconViewSettings |
public applyIcons(name: string): Promise<undefined> source
Sets the current icon theme from settings
Params:
| Name | Type | Attribute | Description |
| name | string | Icon theme name |
public applySettings(settings: DesktopSettings): DesktopSettings source
Applies settings and updates desktop
Params:
| Name | Type | Attribute | Description |
| settings | DesktopSettings |
|
Use this set instead of loading from settings |
public applyTheme(name: string): Promise<undefined> source
Sets the current style theme from settings
Params:
| Name | Type | Attribute | Description |
| name | string | Theme name |
public createDropContextMenu(data: Object): Object[] source
Create drop context menu entries
Params:
| Name | Type | Attribute | Description |
| data | Object | Drop data |
public getRect(): DesktopViewportRectangle source
Gets the rectangle of available space
This is based on any panels etc taking up space
public onContextMenu(ev: Event) source
When context menu is shown
Params:
| Name | Type | Attribute | Description |
| ev | Event |
public onDeveloperMenu(ev: Event) source
When developer menu is shown
Params:
| Name | Type | Attribute | Description |
| ev | Event |
public onDropContextMenu(ev: Event, data: Object) source
When drop menu is shown
Params:
| Name | Type | Attribute | Description |
| ev | Event | ||
| data | Object |
public setKeyboardContext(ctx: Element) source
Sets the keyboard context.
Used for tabbing and other special events
Params:
| Name | Type | Attribute | Description |
| ctx | Element |
|
Private Methods
private _applySettingsByKey(k: string, v: *): Promise<boolean> source
Apply settings by key
Params:
| Name | Type | Attribute | Description |
| k | string | Key |
|
| v | * | Value |
