Trait droom_ui::control::toggle::ToggleAction
[−]
[src]
pub trait ToggleAction where Self: Element + 'static { fn set_action<F>(&mut self, cb: F) -> Self where F: Callback<(Self, bool)> { ... } fn remove_action(&mut self) -> Option<Box<Callback<(Self, bool)>>> { ... } }
Action generated when the toggle's state (on/off) was changed.
The callback boolean parameter represents the state the toggle was switched to.
CallbackReturn::Close
will be processed
Provided Methods
fn set_action<F>(&mut self, cb: F) -> Self where F: Callback<(Self, bool)>
fn remove_action(&mut self) -> Option<Box<Callback<(Self, bool)>>>
Implementors
impl ToggleAction for Toggle