[−][src]Enum gtk::Align
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 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 Align::Start
and Align::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 Align::Fill
.
Variants (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
impl Clone for Align
[src]
impl Copy for Align
[src]
impl Debug for Align
[src]
impl Display for Align
[src]
impl Eq for Align
[src]
impl<'a> FromValue<'a> for Align
[src]
unsafe fn from_value(value: &Value) -> Self
[src]
impl<'a> FromValueOptional<'a> for Align
[src]
unsafe fn from_value_optional(value: &Value) -> Option<Self>
[src]
impl Hash for Align
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Align
[src]
fn cmp(&self, other: &Align) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Align> for Align
[src]
impl PartialOrd<Align> for Align
[src]
fn partial_cmp(&self, other: &Align) -> Option<Ordering>
[src]
fn lt(&self, other: &Align) -> bool
[src]
fn le(&self, other: &Align) -> bool
[src]
fn gt(&self, other: &Align) -> bool
[src]
fn ge(&self, other: &Align) -> bool
[src]
impl SetValue for Align
[src]
impl StaticType for Align
[src]
fn static_type() -> Type
[src]
impl StructuralEq for Align
[src]
impl StructuralPartialEq for Align
[src]
Auto Trait Implementations
impl RefUnwindSafe for Align
impl Send for Align
impl Sync for Align
impl Unpin for Align
impl UnwindSafe for Align
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToSendValue for T where
T: ToValue + SetValue + Send + ?Sized,
T: ToValue + SetValue + Send + ?Sized,
fn to_send_value(&self) -> SendValue
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> ToValue for T where
T: SetValue + ?Sized,
T: SetValue + ?Sized,
fn to_value(&self) -> Value
fn to_value_type(&self) -> Type
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,