Class: Extended

Extended(columns, rows, colorOfBorder, options)

The extended version of the multiwindow class

Constructor

new Extended(columns, rows, colorOfBorder, options)

Parameters:
Name Type Description
columns Array.<number> the sizes of the columns
rows Array.<number> the sizes of the rows
colorOfBorder string the color to make the border, see color_codes.txt for more info
options Object options for the instance
Properties
Name Type Description
padding paddingOptions global padding that will be set on all containers
border borderOptions options for what to draw borders out of
Source:

Extends

Members

(static) emitter

The input emitter for enableInput
Source:
See:

(static) menuCore

Get the menuCore class
Source:

(static) multiline

Get the Multiline class
Source:

(static) textStore

Same as multiline
Source:
See:
  • multiline

Methods

(static) highlight(text) → {string}

Highlight a piece of text
Parameters:
Name Type Description
text string the text to highlight
Source:
Returns:
- the highlighted text
Type
string

(static) underline(text) → {string}

Underline a piece of text
Parameters:
Name Type Description
text string the text to underline
Source:
Returns:
- the underlined text
Type
string

c()

Same as container
Overrides:
Source:
See:

clearAll()

Clear all containers
Overrides:
Source:

container(y, x) → {Container}

Get the container at the specified coordinates
Parameters:
Name Type Description
y number the container y position
x number the container x position
Overrides:
Source:
Returns:
- the container
Type
Container

createKeybind()

Incomplete function, for creating keybinds
Source:
To Do:
  • Implement function

drawBorders()

Internal function called for drawing the main borders.
Overrides:
Source:

enableInput() → {module:events.EventEmitter.EventEmitter}

Enables input processing for input, returns an event emitter
Source:
Returns:
Type
module:events.EventEmitter.EventEmitter

exit()

Exits the process Same as process.exit() but with correct formatting
Overrides:
Source:

gotoEnd()

Internally used function, moves cursor to bottom of console
Overrides:
Source:

pipeInput(containerY, containerX)

Write all registered keypress events to this container, and clear on newline Requires enableInput to be called first
Parameters:
Name Type Description
containerY number the y coordinate of the target container
containerX number the x coordinate of the target container
Source:
See:

setupExit()

Internally used function for setting up exit handling
Overrides:
Source:

Events

line

An event spitting out a whole line of text, on newline
Properties:
Name Type Description
data string the string that was captured
Source:
See:

raw

An event that is emitted on every keypress, returns an keypress Object
Properties:
Name Type Description
key keypress the key that was pressed
Source:
See: