Top Level Namespace

Defined in:

Method Summary

Method Detail

def apply_action(action : InputAction, slide : Int32, y_offset : Int32) : Tuple(Int32, Int32) #

Apply an input action to the (slide, y_offset) state


[View source]
def build_footer(metadata : Jrsl::PresentationMetadata, slide_num : Int32, total_slides : Int32, width : Int32, theme) #

[View source]
def cli_flags_handled(args) : Bool #

Handle the flags that print information and exit. Returns true if handled.


[View source]
def draw_image(tput, slide : Jrsl::Slide, img_y : Int32, image_x : Int32) #

[View source]
def draw_markdown(tput, md_lines : Array(String), md_rows : Int32, md_x : Int32, md_y : Int32, y_offset : Int32, max_rows : Int32) #

Draw the markdown lines starting at y_offset, up to max_rows rows


[View source]
def ensure_image_dimensions(slide : Jrsl::Slide, use_kitty : Bool, md_rows : Int32, content_area_height : Int32, screen_width : Int32) : Tuple(Int32, Int32) #

Render the slide image if needed (respecting the cache) and return its dimensions {rows, cols}


[View source]
def figlet_lines(text : String) : Array(String) | Nil #

[View source]
def load_theme(theme_name : String | Nil) #

[View source]
def main #

[View source]
def prerender_markdown(slides : Array(Jrsl::Slide), terminal_width : Int32) #

Pre-render the slides' markdown before entering the TUI. Images are rendered on-the-fly based on actual screen dimensions. Markdown width is half screen width for side-by-side layouts.


[View source]
def print_figlet(tput, text, x, y, theme) #

[View source]
def print_theme_list #

[View source]
def read_action(tput, y_offset : Int32, slide_index : Int32, total_slides : Int32) : InputAction #

Wait for a meaningful keypress. Keys that would act on a boundary (scrolling up at the top, changing slides at the edges) keep waiting.


[View source]
def render_slide(tput, slides : Array(Jrsl::Slide), slide_index : Int32, y_offset : Int32, theme, use_kitty : Bool) #

[View source]