Files
craft-libs/crates/ui-canvas/src/lib.rs
T
David MannandClaude Opus 5.5 b43aa12593 ui-canvas: a full-window dialog's own window is at least OWN_WINDOW_MIN_SIZE (640 x 480), so a placement saved while it shrank opens usable
A placement saved while photocraft#16595 shrank RAW Develop's window could be 1 pt wide. place() raised it only to the
full-window overlay's minimum, 0 x 0, and since the window now keeps its size nothing grew it again. The minimum reaches
the OS window's min size and the floor a restored placement is fitted to.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 15:41:10 +01:00

59 lines
2.5 KiB
Rust

#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
//! The canvas of the craft UI library: `Canvas` with its tool host, tools, rulers and navigator, the canvas
//! controls, and the full-window dialogs that show a canvas (layers 5 and 6).
//!
//! The root re-exports craft-ui-panels' modules and the ones it re-exports; `dialog` adds the full-window family to
//! panels' dialogs.
#![warn(missing_docs)]
// The derives' output names the crate as `craft_ui`, here as in every other crate.
extern crate self as craft_ui;
#[doc(hidden)]
pub use craft_ui_panels::canvas_data;
#[cfg(feature = "testing")]
pub use craft_ui_panels::registry;
#[cfg(feature = "suite")]
#[doc(hidden)]
pub use craft_ui_panels::story_kit;
#[doc(hidden)]
pub use craft_ui_panels::{__private, __register_command_set, __register_contract, __register_pattern};
pub use craft_ui_panels::{InstallError, InstallSpec, contract, fonts, install, layout, primitives, runtime, style, words};
pub use craft_ui_panels::{
bars, buttons, choice, controls, display, edit, form, graph, layout_components, list, menu, notices, pickers, popover, table, tabs, text,
tile_grid, value_drag,
};
pub use craft_ui_panels::{docking, rails, sections};
pub mod canvas;
pub mod canvas_controls;
/// Dialog shells and prompts, with the full-window dialog family that shows a canvas.
pub mod dialog {
pub use crate::canvas::full_window::{
FullWindowDialog, FullWindowDialogStyle, FullWindowWorkspace, HostedWorkspace, OWN_WINDOW_MIN_SIZE, WorkspaceCx, WorkspacePass,
};
pub use crate::canvas::full_window_parts::{
FullWindowCanvas, FullWindowCanvasOutput, FullWindowSide, FullWindowSideOutput, FullWindowSideStyle, FullWindowStatus,
FullWindowStatusOutput, FullWindowTitle, FullWindowTitleOutput, FullWindowView, FullWindowZoomBar, FullWindowZoomBarOutput, RasterOverlay,
SideFooter,
};
pub use craft_ui_panels::dialog::*;
}
/// The fixture, the suite runner and the story helpers, with the canvas helpers: `ToolFixture`, the live tool story
/// host (`tool_story`) and `canvas_story`.
#[cfg(feature = "testing")]
pub mod testing {
pub use crate::canvas::testing::{
canvas_story, tool_fixture,
tool_fixture::ToolFixture,
tool_story::{StoryButton, StoryHost, ToolRun, ToolScript, ToolStory, story_tool, tool_story},
};
pub use craft_ui_panels::testing::*;
#[cfg(feature = "suite")]
crate::registry!();
}