Enum cacao::layout::LayoutAttribute
source · [−]pub enum LayoutAttribute {
Show 14 variants
Left,
Right,
Top,
Bottom,
Leading,
Trailing,
Width,
Height,
CenterX,
CenterY,
LastBaseline,
FirstBaseline,
NotAnAttribute,
Unknown(NSInteger),
}
Expand description
Represents attributes for various layouts and constraints.
Note that this only covers attributes that are shared across platforms. In general, this is enough
to build apps that work everywhere - but if you need to specify something else, you can handle
it yourself with the Unknown
variant.
Variants
Left
The left side of the object’s alignment rectangle.
Right
The right side of the object’s alignment rectangle.
Top
The top of the object’s alignment rectangle.
Bottom
The bottom of the object’s alignment rectangle.
Leading
The leading edge of the object’s alignment rectangle.
Trailing
The trailing edge of the object’s alignment rectangle.
Width
The width of the object’s alignment rectangle.
Height
The height of the object’s alignment rectangle.
CenterX
The center along the x-axis of the object’s alignment rectangle.
CenterY
The center along the y-axis of the object’s alignment rectangle.
LastBaseline
The object’s baseline. For objects with more than one line of text, this is the baseline for the bottommost line of text.
FirstBaseline
The object’s baseline. For objects with more than one line of text, this is the baseline for the topmost line of text.
NotAnAttribute
A placeholder value that is used to indicate that the constraint’s second item and second attribute are not used in any calculations.
This can be useful constraint that assigns a constant to an attribute.
Unknown(NSInteger)
Represents an unknown value. This should never be constructed, but acts as a guard against a change in representation on the framework side. If a new value was ever introduced, it’s caught here, and applications can handle it themselves if need be.
Trait Implementations
sourceimpl Debug for LayoutAttribute
impl Debug for LayoutAttribute
Auto Trait Implementations
impl RefUnwindSafe for LayoutAttribute
impl Send for LayoutAttribute
impl Sync for LayoutAttribute
impl Unpin for LayoutAttribute
impl UnwindSafe for LayoutAttribute
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more