Struct unsegen::widget::widget::Centered [−][src]
pub struct Centered<W>(_);
Expand description
Center the widget according to the specified maximum demand within the supplied window. This is only useful if the widget has a defined maximum size and the window is larger than that.
This wrapper can be created using WidgetExt::centered
.
Trait Implementations
Auto Trait Implementations
impl<W> RefUnwindSafe for Centered<W> where
W: RefUnwindSafe,
W: RefUnwindSafe,
impl<W> Send for Centered<W> where
W: Send,
W: Send,
impl<W> Sync for Centered<W> where
W: Sync,
W: Sync,
impl<W> Unpin for Centered<W> where
W: Unpin,
W: Unpin,
impl<W> UnwindSafe for Centered<W> where
W: UnwindSafe,
W: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<W> WidgetExt for W where
W: Widget,
[src]
impl<W> WidgetExt for W where
W: Widget,
[src]fn centered(self) -> Centered<Self>
[src]
fn centered(self) -> Centered<Self>
[src]Center the widget according to the specified maximum demand within the supplied window. This is only useful if the widget has a defined maximum size and the window is larger than that. Read more
fn with_window<F: Fn(Window<'_>, RenderingHints) -> Window<'_>>(
self,
f: F
) -> WithWindow<Self, F>
[src]
fn with_window<F: Fn(Window<'_>, RenderingHints) -> Window<'_>>(
self,
f: F
) -> WithWindow<Self, F>
[src]Alter the window before letting the widget draw itself in it.
fn with_demand<F: Fn(Demand2D) -> Demand2D>(self, f: F) -> WithDemand<Self, F>
[src]
fn with_demand<F: Fn(Demand2D) -> Demand2D>(self, f: F) -> WithDemand<Self, F>
[src]Alter the reported demand of the widget. This can be useful, for example, to force a widget to assume all space in the window or to artificially restrict the size of a widget. Read more