Skip to main content

PresentationState

Struct PresentationState 

Source
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: usize

Total number of raw PDF pages.

§slide_groups: Vec<SlideGroup>

Logical slide groups (may be 1:1 with pages if no grouping).

§total_logical_slides: usize

Total number of logical slides.

§current_page: usize

Current raw PDF page index (0-based).

§current_logical_slide: usize

Current logical slide index (0-based).

§current_overlay_within_group: usize

Current overlay step within the current group (0-based).

§frozen: bool

Whether the audience display is frozen.

§frozen_page: Option<usize>

The page shown on the audience display when frozen (None = not frozen).

§blacked_out: bool

Whether the audience display is blacked out.

§whiteboard_active: bool

Whether the whiteboard is active (blank white canvas on audience).

§whiteboard_strokes: Vec<InkStroke>

Ink strokes drawn on the whiteboard (persist across navigation).

§screen_share_mode: bool

Whether screen-share mode is active.

§presentation_mode: bool

Whether presentation mode is active (single-monitor fullscreen HUD).

§laser_active: bool

Whether the laser pointer is active.

§pointer_position: Option<(f32, f32)>

Current pointer position (normalized 0..1), None if pointer is off-slide.

§pointer_style: PointerStyle

Pointer visual style.

§pointer_appearances: PointerAppearances

Pointer appearance settings for each visual style.

§ink_active: bool

Whether ink drawing mode is active.

§active_pen: ActivePen

Active 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: bool

Whether text box placement mode is active.

§selected_text_box: Option<u64>

The currently selected text box id, if any.

§text_box_editing: bool

Whether the selected text box is in inline edit mode.

§next_text_box_id: u64

Counter for assigning unique text box IDs.

§spotlight_active: bool

Whether the spotlight overlay is active.

§spotlight_position: Option<(f32, f32)>

Spotlight center position (normalized 0..1).

§spotlight_radius: f32

Spotlight radius in logical pixels.

§spotlight_dim_opacity: f32

Spotlight dim opacity from 0.0 to 1.0.

§zoom_active: bool

Whether zoom is active on the audience display.

§zoom_region: Option<ZoomRegion>

Current zoom region, if zoom is active.

§timer: TimerState

Timer state.

§slide_elapsed: Duration

Total 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: bool

Whether the slide overview grid is visible.

§notes_visible: bool

Whether the notes panel is visible.

§notes_editing: bool

Whether the notes panel is in markdown edit mode.

§notes_font_size: f32

Current notes font size in points.

§notes_font_size_step: f32

Step size for font increment/decrement.

§quit_requested: bool

Whether a quit confirmation dialog is showing.

§current_notes: Option<String>

Markdown notes for the current logical slide, if any.

Implementations§

Source§

impl PresentationState

Source

pub fn new(total_pages: usize, slide_groups: Vec<SlideGroup>) -> Self

Create a new state for a presentation with the given slide groups.

Source

pub fn audience_page(&self) -> usize

The page the audience should see (respects freeze).

Source

pub fn current_page_ink(&self) -> &[InkStroke]

Ink strokes for the current presenter page (read-only convenience for UI).

Source

pub fn current_page_text_boxes(&self) -> &[TextBox]

Text boxes for the current presenter page (read-only convenience for UI).

Source

pub fn current_pointer_appearance(&self) -> PointerAppearance

Appearance for the currently selected pointer style.

Trait Implementations§

Source§

impl Clone for PresentationState

Source§

fn clone(&self) -> PresentationState

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PresentationState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more