From 9f4e5ecdaaeeac371308d046eee561593c028da4 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Thu, 26 Nov 2026 18:55:22 +0000 Subject: [PATCH] Contract stubs: p4b-app Written by a Codex stage agent; committed by bin/codex-stubs (the sandbox keeps .git read-only). --- crates/ui-egui/src/app.rs | 4 ++++ crates/ui-egui/src/canvas.rs | 2 +- crates/ui-egui/src/canvas/guides.rs | 11 +++++++++++ crates/ui-egui/src/lib.rs | 6 ++++++ 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/app.rs b/crates/ui-egui/src/app.rs index 6831c20f3..4d21cabf1 100644 --- a/crates/ui-egui/src/app.rs +++ b/crates/ui-egui/src/app.rs @@ -108,6 +108,10 @@ impl SlideApp { // P3(shell-w11): sh.A8 palette_recents: Default::default(), // P3(shell-w11): sh.A8 + palette_state: Default::default(), + // P3(shell-w11): cv.A14 + guide_selection: Default::default(), + // P3(shell-w11): sh.A8 catalog: catalog, // P3(shell-w11): sh.A8 catalog_generation: Default::default(), diff --git a/crates/ui-egui/src/canvas.rs b/crates/ui-egui/src/canvas.rs index ff0767ff3..6b306b4b5 100644 --- a/crates/ui-egui/src/canvas.rs +++ b/crates/ui-egui/src/canvas.rs @@ -16,7 +16,7 @@ use crate::SlideApp; use crate::theme::{self, Tokens}; pub(crate) mod context_menu; -mod guides; +pub(crate) mod guides; // P3(canvas-w6): cv.A14 mod ime; mod input; mod media; diff --git a/crates/ui-egui/src/canvas/guides.rs b/crates/ui-egui/src/canvas/guides.rs index 5dada2091..a83bf8f52 100644 --- a/crates/ui-egui/src/canvas/guides.rs +++ b/crates/ui-egui/src/canvas/guides.rs @@ -1,5 +1,16 @@ use super::{Color32, CornerRadius, Point, Rect, SlideApp, Stroke, Tokens, Xf, pos2, theme}; +/// Selected guide indices for the active document, cleared on a document switch or unexpected guide-list change. +/// This selection is transient and never saved. +#[derive(Clone, Debug, Default, PartialEq)] +#[allow(dead_code)] // P3(canvas-w10): cv.A14 +pub(crate) struct GuideSelection { + /// The active document whose guides are selected. + pub(crate) uid: Option, + /// Indices passed to the guide control and updated from its selection output. + pub(crate) guides: Vec, +} + /// The presentation's drawing guides; the one being dragged at its new place, labelled with its /// distance from the slide's centre in points. pub(super) fn draw_guides(app: &SlideApp, painter: &egui::Painter, xf: Xf, slide: Rect, t: &Tokens) { diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index b412b0a4c..5b49a522a 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -238,6 +238,12 @@ pub struct SlideApp { /// Palette recents. #[allow(dead_code)] // P3(shell-w11): sh.A8 palette_recents: Vec, + /// The bound command palette's query and selected navigable row. + #[allow(dead_code)] // P3(shell-w11): sh.A8 + palette_state: craft::ui::patterns::panels::PaletteState, + /// Selected guides of the active document, kept transiently and never saved. + #[allow(dead_code)] // P3(shell-w11): cv.A14 + pub(crate) guide_selection: canvas::guides::GuideSelection, /// Catalog. #[allow(dead_code)] // P3(shell-w11): sh.A8 catalog: craft::ui::runtime::commands::AppCatalog,