[][src]Struct widgetry::Btn

pub struct Btn {}

Implementations

impl Btn[src]

pub fn svg<I: Into<String>>(path: I, rewrite_hover: RewriteColor) -> BtnBuilder[src]

pub fn svg_def<I: Into<String>>(path: I) -> BtnBuilder[src]

pub fn plaintext<I: Into<String>>(label: I) -> BtnBuilder[src]

pub fn plaintext_custom<I: Into<String>>(label: I, txt: Text) -> BtnBuilder[src]

pub fn text_fg<I: Into<String>>(label: I) -> BtnBuilder[src]

pub fn txt<I: Into<String>>(label: I, txt: Text) -> BtnBuilder[src]

pub fn text_bg<I: Into<String>>(
    label: I,
    text: Text,
    unselected_bg_color: Color,
    selected_bg_color: Color
) -> BtnBuilder
[src]

pub fn text_bg1<I: Into<String>>(label: I) -> BtnBuilder[src]

pub fn text_bg2<I: Into<String>>(label: I) -> BtnBuilder[src]

pub fn pop_up<I: Into<String>>(
    ctx: &EventCtx<'_>,
    label: Option<I>
) -> BtnBuilder
[src]

pub fn custom(
    normal: GeomBatch,
    hovered: GeomBatch,
    hitbox: Polygon,
    outline: Option<(f64, Color)>
) -> BtnBuilder
[src]

pub fn close(ctx: &EventCtx<'_>) -> Widget[src]

An "X" button to close the current state. Bound to the escape key and aligned to the right, usually after a title.

Auto Trait Implementations

impl RefUnwindSafe for Btn

impl Send for Btn

impl Sync for Btn

impl Unpin for Btn

impl UnwindSafe for Btn

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> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.