pub struct FacetCaps {
pub scalable: bool,
pub copyable: bool,
pub pasteable: bool,
pub cuttable: bool,
pub selectable: bool,
pub themeable: bool,
pub resizable: bool,
pub searchable: bool,
pub editable: bool,
pub navigable: bool,
pub draggable: bool,
pub time_scrollable: bool,
}Expand description
What a Facet can do, so hosts treat every component uniformly. All-false by default: a facet opts in to each capability it actually honors.
Fields§
§scalable: boolHonors a uniform scale: f32 (Ctrl-+/Ctrl– and a toolbar zoom).
copyable: boolHas a current selection that can be copied (drives Ctrl-C/Ctrl-X gating).
pasteable: boolAccepts pasted content (drives Ctrl-V gating).
cuttable: boolSupports cut (remove-on-copy). Implies copyable.
selectable: boolHas a user selection model (rows, nodes, points…).
themeable: boolReads the facett Theme from the context (vs. fixed colours).
resizable: boolIts content area can be resized by the host without breaking.
searchable: boolExposes a text search/filter over its content.
editable: boolSupports inline cell editing (Enter/double-click to enter edit mode, Enter/Tab to commit, Escape to cancel). Emits change events via GridResponse.
Drives the shared Navigable pan/zoom/fit model
(wheel zoom-to-cursor, drag-pan, keyboard pan/zoom, fit-to-view). A host
can offer navigation help / a fit affordance when this is set.
draggable: boolIts items can be dragged and dropped onto zones (cards→columns,
bars→lanes) via the shared dragdrop primitive. A host
can offer drag affordances / a “moves pending” indicator when set.
time_scrollable: boolLays its content on a shared time axis (time_axis)
that can be panned/zoomed in time (gantt, CFD, calendar, timeline). A host
can link several such facets to one axis and offer a time-scrubber.
Implementations§
Source§impl FacetCaps
impl FacetCaps
pub const fn scalable(self) -> Self
pub const fn copyable(self) -> Self
pub const fn pasteable(self) -> Self
pub const fn selectable(self) -> Self
pub const fn themeable(self) -> Self
pub const fn resizable(self) -> Self
pub const fn searchable(self) -> Self
pub const fn editable(self) -> Self
Sourcepub const fn draggable(self) -> Self
pub const fn draggable(self) -> Self
Its items can be dragged onto zones via crate::dragdrop.
Sourcepub const fn time_scrollable(self) -> Self
pub const fn time_scrollable(self) -> Self
Its content lays on a shared crate::time_axis (pan/zoom-in-time).
Trait Implementations§
impl Copy for FacetCaps
impl Eq for FacetCaps
impl StructuralPartialEq for FacetCaps
Auto Trait Implementations§
impl Freeze for FacetCaps
impl RefUnwindSafe for FacetCaps
impl Send for FacetCaps
impl Sync for FacetCaps
impl Unpin for FacetCaps
impl UnsafeUnpin for FacetCaps
impl UnwindSafe for FacetCaps
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more