Enum gtk::Align [−][src]
#[non_exhaustive] pub enum Align { Fill, Start, End, Center, Baseline, // some variants omitted }
Expand description
Controls how a widget deals with extra space in a single (x or y) dimension.
Alignment only matters if the widget receives a “too large” allocation,
for example if you packed the widget with the property::Widget::expand
flag inside a Box
, then the widget might get extra space. If
you have for example a 16x16 icon inside a 32x32 space, the icon
could be scaled and stretched, it could be centered, or it could be
positioned to one side of the space.
Note that in horizontal context Start
and End
are interpreted relative to text direction.
GTK_ALIGN_BASELINE support for it is optional for containers and widgets, and
it is only supported for vertical alignment. When its not supported by
a child or a container it is treated as Fill
.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
stretch to fill all space if possible, center if no meaningful way to stretch
snap to left or top side, leaving space on right or bottom
snap to right or bottom side, leaving space on left or top
center natural width of widget inside the allocation
align the widget according to the baseline. Since 3.10.
Trait Implementations
type Checker = GenericValueTypeChecker<Self>
type Checker = GenericValueTypeChecker<Self>
Value type checker.
Get the contained value from a Value
. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Returns the type identifier of Self
.
Auto Trait Implementations
impl RefUnwindSafe for Align
impl UnwindSafe for Align
Blanket Implementations
Mutably borrows from an owned value. Read more
Returns a SendValue
clone of self
.