tvision_rs/view/mod.rs
1//! Views, geometry, and the downward-context substrate.
2//!
3//! Carries the geometry primitives ([`Point`]/[`Rect`]), the global [`ViewId`]
4//! minter (`id`), the downward [`Context`] / [`DrawCtx`] types (`context`),
5//! and the [`View`] trait + [`ViewState`] that every widget builds on.
6//!
7//! **Guide:** [The view tree](../../../internals/view-tree.html).
8
9mod context;
10mod geometry;
11// `view::group` houses `TGroup`: the child tree + three-phase routing
12// + focus machinery. Re-exported below alongside the trait it builds on.
13mod group;
14mod id;
15// `view::view` houses the `View` trait + `ViewState` (TView). The
16// inner name mirrors the C++ class file; the re-exports below flatten it away.
17#[allow(clippy::module_inception)]
18mod view;
19
20pub use context::{Context, Deferred, DividerOp, DrawCtx};
21pub use geometry::{Point, Rect};
22pub use group::{Group, SelectMode};
23pub use id::ViewId;
24/// `TView::locate` free function — backs `Desktop::tile`/`cascade` (see its doc).
25pub(crate) use view::locate;
26pub use view::{DragMode, GrowMode, Options, Phase, State, StateFlag, View, ViewState};