[][src]Struct tuikit::prelude::Win

pub struct Win<'a> { /* fields omitted */ }

A Win is like a div in HTML, it has its margin/padding, and border

Methods

impl<'a> Win<'a>[src]

pub fn new(draw: &'a dyn Draw) -> Self[src]

pub fn margin_top(self, margin_top: impl Into<Size>) -> Self[src]

pub fn margin_right(self, margin_right: impl Into<Size>) -> Self[src]

pub fn margin_bottom(self, margin_bottom: impl Into<Size>) -> Self[src]

pub fn margin_left(self, margin_left: impl Into<Size>) -> Self[src]

pub fn margin(self, margin: impl Into<Size>) -> Self[src]

pub fn padding_top(self, padding_top: impl Into<Size>) -> Self[src]

pub fn padding_right(self, padding_right: impl Into<Size>) -> Self[src]

pub fn padding_bottom(self, padding_bottom: impl Into<Size>) -> Self[src]

pub fn padding_left(self, padding_left: impl Into<Size>) -> Self[src]

pub fn padding(self, padding: impl Into<Size>) -> Self[src]

pub fn border_top(self, border_top: bool) -> Self[src]

pub fn border_right(self, border_right: bool) -> Self[src]

pub fn border_bottom(self, border_bottom: bool) -> Self[src]

pub fn border_left(self, border_left: bool) -> Self[src]

pub fn border(self, border: bool) -> Self[src]

pub fn border_top_attr(self, border_top_attr: impl Into<Attr>) -> Self[src]

pub fn border_right_attr(self, border_right_attr: impl Into<Attr>) -> Self[src]

pub fn border_bottom_attr(self, border_bottom_attr: impl Into<Attr>) -> Self[src]

pub fn border_left_attr(self, border_left_attr: impl Into<Attr>) -> Self[src]

pub fn border_attr(self, attr: impl Into<Attr>) -> Self[src]

pub fn basis(self, basis: impl Into<Size>) -> Self[src]

pub fn grow(self, grow: usize) -> Self[src]

pub fn shrink(self, shrink: usize) -> Self[src]

Trait Implementations

impl<'a> Split for Win<'a>[src]

fn inner_size(&self) -> (Size, Size)[src]

get the default size of inner content, will be used if basis is Default

impl<'a> Draw for Win<'a>[src]

fn draw(&self, canvas: &mut dyn Canvas) -> Result<()>[src]

Reserve margin & padding, draw border.

Auto Trait Implementations

impl<'a> !Send for Win<'a>

impl<'a> !Sync for Win<'a>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]