An object for any miscellanous user data.
Element that implements the text hover. @internal
Absolute bottom offset, always zero.
Absolute left offset, always zero.
Absolute right offset, always zero.
Absolute top offset, always zero.
Automatically position child elements with border and padding in mind (NOTE: this is a recommended option. It may become default in the future).
Relative bottom offset, always zero.
Array of node's children.
Same as screen.width.
An object for any miscellanous user data.
true is the terminal was destroyed. @internal.
Automatically "dock" borders with other elements instead of overlapping, depending on position (experimental). For example: These border-overlapped elements:
Dump all output and input to desired file. Can be used together with log option if set as a boolean.
Do CSR on any element within 20 cols of the screen edge on either side. Faster than smartCSR, but may cause flickering depending on what is on each side of the element.
Top of the focus history stack.
Force blessed to use unicode even if it is not detected via terminfo, env variables, or windows code page. If value is true unicode is forced. If value is false non-unicode is forced (default: null).
Allow for rendering of East Asian double-width characters, utf-16 surrogate pairs, and unicode combining characters. This allows you to display text above the basic multilingual plane. This is behind an option because it may affect performance slightly negatively. Without this option enabled, all double-width, surrogate pair, and combining characters will be replaced by '??', '?', '' respectively. (NOTE: iTerm2 cannot display combining characters properly. Blessed simply removes them from an element's content if iTerm2 is detected).
Whether the focused element grabs all keypresses.
Height of the screen (same as program.rows).
focus history. @internal
The currently hovered element. Only set if mouse events are bound.
Normally, dockable borders will not dock if the colors or attributes are different. This option will allow them to dock regardless. It may produce some odd looking multi-colored borders though.
Array of keys in their full format (e.g. C-c) to ignore when keys are locked or grabbed. Useful for creating a key that will always exit no matter whether the keys are locked.
Render index (document order index) of the last render call.
Input and output streams. process.stdin/process.stdout by default, however, it could be a net.Socket if you want to make a program that runs over telnet or something of that nature.
Relative left offset, always zero.
Internal Screen buffer of current lines. Exposed for debug purpuses. @internal
Prevent keypresses from being received by any element.
Original options object.
Input and output streams. process.stdin/process.stdout by default, however, it could be a net.Socket if you want to make a program that runs over telnet or something of that nature.
Parent node. If null it means the element is not attached to any screen or program, or the node is a Screen.
The blessed Program to be associated with. Will be automatically instantiated if none is provided.
Amount of time (in ms) to redraw the screen after the terminal is resized (Default: 300).
Relative right offset, always zero.
Same as screen.height.
Parent screen.
Send focus events after mouse is enabled.
Attempt to perform CSR optimization on all possible elements (not just full-width ones, elements with uniform cells to their sides). This is known to cause flickering with elements that are not full-width, however, it is more optimal for terminal rendering.
The width of tabs within an element's content.
Set or get terminal name. Set calls screen.setTerminal() internally.
Set or get window title.
Relative top offset, always zero.
The blessed Tput object (only available if you passed tput: true to the Program constructor.)
Type of the node (e.g. box).
Unique identifier for Node instances. @internal
Attempt to perform back_color_erase optimizations for terminals that support it. It will also work with terminals that don't support it, but only on lines with the default background color. As it stands with the current implementation, it's uncertain how much terminal performance this adds at the cost of overhead within node.
Display warnings (such as the output not being a TTY, similar to ncurses).
Width of the screen (same as program.cols).
Allocate a new pending screen buffer and a new output screen buffer.
Append a node to this node's children.
Convert an SGR string to our own attribute format.
Parse the sides of an element to determine whether an element has uniform cells on both sides. If it does, we can use CSR to optimize scrolling on a scrollable element. Not exactly sure how worthwile this is. This will cause a performance/cpu-usage hit, but will it be less or greater than the performance hit of slow-rendering scrollable boxes with clean sides?
Clear any region on the screen.
Attempt to copy text to clipboard using iTerm2's proprietary sequence. Returns true if successful.
Attempt to change cursor color. Returns true if successful.
Attempt to reset cursor. Returns true if successful.
Attempt to change cursor shape. Will not work in all terminals (see artificial cursors for a solution to this). Returns true if successful.
Same as the log method, but only gets called if the debug option was set.
Delete a line at the bottom of the screen.
Delete a line from the screen (using csr: this bypasses the output buffer).
Delete a line at the top of the screen.
Destroy the screen object and remove it from the global list. Also remove all global events relevant to the screen object. If all screen objects are destroyed, the node process is essentially reset to its initial state.
Remove node from its parent.
Draw the screen based on the contents of the screen buffer.
Emit event for element, and recursively emit same event for all descendants. If s
is provided it will call [[iter]] on self first.
Enable key and mouse events. Calls bot enableMouse and enableKeys.
Enable keypress events for the screen and optionally an element (automatically called when a form of on('keypress') is bound).
Enable mouse events for the screen and optionally an element (automatically called when a form of on('mouse') is bound).
Spawn a process in the foreground, return to blessed app after exit. Executes callback on error or exit.
Fill any region with a character of a certain attribute.
Focus next focusable element in the index.
Focus element by offset of focusable elements.
Pop element off the focus stack.
Focus previous focusable element in the index.
Push element on the focus stack (equivalent to screen.focused = el).
Visit each node's descendants, with [[iter]] function, parents first. If s
is provided it will call [[iter]] on self first.
Get user property with a potential default value.
Insert a node to this node's children at index i.
Insert a line at the bottom of the screen.
Insert a line into the screen (using csr: this bypasses the output buffer).
Insert a line at the top of the screen.
Bind a keypress listener for a specific key.
Resets the focus, buffers, clear the sreen, alloc new memory, reset the keypad keys, stop listening to the mouse, etc. But won't emit destroy or other events nor unregister any listener. (I guess is like a reset)
Write string to the log file if one was created.
Received on mouse events.
Received on key events.
Received when blessed notices something untoward (output is not a tty, terminfo not found, etc).
Bind a keypress listener for a specific key once.
Prepend a node to this node's children.
Read data from text editor.
Reallocate the screen buffers and clear the screen.
Remove child node from node.
Render all child elements, writing all data to the screen buffer and drawing the screen.
Restore the saved focused element.
"Rewind" focus to the last visible and attached element.
Save the focused element.
Take an SGR screenshot of the screen within the region. Returns a string containing only characters and SGR codes. Can be displayed by simply echoing it in a terminal.
Set user property to value.
Set effects based on two events and attributes.
Reset the terminal to term. Reloads terminfo.
Spawn a process in the foreground, return to blessed app after exit.
Remove a keypress listener for a specific key.
Generated using TypeDoc
An object for any miscellanous user data.