pub struct Stacker {
pub direction: Property<StackerDirection>,
pub gutter: Property<Size>,
pub autosize: Property<bool>,
pub autosize_x: Property<Option<bool>>,
pub autosize_y: Property<Option<bool>>,
pub sizes: Property<Vec<Option<Size>>>,
pub exit_mode: Property<ContainerExitMode>,
pub reflow_transition: Property<ContainerReflowTransition>,
}Expand description
Stacker lays out a series of nodes either
vertically or horizontally (i.e. a single row or column) with a specified gutter in between
each node. Stackers can be stacked inside of each other, horizontally
and vertically, along with percentage-based positioning and Transform2D.anchor to compose any rectilinear 2D layout.
Fields§
§direction: Property<StackerDirection>The direction the stacker should flow its cells
gutter: Property<Size>Spacing between cells
autosize: Property<bool>When true, the stacker uses content-child bounds to autosize its cells and, when possible, its own bounds as well.
Stacker interprets plain autosize=true as “autosize the extending
axis only” (y for vertical stacks, x for horizontal stacks). Use
autosize_x / autosize_y to override those per-axis defaults.
The underlying shrink-sizing pass only applies when the measured axis can be resolved without parent-size cycles, so percent-sized children continue to use the existing top-down layout behavior unless the corresponding stacker axis is already explicit.
autosize_x: Property<Option<bool>>Optional override for whether autosize manages the x axis.
autosize_y: Property<Option<bool>>Optional override for whether autosize manages the y axis.
sizes: Property<Vec<Option<Size>>>Size of each cell, by index. None-values (or array-index out-of-bounds values) will fall back to computed, equal-sizing
exit_mode: Property<ContainerExitMode>Whether exiting children stay in normal stack flow or hold their previous frame as ghosts.
reflow_transition: Property<ContainerReflowTransition>How surviving children should move when the stack’s layout changes.
Defaults to Snap so Stackers remain a stable layout primitive unless
reflow motion is explicitly requested.
Trait Implementations§
Source§impl CoercionRules for Stacker
impl CoercionRules for Stacker
Source§fn is_identity_roundtrip() -> bool
fn is_identity_roundtrip() -> bool
Self preserves the semantics of converting that clone
through ToPaxValue and back with try_coerce. Read moreSource§fn allows_singleton_stack() -> bool
fn allows_singleton_stack() -> bool
Source§impl Container for Stacker
impl Container for Stacker
fn bind_container(&self, ctx: &NodeContext)
Source§impl<'de> Deserialize<'de> for Stacker
impl<'de> Deserialize<'de> for Stacker
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl HelperFunctions for Stacker
impl HelperFunctions for Stacker
Source§fn register_all_functions()
fn register_all_functions()
impl ImplToFromPaxAny for Stacker
Source§impl Interpolatable for Stacker
impl Interpolatable for Stacker
Source§fn interpolate(&self, _other: &Self, _t: f64) -> Self
fn interpolate(&self, _other: &Self, _t: f64) -> Self
Source§impl ToPaxValue for Stacker
impl ToPaxValue for Stacker
Source§fn to_pax_value(self) -> PaxValue
fn to_pax_value(self) -> PaxValue
PaxValue.Source§fn nested_properties(&self) -> Vec<UntypedProperty>
fn nested_properties(&self) -> Vec<UntypedProperty>
Source§fn to_pax_value_in_graph(self) -> PaxValuewhere
Self: Sized,
fn to_pax_value_in_graph(self) -> PaxValuewhere
Self: Sized,
Self::to_pax_value reads published value snapshots.Auto Trait Implementations§
impl Freeze for Stacker
impl RefUnwindSafe for Stacker
impl Send for Stacker
impl Sync for Stacker
impl Unpin for Stacker
impl UnsafeUnpin for Stacker
impl UnwindSafe for Stacker
Blanket Implementations§
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> PropertyValue for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
Source§fn round_into(self) -> U
fn round_into(self) -> U
Source§impl<T> ToFromPaxAny for Twhere
T: ImplToFromPaxAny,
impl<T> ToFromPaxAny for Twhere
T: ImplToFromPaxAny,
Source§fn to_pax_any(self) -> PaxAny
fn to_pax_any(self) -> PaxAny
PaxAny.Source§fn from_pax_any(pax_any: PaxAny) -> Result<T, String>
fn from_pax_any(pax_any: PaxAny) -> Result<T, String>
PaxAny.