LineEditor

LineEditor

new LineEditor(propsopt)

Source:
Parameters:
Name Type Attributes Default Description
props object.<string, *> <optional>
{}

Extends

Methods

draw()

Source:
Inherited From:
See:

Draw the widget in the associated window

get_size() → {WindowSize}

Source:
Inherited From:

Return underlying window size

Returns:
Type
WindowSize

get_win() → {Window}

Source:
Inherited From:

Get associated window

Returns:
Type
Window

invalidate()

Source:
Inherited From:

Invalidate window contents, i.e.: mark widget as modified so that next drawing cycle refreshes screen contents.

is_disabled() → {boolean}

Source:
Inherited From:

Check whether the widget is disabled.

Returns:
Type
boolean

merge_keymap(map)

Source:
Inherited From:
See:

Merge some key mappings with current active keymap

Example
widget.merge_keymap([
  tui.KEY_UP, 'go_up',
  tui.KEY_DOWN, 'go_down',
]);
Parameters:
Name Type Description
map Array

An array of alternating key number, function name elements.

send_key(key) → {boolean}

Source:
Inherited From:
See:

Send a key to the widget so that it is processed according to the active keymap.

Parameters:
Name Type Description
key number

Key code

Returns:

Returns true if the key was processed

Type
boolean

set_disabled(disabled)

Source:
Inherited From:
See:

Disable widget so that it won't receive any keyboard input at all from module:wui.send_key.

Parameters:
Name Type Description
disabled boolean

set_keymap(map)

Source:
Inherited From:
See:

Overwrite current active keymap with new key mappings

Example
widget.set_keymap([
  tui.KEY_UP, 'go_up',
  tui.KEY_DOWN, 'go_down',
]);
Parameters:
Name Type Description
map Array

An array of alternating key number, function name elements.

set_listeners(listeners)

Source:
Inherited From:

Overwrite current listeners map with a new map

Parameters:
Name Type Description
listeners object.<string, WidgetListener>

set_win(win)

Source:
Inherited From:

Set associated window object. Note that this function invalidates the window contents so that it is cleared on next redraw.

Parameters:
Name Type Description
win Window

Events

input_changed

Source: