Struct ChangeFlags
pub struct ChangeFlags(/* private fields */);Implementations§
§impl ChangeFlags
impl ChangeFlags
pub const FinalTransformation: ChangeFlags
pub const FinalTransformation: ChangeFlags
Use this flag for a property type that affects the final transformation of a node and its descendants.
For a 2D node, this flag causes Kanzi to:
- Run
Node2D::updateRenderon the node and its descendants. This updates the transformation of the nodes. - Draw all nodes.
For a 3D node, this flag causes Kanzi to:
- Update the transformation of the node and its descendants.
- Draw all nodes.
For example, Node::ActualWidthProperty, Node2D::RenderTransformationProperty,
and Node3D::RenderTransformationProperty use this flag.
pub const Measure: ChangeFlags
pub const Measure: ChangeFlags
Use this flag for a property type that affects the size of the node as reported by the node itself, or the size and position of the node with respect to other nodes.
For a 2D node, this flag causes Kanzi to:
- Run
Node2D::measureon the node. - If the measured size of the node changed, run
Node2D::measureon the parent of the node. - If the measured size of the parent node changed, run Node2D::measure on the parent of the parent node, and so on.
- Run
Node2D::arrangeandNode2D::updateRenderon the node, all the changed ancestor nodes, and their descendants. If the transform of a node changed,Node2D::updateRenderrecalculates the transformations. - Draw all nodes.
For a 3D node, this flag causes Kanzi to:
- Run
Node3D::measureon the node. - If the measured size of the node changed, run
Node3D::measureon the parent of the node. - If the measured size of the parent node changed, run
Node3D::measureon the parent of the parent node, and so on. - Run
Node3D::arrangeon the node, all the changed ancestor nodes, and their descendants. - Recalculate the transformations of the nodes.
- Draw all nodes.
For example, properties that set the size, margins, padding, and alignment of a node, use this flag.
pub const ParentMeasure: ChangeFlags
pub const ParentMeasure: ChangeFlags
Use this flag for a property type that affects the layout of the parent node of a node.
This flag causes Kanzi to set the ChangeFlags::Measure flag on the parent of the node.
For example, the DockLayoutConcept::SideProperty, GridLayoutConcept::ColumnProperty, and GridLayoutConcept::RowProperty
use this flag.
pub const Arrange: ChangeFlags
pub const Arrange: ChangeFlags
Use this flag for a property type that affects the need to arrange the layout of a node.
For a 2D node, this flag causes Kanzi to:
- Run
Node2D::arrangeon the node and its descendants. - Run
Node2D::updateRenderon the node and its descendants. If the transform of a node changed,Node2D::updateRenderrecalculates the transformation. - Draw all nodes.
For a 3D node, this flag causes Kanzi to:
- Run
Node3D::arrangeon the node and its descendants. - Recalculate the transformations of the node and its descendants.
- Draw all nodes.
All property types that have the ChangeFlags::Measure set, run the arrange phase on those nodes whose measurements changed.
pub const Render: ChangeFlags
pub const Render: ChangeFlags
Use this flag for a property type that changes the rendering parameters of a 2D node but does not affect the layout.
For a 2D node, this flag causes Kanzi to:
- Run
Node2D::updateRenderon the node and its descendants. If the transform of a node changed,Node2D::updateRenderrecalculates the transformation. - Draw all nodes.
For a property type that changes the rendering parameters of a 3D node but does not affect the layout, use ChangeFlags::Draw instead of ChangeFlags::Render.
For example, these properties use the ChangeFlags::Render flag:
Node2D::RenderTransformationPropertyandNode3D::RenderTransformationProperty- Brush properties
- Properties of 2D effects, such as
BlurEffect2DandMaskEffect2D
pub const Draw: ChangeFlags
pub const Draw: ChangeFlags
Use this flag for a property type that affects the drawing of a node.
This flag causes Kanzi to draw all nodes.
For example, most material properties use this flag.
pub const Constraint: ChangeFlags
pub const Constraint: ChangeFlags
Property type with this flag informs that constraints are in use.
§impl ChangeFlags
impl ChangeFlags
pub const fn empty() -> ChangeFlags
pub const fn empty() -> ChangeFlags
Get a flags value with all bits unset.
pub const fn all() -> ChangeFlags
pub const fn all() -> ChangeFlags
Get a flags value with all known bits set.
pub const fn bits(&self) -> u32
pub const fn bits(&self) -> u32
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
pub const fn from_bits(bits: u32) -> Option<ChangeFlags>
pub const fn from_bits(bits: u32) -> Option<ChangeFlags>
Convert from a bits value.
This method will return None if any unknown bits are set.
pub const fn from_bits_truncate(bits: u32) -> ChangeFlags
pub const fn from_bits_truncate(bits: u32) -> ChangeFlags
Convert from a bits value, unsetting any unknown bits.
pub const fn from_bits_retain(bits: u32) -> ChangeFlags
pub const fn from_bits_retain(bits: u32) -> ChangeFlags
Convert from a bits value exactly.
pub fn from_name(name: &str) -> Option<ChangeFlags>
pub fn from_name(name: &str) -> Option<ChangeFlags>
Get a flags value with the bits of a flag with the given name set.
This method will return None if name is empty or doesn’t
correspond to any named flag.
pub const fn intersects(&self, other: ChangeFlags) -> bool
pub const fn intersects(&self, other: ChangeFlags) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
pub const fn contains(&self, other: ChangeFlags) -> bool
pub const fn contains(&self, other: ChangeFlags) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
pub fn insert(&mut self, other: ChangeFlags)
pub fn insert(&mut self, other: ChangeFlags)
The bitwise or (|) of the bits in two flags values.
pub fn remove(&mut self, other: ChangeFlags)
pub fn remove(&mut self, other: ChangeFlags)
The intersection of a source flags value with the complement of a target flags value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
remove won’t truncate other, but the ! operator will.
pub fn toggle(&mut self, other: ChangeFlags)
pub fn toggle(&mut self, other: ChangeFlags)
The bitwise exclusive-or (^) of the bits in two flags values.
pub fn set(&mut self, other: ChangeFlags, value: bool)
pub fn set(&mut self, other: ChangeFlags, value: bool)
Call insert when value is true or remove when value is false.
pub const fn intersection(self, other: ChangeFlags) -> ChangeFlags
pub const fn intersection(self, other: ChangeFlags) -> ChangeFlags
The bitwise and (&) of the bits in two flags values.
pub const fn union(self, other: ChangeFlags) -> ChangeFlags
pub const fn union(self, other: ChangeFlags) -> ChangeFlags
The bitwise or (|) of the bits in two flags values.
pub const fn difference(self, other: ChangeFlags) -> ChangeFlags
pub const fn difference(self, other: ChangeFlags) -> ChangeFlags
The intersection of a source flags value with the complement of a target flags value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
pub const fn symmetric_difference(self, other: ChangeFlags) -> ChangeFlags
pub const fn symmetric_difference(self, other: ChangeFlags) -> ChangeFlags
The bitwise exclusive-or (^) of the bits in two flags values.
pub const fn complement(self) -> ChangeFlags
pub const fn complement(self) -> ChangeFlags
The bitwise negation (!) of the bits in a flags value, truncating the result.
§impl ChangeFlags
impl ChangeFlags
pub const fn iter(&self) -> Iter<ChangeFlags>
pub const fn iter(&self) -> Iter<ChangeFlags>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
pub const fn iter_names(&self) -> IterNames<ChangeFlags>
pub const fn iter_names(&self) -> IterNames<ChangeFlags>
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
§impl Binary for ChangeFlags
impl Binary for ChangeFlags
§impl BitAnd for ChangeFlags
impl BitAnd for ChangeFlags
§fn bitand(self, other: ChangeFlags) -> ChangeFlags
fn bitand(self, other: ChangeFlags) -> ChangeFlags
The bitwise and (&) of the bits in two flags values.
§type Output = ChangeFlags
type Output = ChangeFlags
& operator.§impl BitAndAssign for ChangeFlags
impl BitAndAssign for ChangeFlags
§fn bitand_assign(&mut self, other: ChangeFlags)
fn bitand_assign(&mut self, other: ChangeFlags)
The bitwise and (&) of the bits in two flags values.
§impl BitOr for ChangeFlags
impl BitOr for ChangeFlags
§fn bitor(self, other: ChangeFlags) -> ChangeFlags
fn bitor(self, other: ChangeFlags) -> ChangeFlags
The bitwise or (|) of the bits in two flags values.
§type Output = ChangeFlags
type Output = ChangeFlags
| operator.§impl BitOrAssign for ChangeFlags
impl BitOrAssign for ChangeFlags
§fn bitor_assign(&mut self, other: ChangeFlags)
fn bitor_assign(&mut self, other: ChangeFlags)
The bitwise or (|) of the bits in two flags values.
§impl BitXor for ChangeFlags
impl BitXor for ChangeFlags
§fn bitxor(self, other: ChangeFlags) -> ChangeFlags
fn bitxor(self, other: ChangeFlags) -> ChangeFlags
The bitwise exclusive-or (^) of the bits in two flags values.
§type Output = ChangeFlags
type Output = ChangeFlags
^ operator.§impl BitXorAssign for ChangeFlags
impl BitXorAssign for ChangeFlags
§fn bitxor_assign(&mut self, other: ChangeFlags)
fn bitxor_assign(&mut self, other: ChangeFlags)
The bitwise exclusive-or (^) of the bits in two flags values.
§impl Extend<ChangeFlags> for ChangeFlags
impl Extend<ChangeFlags> for ChangeFlags
§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = ChangeFlags>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = ChangeFlags>,
The bitwise or (|) of the bits in each flags value.
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)§impl Flags for ChangeFlags
impl Flags for ChangeFlags
§const FLAGS: &'static [Flag<ChangeFlags>]
const FLAGS: &'static [Flag<ChangeFlags>]
§fn from_bits_retain(bits: u32) -> ChangeFlags
fn from_bits_retain(bits: u32) -> ChangeFlags
§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|) of the bits in two flags values.§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!). Read more§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^) of the bits in two flags values.§fn set(&mut self, other: Self, value: bool)where
Self: Sized,
fn set(&mut self, other: Self, value: bool)where
Self: Sized,
Flags::insert] when value is true or [Flags::remove] when value is false.§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in two flags values.§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!). Read more§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in two flags values.§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in a flags value, truncating the result.§impl FromIterator<ChangeFlags> for ChangeFlags
impl FromIterator<ChangeFlags> for ChangeFlags
§fn from_iter<T>(iterator: T) -> ChangeFlagswhere
T: IntoIterator<Item = ChangeFlags>,
fn from_iter<T>(iterator: T) -> ChangeFlagswhere
T: IntoIterator<Item = ChangeFlags>,
The bitwise or (|) of the bits in each flags value.
§impl IntoIterator for ChangeFlags
impl IntoIterator for ChangeFlags
§type Item = ChangeFlags
type Item = ChangeFlags
§type IntoIter = Iter<ChangeFlags>
type IntoIter = Iter<ChangeFlags>
§fn into_iter(self) -> <ChangeFlags as IntoIterator>::IntoIter
fn into_iter(self) -> <ChangeFlags as IntoIterator>::IntoIter
§impl LowerHex for ChangeFlags
impl LowerHex for ChangeFlags
§impl Not for ChangeFlags
impl Not for ChangeFlags
§fn not(self) -> ChangeFlags
fn not(self) -> ChangeFlags
The bitwise negation (!) of the bits in a flags value, truncating the result.
§type Output = ChangeFlags
type Output = ChangeFlags
! operator.§impl Octal for ChangeFlags
impl Octal for ChangeFlags
§impl Sub for ChangeFlags
impl Sub for ChangeFlags
§fn sub(self, other: ChangeFlags) -> ChangeFlags
fn sub(self, other: ChangeFlags) -> ChangeFlags
The intersection of a source flags value with the complement of a target flags value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
§type Output = ChangeFlags
type Output = ChangeFlags
- operator.§impl SubAssign for ChangeFlags
impl SubAssign for ChangeFlags
§fn sub_assign(&mut self, other: ChangeFlags)
fn sub_assign(&mut self, other: ChangeFlags)
The intersection of a source flags value with the complement of a target flags value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.