class Opal::TEA::Program

Overview

Event loop orchestrator for The Elm Architecture.

Defined in:

opal/asciicast.cr
opal/tea/program.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(model : Model, driver : Terminal::Driver | Nil = nil, alt_screen : Bool = true, mouse_enabled : Bool = true, diff_render : Bool = false) #

[View source]

Instance Method Detail

def alt_screen=(alt_screen : Bool) #

[View source]
def alt_screen? : Bool #

[View source]
def diff_render=(diff_render : Bool) #

[View source]
def diff_render? : Bool #

[View source]
def driver : Terminal::Driver #

[View source]
def driver=(driver : Terminal::Driver) #

[View source]
def error : Exception | Nil #

[View source]
def model : Model #

[View source]
def model=(model : Model) #

[View source]
def mouse_enabled=(mouse_enabled : Bool) #

[View source]
def mouse_enabled? : Bool #

[View source]
def quit : Nil #

Programmatically requests the active application loop to terminate.


[View source]
def record_cast(output_path : String, title : String = "Opal Session", width : Int32 | Nil = nil, height : Int32 | Nil = nil) : self #

Enables asciicast recording of this program's screen buffer


[View source]
def recorder : Asciicast::ScreenRecorder | Nil #

[View source]
def recorder=(recorder : Asciicast::ScreenRecorder | Nil) #

[View source]
def run : Model #

Runs the interactive application loop and returns the final Model state upon exit.


[View source]
def running? : Bool #

[View source]
def send(msg : Msg) : Nil #

Dispatches a message directly into the active application event loop.


[View source]