pub struct Button {
pub name: CString,
pub label: Label,
pub size: Size,
pub outline_name: CString,
pub keycodes: Vec<KeyCode>,
pub action: Action,
}
Expand description
The definition of an interactive button
Fields
name: CString
ID string, e.g. for CSS
label: Label
Label to display to the user
size: Size
outline_name: CString
The name of the visual class applied
keycodes: Vec<KeyCode>
A cache of raw keycodes derived from Action::Submit given a keymap
action: Action
Static description of what the key does when pressed or released
Implementations
sourceimpl Button
impl Button
pub fn get_bounds(&self) -> Bounds
Trait Implementations
impl StructuralPartialEq for Button
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more