Methods
(static) add_win(id, layout)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
id |
string | |
layout |
WinLayoutCallback |
Throws:
-
If window with given id exists
- Type
- Error
(static) connect(id, widget) → {Widget}
- Source:
Connects a widget to a window. If the window has a connected widget, it is automatically disconnected.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | |
widget |
Widget |
Throws:
-
If window with given id doesn't exist
- Type
- Error
Returns:
The given widget
- Type
- Widget
(static) del_win(id)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
id |
string |
Throws:
-
If window with given id does not exist
- Type
- Error
(static) disconnect(id) → {Widget|undefined}
- Source:
Disconnect a widget from its window and return the widget
Parameters:
Name | Type | Description |
---|---|---|
id |
string |
Returns:
- Type
- Widget | undefined
(static) get_widget(id) → {Widget|undefined}
- Source:
Get the widget connected to a given window
Parameters:
Name | Type | Description |
---|---|---|
id |
string |
Returns:
- Type
- Widget | undefined
(static) get_win(id) → {Widget|undefined}
- Source:
Get a window by id
Parameters:
Name | Type | Description |
---|---|---|
id |
string |
Returns:
- Type
- Widget | undefined
(static) init()
- Source:
(static) relayout()
- Source:
(static) run(cb)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
cb |
WuiRunCallback |
(static) send_key(key) → {boolean}
- Source:
Routes a key through all enabled widgets
Parameters:
Name | Type | Description |
---|---|---|
key |
number |
Returns:
- Type
- boolean
(static) set_debug_enabled(enabled)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
enabled |
boolean |