pub struct NestGroup(/* private fields */);
Expand description
Property nest position group.
Each group has u16::MAX / 9
in between, custom groups can be created using the +/- operations, SIZE+1
is
still outside BORDER
, but slightly inside SIZE
.
See NestPosition
for more details.
Implementations§
source§impl NestGroup
impl NestGroup
sourcepub const WIDGET: NestGroup = _
pub const WIDGET: NestGroup = _
Minimal nest position, property is outside even context properties and is only inside the widget node.
This is rarely used, prefer using CONTEXT-n
if you must have a property outside the widget context.
sourcepub const CONTEXT: NestGroup = _
pub const CONTEXT: NestGroup = _
Property defines a contextual value or variable.
Usually these properties don’t define behavior, they just configure the widget. A common pattern is defining all widget config as context vars, that are all used by a widget intrinsic node.
These properties are not expected to affect layout or render, if they do some errors may be logged by the default widget base.
sourcepub const EVENT: NestGroup = _
pub const EVENT: NestGroup = _
Property defines an event handler, or state monitor, they are placed inside all context properties, so can be configured by context, but are still outside of the layout and render nodes.
Event handlers can be notified before or after the inner child delegation, if handled before the event is said to be preview. Implementers can use this intrinsic feature of the UI tree to interrupt notification for child properties and widgets.
These properties are not expected to affect layout or render, if they do some errors may be logged by the default widget base.
sourcepub const LAYOUT: NestGroup = _
pub const LAYOUT: NestGroup = _
Property defines the position and size of the widget inside the space made available by the parent widget.
These properties must accumulatively affect the measure and layout, they must avoid rendering. The computed layout is usually rendered by the widget as a single transform, the layout properties don’t need to render transforms.
sourcepub const SIZE: NestGroup = _
pub const SIZE: NestGroup = _
Property strongly enforces a widget size.
Usually the widget final size is a side-effect of all the layout properties, but some properties may enforce a size, they can use this group to ensure that they are inside the other layout properties.
sourcepub const WIDGET_INNER: NestGroup = _
pub const WIDGET_INNER: NestGroup = _
Minimal widget visual position, any property or node can render, but usually only properties inside this position render. For example, borders will only render correctly inside this nest position.
This is rarely used, prefer using BORDER-n
to declare properties that are visually outside the bounds, only
use this node for intrinsics that define some inner context or service for the visual properties.
sourcepub const BORDER: NestGroup = _
pub const BORDER: NestGroup = _
Property renders a border visual.
Borders are strictly coordinated, see the border
module for more details. All nodes of this group
may render at will, the renderer is already configured to apply the final layout and size.
sourcepub const FILL: NestGroup = _
pub const FILL: NestGroup = _
Property defines a visual of the widget.
This is the main render group, it usually defines things like a background fill, but it can render over child nodes simply by choosing to render after the render is delegated to the inner child.
sourcepub const CHILD_CONTEXT: NestGroup = _
pub const CHILD_CONTEXT: NestGroup = _
Property defines contextual value or variable for the inner child or children widgets. Config set here does not affect the widget where it is set, it only affects the descendants.
sourcepub const CHILD_LAYOUT: NestGroup = _
pub const CHILD_LAYOUT: NestGroup = _
Property defines the layout and size of the child or children widgets. These properties don’t affect the layout
of the widget where they are set. Some properties are functionally the same, only changing their effect depending on their
group, the margin
and padding
properties are like this, margin
is LAYOUT
and padding
is CHILD_LAYOUT
.
sourcepub const CHILD: NestGroup = _
pub const CHILD: NestGroup = _
Maximum nest position, property is inside all others and only wraps the widget child node.
Properties that insert child nodes may use this group, properties that only affect the child layout and want
to be inside other child layout should use CHILD_LAYOUT+n
instead.
Trait Implementations§
source§impl AddAssign<i16> for NestGroup
impl AddAssign<i16> for NestGroup
source§fn add_assign(&mut self, rhs: i16)
fn add_assign(&mut self, rhs: i16)
+=
operation. Read moresource§impl<'de> Deserialize<'de> for NestGroup
impl<'de> Deserialize<'de> for NestGroup
source§fn deserialize<D>(
deserializer: D,
) -> Result<NestGroup, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<NestGroup, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
source§impl Ord for NestGroup
impl Ord for NestGroup
source§impl PartialOrd for NestGroup
impl PartialOrd for NestGroup
source§impl Serialize for NestGroup
impl Serialize for NestGroup
source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl SubAssign<i16> for NestGroup
impl SubAssign<i16> for NestGroup
source§fn sub_assign(&mut self, rhs: i16)
fn sub_assign(&mut self, rhs: i16)
-=
operation. Read moreimpl Copy for NestGroup
impl Eq for NestGroup
impl StructuralPartialEq for NestGroup
Auto Trait Implementations§
impl Freeze for NestGroup
impl RefUnwindSafe for NestGroup
impl Send for NestGroup
impl Sync for NestGroup
impl Unpin for NestGroup
impl UnwindSafe for NestGroup
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
source§impl<T> AnyVarValue for Twhere
T: VarValue,
impl<T> AnyVarValue for Twhere
T: VarValue,
source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
dyn Any
methods.source§fn clone_boxed(&self) -> Box<dyn AnyVarValue>
fn clone_boxed(&self) -> Box<dyn AnyVarValue>
source§fn clone_boxed_var(&self) -> Box<dyn AnyVar>
fn clone_boxed_var(&self) -> Box<dyn AnyVar>
LocalVar<Self>
.source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
self
equals other
.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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<T> DataNoteValue for T
impl<T> DataNoteValue for T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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