Macro gstore::button[][src]

macro_rules! button {
    ($text:expr, |$store:ident| $callback:expr) => { ... };
    (
        $($text:tt)*
    ) => { ... };
}

Creates a GTK button.

See Also

Examples

Short example:

button!("Click Me!", |store| store.dispatch(Action::Count(CountAction::Clicked)));

Long example:

button! {
    properties {
        label: "Click Me!"
    }
    connections {
       (store) connect_clicked: move |_| store.dispatch(Action::Count(CountAction::Clicked))
    }
    children [
        image!("list-add-symbolic", gtk::IconSize::Button)
    ]
};