Class: Przn::PresenterRenderer
- 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
-
#initialize(terminal, presentation:, base_dir: '.', theme: nil) ⇒ PresenterRenderer
constructor
A new instance of PresenterRenderer.
- #render(slide, current:, total:, started_at: nil) ⇒ Object
Methods inherited from Renderer
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(, current:, total:, started_at: nil) super(, current: current, total: total, started_at: started_at) @mutex.synchronize { draw_presenter_strip(current, total) } end |