[][src]Struct egui::widgets::Button

pub struct Button { /* fields omitted */ }

Clickable button with text

Implementations

impl Button[src]

pub fn new(text: impl Into<String>) -> Self[src]

pub fn text_color(self, text_color: Srgba) -> Self[src]

pub fn text_color_opt(self, text_color: Option<Srgba>) -> Self[src]

pub fn text_style(self, text_style: TextStyle) -> Self[src]

pub fn fill(self, fill: Option<Srgba>) -> Self[src]

pub fn sense(self, sense: Sense) -> Self[src]

By default, buttons senses clicks. Change this to a drag-button with Sense::drag().

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

If you set this to false, the button will be grayed out and un-clickable. enabled(false) has the same effect as calling sense(Sense::nothing()).

Trait Implementations

impl Widget for Button[src]

Auto Trait Implementations

impl RefUnwindSafe for Button

impl Send for Button

impl Sync for Button

impl Unpin for Button

impl UnwindSafe for Button

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