Class: Przn::PresenterRenderer

Inherits:
Renderer
  • Object
show all
Defined in:
lib/przn/presenter_renderer.rb

Overview

Drives the laptop-side view in extended-display mode. Reuses the existing Renderer to draw the current slide (notes still rendered dim-inline so the presenter sees them in context), then overlays a three-line strip at the bottom of the terminal: speaker notes summary, next-slide preview, and a footer with the slide counter + elapsed time.

Constant Summary

Constants inherited from Renderer

Renderer::ANSI, Renderer::DEFAULT_IMAGE_RELATIVE_HEIGHT_PERCENT, Renderer::DEFAULT_SCALE

Instance Method Summary collapse

Methods inherited from Renderer

#preload

Constructor Details

#initialize(terminal, presentation:, base_dir: '.', theme: nil) ⇒ PresenterRenderer

Returns a new instance of PresenterRenderer.



10
11
12
13
14
# File 'lib/przn/presenter_renderer.rb', line 10

def initialize(terminal, presentation:, base_dir: '.', theme: nil)
  super(terminal, base_dir: base_dir, theme: theme, mode: :presenter)
  @presentation = presentation
  @started_at = Time.now
end

Instance Method Details

#render(slide, current:, total:, started_at: nil) ⇒ Object



16
17
18
19
# File 'lib/przn/presenter_renderer.rb', line 16

def render(slide, current:, total:, started_at: nil)
  super(slide, current: current, total: total, started_at: started_at)
  @mutex.synchronize { draw_presenter_strip(current, total) }
end