pub struct ContentBoxItemLayout {
pub anchors: Rect,
pub margin: Rect,
pub align: Vec2,
pub offset: Vec2,
pub depth: Scalar,
pub keep_in_bounds: ContentBoxItemKeepInBounds,
}Expand description
Allows customizing how an item in a content_box is laid out
Fields§
§anchors: Rect§margin: RectThe margins to put on each side of the item
align: Vec2Tells in percentage, where is the center of mass of the widget, relative to it’s box size
offset: Vec2The amount to offset the item from where it would otherwise be laid out
depth: ScalarThe “Z” depth of the item
keep_in_bounds: ContentBoxItemKeepInBoundsSet of constraints that tell if and how to keep item in container bounds
Trait Implementations§
Source§impl Clone for ContentBoxItemLayout
impl Clone for ContentBoxItemLayout
Source§fn clone(&self) -> ContentBoxItemLayout
fn clone(&self) -> ContentBoxItemLayout
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContentBoxItemLayout
impl Debug for ContentBoxItemLayout
Source§impl Default for ContentBoxItemLayout
impl Default for ContentBoxItemLayout
Source§impl<'de> Deserialize<'de> for ContentBoxItemLayout
impl<'de> Deserialize<'de> for ContentBoxItemLayout
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Prefab for ContentBoxItemLayout
impl Prefab for ContentBoxItemLayout
fn from_prefab(data: PrefabValue) -> Result<Self, PrefabError>
fn to_prefab(&self) -> Result<PrefabValue, PrefabError>
Source§impl PropsData for ContentBoxItemLayoutwhere
Self: Clone,
impl PropsData for ContentBoxItemLayoutwhere
Self: Clone,
Auto Trait Implementations§
impl Freeze for ContentBoxItemLayout
impl RefUnwindSafe for ContentBoxItemLayout
impl Send for ContentBoxItemLayout
impl Sync for ContentBoxItemLayout
impl Unpin for ContentBoxItemLayout
impl UnsafeUnpin for ContentBoxItemLayout
impl UnwindSafe for ContentBoxItemLayout
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
Mutably borrows from an owned value. Read more