class

Term2::Program(M)

Inherits Reference < Object

Program manages the event loop using CML primitives.

Constructors

new(model : M, input : IO | Nil = STDIN, output : IO = STDOUT, options : ProgramOptions = ProgramOptions.new)
Source

Instance methods

add_startup_option(option : Symbol) : Nil
Source
bracketed_paste_enabled?
Source
context
Source
context=(ctx : ProgramContext)
Source
disable_bracketed_paste
Source
disable_mouse_tracking
Source
disable_panic_recovery
Source
disable_renderer
Source
disable_signal_handling
Source
dispatch(msg : Message) : Nil
Source
dispatcher
Source
enable_alt_screen

Options

Source
enable_focus_reporting
Source
enable_mouse_all_motion
Source
enable_mouse_cell_motion
Source
environment=(env : Hash(String, String))
Source
filter=(filter : Proc(Message, Message)) : Nil
Source
filter=(filter : Proc(Message, Message | Nil)) : Nil
Source
filter=(filter : Proc(Model, Message, Message)) : Nil
Source
filter=(filter : Proc(Model, Message, Message | Nil)) : Nil
Source
filter_present?
Source
force_input_tty
Source
fps=(fps : Float64)
Source
input=(input : IO)
Source
input_io
Source
input_tty=(input_tty : Bool)
Source
input_tty?
Source
input_type
Source
input_type=(type : Symbol)
Source
kill
Source
model
Source
model?
Source
mouse_all_motion_enabled?
Source
mouse_cell_motion_enabled?
Source
output=(output : IO)
Source
output_io
Source
process_message(msg : Message) : Nil

Directly process a message (synchronous). Useful for tests.

Source
quit
Source
renderer_enabled?
Source
send(msg : Message) : Nil
Source
shutdown_evt
Source
signal_handling_enabled?
Source
startup_options
Source
stop
Source
wait

Wait for program completion

Source

Nested types