Struct titik::Button[][src]

pub struct Button<MSG> where
    MSG: 'static, 
{ /* fields omitted */ }

A button widget

Implementations

impl<MSG> Button<MSG> where
    MSG: 'static, 
[src]

pub fn new<S>(label: S) -> Self where
    S: ToString
[src]

create a new button with label

pub fn set_label<S: ToString>(&mut self, label: S)[src]

set the label of the button

pub fn set_rounded(&mut self, rounded: bool)[src]

set to use a rounded border

pub fn add_click_listener(&mut self, cb: Callback<Event, MSG>)[src]

add to the click listener of this button

Trait Implementations

impl<MSG: Clone> Clone for Button<MSG> where
    MSG: 'static, 
[src]

impl<MSG> Debug for Button<MSG>[src]

impl<MSG> Default for Button<MSG>[src]

impl<MSG: PartialEq> PartialEq<Button<MSG>> for Button<MSG> where
    MSG: 'static, 
[src]

impl<MSG> StructuralPartialEq for Button<MSG> where
    MSG: 'static, 
[src]

impl<MSG> Widget<MSG> for Button<MSG> where
    MSG: 'static, 
[src]

fn draw(&self, buf: &mut Buffer) -> Vec<Cmd>[src]

draw this button to the buffer, with the given computed layout

Auto Trait Implementations

impl<MSG> !RefUnwindSafe for Button<MSG>

impl<MSG> !Send for Button<MSG>

impl<MSG> !Sync for Button<MSG>

impl<MSG> Unpin for Button<MSG>

impl<MSG> !UnwindSafe for Button<MSG>

Blanket Implementations

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

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

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

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

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

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.