Struct kiss_ui::button::Button [] [src]

pub struct Button(_);

A button that can be clicked momentarily and invoke a callback when this happens.

Methods

impl Button

fn new() -> Button

Create a new Button with no label.

fn set_label<L: Into<String>>(self, label: L) -> Self

Set the label of this button. Can be blank.

Trait Implementations

impl Widget for Button

fn show(self) -> Self

fn hide(self) -> Self

fn set_visible(self, visible: bool) -> Self

fn set_enabled(self, enabled: bool) -> Self

fn set_position(self, x: i32, y: i32) -> Self

fn get_position(self) -> (i32, i32)

fn set_name(self, name: &str) -> Self

fn get_name(&self) -> Option<WidgetStr>

fn get_sibling(self) -> Option<BaseWidget>

fn get_parent(self) -> Option<BaseWidget>

fn get_dialog(self) -> Option<Dialog>

fn get_size_pixels(self) -> (u32, u32)

fn store<N: Into<String>>(self, name: N) -> Option<BaseWidget>

fn to_base(self) -> BaseWidget

impl Copy for Button

impl Clone for Button

fn clone(&self) -> Self

fn clone_from(&mut self, source: &Self)

impl Downcast for Button

fn can_downcast(base: &BaseWidget) -> bool

fn try_downcast(base: BaseWidget) -> Result<Self, BaseWidget>

impl OnClick for Button

fn set_onclick<Cb>(self, on_click: Cb) -> Self where Cb: Callback<Self>

impl ImageContainer for Button

fn set_image(self, image: Image) -> Self

fn get_image(&self) -> Option<Image>