Class ui.panel.Screen

Screen class for full-screen terminal applications.

Manages a full-screen layout with optional header and footer panels (see ui.panel.Bar). Derives from ui.Panel.

Methods

ui.panel.screen:calculate_layout () Recalculate the screen layout using current terminal dimensions.
ui.panel.screen:check_resize ([update=false]) Check if the terminal has been resized and optionally update the layout.
ui.panel.screen:init (opts) Initialize a new Screen instance.


Methods

ui.panel.screen:calculate_layout ()
Recalculate the screen layout using current terminal dimensions. Overrides ui.Panel:calculate_layout to use full screen dimensions instead of specifying them.
ui.panel.screen:check_resize ([update=false])
Check if the terminal has been resized and optionally update the layout.

Parameters:

  • update boolean Whether to recalculate and redraw if resized (default false)

Returns:

    boolean True if the terminal was resized
ui.panel.screen:init (opts)
Initialize a new Screen instance. Do not call this method directly, call on the class instead.

Parameters:

  • opts Configuration options (see Panel:init for inherited properties)
    • header Panel Optional header panel (will be (re)named "header")
    • body Panel Required body panel (will be (re)named "body")
    • footer Panel Optional footer panel (will be (re)named "footer")
    • name string Optional name for the screen

See also:

generated by LDoc 1.5.0