Skip to main content

Content

Struct Content 

Source
pub struct Content<'a, Message, Theme = Theme, Renderer = Renderer>
where Theme: Catalog, Renderer: Renderer,
{ /* private fields */ }
Expand description

The content of a Pane.

Implementations§

Source§

impl<'a, Message, Theme, Renderer> Content<'a, Message, Theme, Renderer>
where Theme: Catalog, Renderer: Renderer,

Source

pub fn new(body: impl Into<Element<'a, Message, Theme, Renderer>>) -> Self

Creates a new Content with the provided body.

Source

pub fn title_bar( self, title_bar: TitleBar<'a, Message, Theme, Renderer>, ) -> Self

Sets the TitleBar of the Content.

Source

pub fn style(self, style: impl Fn(&Theme) -> Style + 'a) -> Self
where Theme::Class<'a>: From<StyleFn<'a, Theme>>,

Sets the style of the Content.

Source

pub fn class(self, class: impl Into<Theme::Class<'a>>) -> Self

Available on crate feature advanced only.

Sets the style class of the Content.

Source§

impl<Message, Theme, Renderer> Content<'_, Message, Theme, Renderer>
where Theme: Catalog, Renderer: Renderer,

Source

pub fn draw( &self, tree: &Tree, renderer: &mut Renderer, theme: &Theme, style: &Style, layout: Layout<'_>, cursor: Cursor, viewport: &Rectangle, )

Draws the Content with the provided Renderer and Layout.

Trait Implementations§

Source§

impl<Message, Theme, Renderer> Draggable for &Content<'_, Message, Theme, Renderer>
where Theme: Catalog, Renderer: Renderer,

Source§

fn can_be_dragged_at(&self, layout: Layout<'_>, cursor_position: Point) -> bool

Returns whether the Draggable with the given Layout can be picked at the provided cursor position.
Source§

impl<'a, T, Message, Theme, Renderer> From<T> for Content<'a, Message, Theme, Renderer>
where T: Into<Element<'a, Message, Theme, Renderer>>, Theme: Catalog + 'a, Renderer: Renderer,

Source§

fn from(element: T) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'a, Message, Theme, Renderer> Freeze for Content<'a, Message, Theme, Renderer>
where <Theme as Catalog>::Class<'a>: Freeze,

§

impl<'a, Message, Theme = Theme, Renderer = Renderer> !RefUnwindSafe for Content<'a, Message, Theme, Renderer>

§

impl<'a, Message, Theme = Theme, Renderer = Renderer> !Send for Content<'a, Message, Theme, Renderer>

§

impl<'a, Message, Theme = Theme, Renderer = Renderer> !Sync for Content<'a, Message, Theme, Renderer>

§

impl<'a, Message, Theme, Renderer> Unpin for Content<'a, Message, Theme, Renderer>
where <Theme as Catalog>::Class<'a>: Unpin,

§

impl<'a, Message, Theme, Renderer> UnsafeUnpin for Content<'a, Message, Theme, Renderer>
where <Theme as Catalog>::Class<'a>: UnsafeUnpin,

§

impl<'a, Message, Theme = Theme, Renderer = Renderer> !UnwindSafe for Content<'a, Message, Theme, Renderer>

Blanket Implementations§

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> 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, 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.