Trait ButtonExt
pub unsafe trait ButtonExt: WidgetExt {
// Required methods
fn shortcut(&self) -> Shortcut;
fn set_shortcut(&mut self, shortcut: Shortcut);
fn clear(&mut self);
fn is_set(&self) -> bool;
fn set(&mut self, flag: bool);
fn value(&self) -> bool;
fn set_value(&mut self, flag: bool);
fn set_down_frame(&mut self, f: FrameType);
fn down_frame(&self) -> FrameType;
}
dep_fltk
only.Expand description
Defines the methods implemented by all button widgets. More details can be found in the wiki.
§Safety
fltk-rs traits depend on some FLTK internal code
§Warning
fltk-rs traits are non-exhaustive,
to avoid future breakage if you try to implement them manually,
use the Deref and DerefMut pattern or the widget_extends!
macro
Required Methods§
fn set_shortcut(&mut self, shortcut: Shortcut)
fn set_shortcut(&mut self, shortcut: Shortcut)
Sets the shortcut associated with a button
fn clear(&mut self)
fn clear(&mut self)
Clears the value of the button. Useful for round, radio, light, toggle and check buttons
fn is_set(&self) -> bool
fn is_set(&self) -> bool
Returns whether a button is set or not. Useful for round, radio, light, toggle and check buttons
fn set(&mut self, flag: bool)
fn set(&mut self, flag: bool)
Sets whether a button is set or not. Useful for round, radio, light, toggle and check buttons
fn value(&self) -> bool
fn value(&self) -> bool
Returns whether a button is set or not. Useful for round, radio, light, toggle and check buttons
fn set_value(&mut self, flag: bool)
fn set_value(&mut self, flag: bool)
Sets whether a button is set or not. Useful for round, radio, light, toggle and check buttons
fn set_down_frame(&mut self, f: FrameType)
fn set_down_frame(&mut self, f: FrameType)
Set the down_box
of the widget
fn down_frame(&self) -> FrameType
fn down_frame(&self) -> FrameType
Get the down frame type of the widget