Fill

Struct Fill 

Source
pub struct Fill { /* private fields */ }

Implementations§

Source§

impl Fill

Source

pub fn new(bg: impl Into<Rgba>, size: impl Into<Size>) -> Self

Source

pub fn fill_with(bg: impl Into<Rgba>) -> Self

Source

pub const fn all_space() -> Self

Trait Implementations§

Source§

impl<'v> Builder<'v> for Fill

Source§

impl Clone for Fill

Source§

fn clone(&self) -> Fill

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Fill

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Fill

Source§

fn eq(&self, other: &Fill) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl View for Fill

Source§

type Args<'v> = Fill

Arguments for building a view. Read more
Source§

type Response = ()

Response from this view that is given to the user Read more
Source§

fn create(args: Self::Args<'_>) -> Self

Create your view with the args provided from the user Read more
Source§

fn layout(&mut self, _layout: Layout<'_>, space: Space) -> Size

Lay out your view. Read more
Source§

fn draw(&mut self, render: Render<'_, '_>)

Draw your view Read more
Source§

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

If your view can be flexible, this returns how flexible it is. Read more
Source§

fn interests(&self) -> Interest

If you want to receive events, you need to provide some Interests Read more
Source§

fn primary_axis(&self) -> Axis

The primary axis of your view. Read more
Source§

fn event(&mut self, event: ViewEvent, ctx: EventCtx<'_>) -> Handled

When you provide specific Interest and an event is processed by the runtime, this method is called. Read more
Source§

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

The default event handling behavior to delegate to your children. Read more
Source§

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<'_, '_>)

The default draw handling behavior to delegate to your children. Read more
Source§

impl Copy for Fill

Source§

impl StructuralPartialEq for Fill

Auto Trait Implementations§

§

impl Freeze for Fill

§

impl RefUnwindSafe for Fill

§

impl Send for Fill

§

impl Sync for Fill

§

impl Unpin for Fill

§

impl UnwindSafe for Fill

Blanket Implementations§

Source§

impl<'v, T> Adhoc<'v> for T
where T: Builder<'v>,

Source§

type Output = Response<<<T as Builder<'v>>::View as View>::Response>

The output of this view
Source§

fn show(self, ui: &Ui<'_>) -> <T as Adhoc<'v>>::Output

Show the view, returning its output
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<'v, T> ViewExt<'v> for T
where T: Builder<'v>,

Source§

fn show(self, ui: &Ui<'_>) -> Response<<Self::View as View>::Response>

Source§

fn show_children<R>( self, ui: &Ui<'_>, show: impl FnOnce(&Ui<'_>) -> R, ) -> Response<(<Self::View as View>::Response, R)>
where R: 'static,