pub struct Constrain { /* private fields */ }Implementations§
Source§impl Constrain
impl Constrain
pub fn new(space: impl Into<Space>) -> Self
pub fn with(self, other: Self) -> Self
pub fn exact_size(size: impl Into<Size>) -> Self
pub fn max_size(size: impl Into<Size>) -> Self
pub fn min_size(size: impl Into<Size>) -> Self
pub fn exact_height(height: i32) -> Self
pub fn exact_width(width: i32) -> Self
pub fn min_width(min_width: i32) -> Self
pub fn max_width(max_width: i32) -> Self
pub fn min_height(min_height: i32) -> Self
pub fn max_height(max_height: i32) -> Self
Trait Implementations§
Source§impl View for Constrain
impl View for Constrain
Source§fn create(this: Self::Args<'_>) -> Self
fn create(this: Self::Args<'_>) -> Self
Create your view with the args provided from the user Read more
Source§fn update(&mut self, args: Self::Args<'_>, ui: &Ui<'_>) -> Self::Response
fn update(&mut self, args: Self::Args<'_>, ui: &Ui<'_>) -> Self::Response
Update your view with the args provided from the user Read more
Source§fn flex(&self) -> Flex
fn flex(&self) -> Flex
If your view can be flexible, this returns how flexible it is. Read more
Source§fn primary_axis(&self) -> Axis
fn primary_axis(&self) -> Axis
The primary axis of your view. Read more
Source§fn size(&self, intrinsic: IntrinsicSize<'_>, axis: Axis, extent: f32) -> f32
fn size(&self, intrinsic: IntrinsicSize<'_>, axis: Axis, extent: f32) -> f32
This is a hint can be used for determining how much space a view will
take up on a specific axis with a specific extent (width/height). Read more
Source§fn default_event(&mut self, event: ViewEvent, ctx: EventCtx<'_>) -> Handled
fn default_event(&mut self, event: ViewEvent, ctx: EventCtx<'_>) -> Handled
The default event handling behavior to delegate to your children. Read more
Source§fn default_layout(&mut self, layout: Layout<'_>, space: Space) -> Size
fn default_layout(&mut self, layout: Layout<'_>, space: Space) -> Size
The default layout handling behavior to delegate to your children. Read more
Source§fn default_draw(&mut self, render: Render<'_, '_>)
fn default_draw(&mut self, render: Render<'_, '_>)
The default draw handling behavior to delegate to your children. Read more
impl Copy for Constrain
Auto Trait Implementations§
impl Freeze for Constrain
impl RefUnwindSafe for Constrain
impl Send for Constrain
impl Sync for Constrain
impl Unpin for Constrain
impl UnwindSafe for Constrain
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