pub struct PresentationState {Show 41 fields
pub total_pages: usize,
pub slide_groups: Vec<SlideGroup>,
pub total_logical_slides: usize,
pub current_page: usize,
pub current_logical_slide: usize,
pub current_overlay_within_group: usize,
pub frozen: bool,
pub frozen_page: Option<usize>,
pub blacked_out: bool,
pub whiteboard_active: bool,
pub whiteboard_strokes: Vec<InkStroke>,
pub screen_share_mode: bool,
pub presentation_mode: bool,
pub laser_active: bool,
pub pointer_position: Option<(f32, f32)>,
pub pointer_style: PointerStyle,
pub pointer_appearances: PointerAppearances,
pub ink_active: bool,
pub active_pen: ActivePen,
pub slide_ink_by_page: HashMap<usize, Vec<InkStroke>>,
pub slide_text_boxes_by_page: HashMap<usize, Vec<TextBox>>,
pub text_box_mode: bool,
pub selected_text_box: Option<u64>,
pub text_box_editing: bool,
pub next_text_box_id: u64,
pub spotlight_active: bool,
pub spotlight_position: Option<(f32, f32)>,
pub spotlight_radius: f32,
pub spotlight_dim_opacity: f32,
pub zoom_active: bool,
pub zoom_region: Option<ZoomRegion>,
pub timer: TimerState,
pub slide_elapsed: Duration,
pub slide_elapsed_by_logical: Vec<Duration>,
pub overview_visible: bool,
pub notes_visible: bool,
pub notes_editing: bool,
pub notes_font_size: f32,
pub notes_font_size_step: f32,
pub quit_requested: bool,
pub current_notes: Option<String>,
}Expand description
The single authoritative state of the presentation.
The engine owns and mutates this. The UI reads it (via watch channel) and renders it.
The UI holds no authoritative state of its own — all mutations go through
the CommandBus.
Fields§
§total_pages: usizeTotal number of raw PDF pages.
slide_groups: Vec<SlideGroup>Logical slide groups (may be 1:1 with pages if no grouping).
total_logical_slides: usizeTotal number of logical slides.
current_page: usizeCurrent raw PDF page index (0-based).
current_logical_slide: usizeCurrent logical slide index (0-based).
current_overlay_within_group: usizeCurrent overlay step within the current group (0-based).
frozen: boolWhether the audience display is frozen.
frozen_page: Option<usize>The page shown on the audience display when frozen (None = not frozen).
blacked_out: boolWhether the audience display is blacked out.
whiteboard_active: boolWhether the whiteboard is active (blank white canvas on audience).
whiteboard_strokes: Vec<InkStroke>Ink strokes drawn on the whiteboard (persist across navigation).
Whether screen-share mode is active.
presentation_mode: boolWhether presentation mode is active (single-monitor fullscreen HUD).
laser_active: boolWhether the laser pointer is active.
pointer_position: Option<(f32, f32)>Current pointer position (normalized 0..1), None if pointer is off-slide.
pointer_style: PointerStylePointer visual style.
pointer_appearances: PointerAppearancesPointer appearance settings for each visual style.
ink_active: boolWhether ink drawing mode is active.
active_pen: ActivePenActive pen settings — used to initialise the next stroke.
slide_ink_by_page: HashMap<usize, Vec<InkStroke>>Per-page slide ink annotations (page_index → strokes).
slide_text_boxes_by_page: HashMap<usize, Vec<TextBox>>Per-page text box overlays (page_index → boxes).
text_box_mode: boolWhether text box placement mode is active.
selected_text_box: Option<u64>The currently selected text box id, if any.
text_box_editing: boolWhether the selected text box is in inline edit mode.
next_text_box_id: u64Counter for assigning unique text box IDs.
spotlight_active: boolWhether the spotlight overlay is active.
spotlight_position: Option<(f32, f32)>Spotlight center position (normalized 0..1).
spotlight_radius: f32Spotlight radius in logical pixels.
spotlight_dim_opacity: f32Spotlight dim opacity from 0.0 to 1.0.
zoom_active: boolWhether zoom is active on the audience display.
zoom_region: Option<ZoomRegion>Current zoom region, if zoom is active.
timer: TimerStateTimer state.
slide_elapsed: DurationTotal time spent on the current logical slide during this session.
slide_elapsed_by_logical: Vec<Duration>Accumulated time spent on each logical slide during this session.
overview_visible: boolWhether the slide overview grid is visible.
notes_visible: boolWhether the notes panel is visible.
notes_editing: boolWhether the notes panel is in markdown edit mode.
notes_font_size: f32Current notes font size in points.
notes_font_size_step: f32Step size for font increment/decrement.
quit_requested: boolWhether a quit confirmation dialog is showing.
current_notes: Option<String>Markdown notes for the current logical slide, if any.
Implementations§
Source§impl PresentationState
impl PresentationState
Sourcepub fn new(total_pages: usize, slide_groups: Vec<SlideGroup>) -> Self
pub fn new(total_pages: usize, slide_groups: Vec<SlideGroup>) -> Self
Create a new state for a presentation with the given slide groups.
Sourcepub fn audience_page(&self) -> usize
pub fn audience_page(&self) -> usize
The page the audience should see (respects freeze).
Sourcepub fn current_page_ink(&self) -> &[InkStroke]
pub fn current_page_ink(&self) -> &[InkStroke]
Ink strokes for the current presenter page (read-only convenience for UI).
Sourcepub fn current_page_text_boxes(&self) -> &[TextBox]
pub fn current_page_text_boxes(&self) -> &[TextBox]
Text boxes for the current presenter page (read-only convenience for UI).
Sourcepub fn current_pointer_appearance(&self) -> PointerAppearance
pub fn current_pointer_appearance(&self) -> PointerAppearance
Appearance for the currently selected pointer style.
Trait Implementations§
Source§impl Clone for PresentationState
impl Clone for PresentationState
Source§fn clone(&self) -> PresentationState
fn clone(&self) -> PresentationState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more