pub struct Button { /* private fields */ }Expand description
§Single keyboard button
Contains text & KeyAction
Can be created from string.
For example:
use egui_virtual_keyboard::Button;
use std::str::FromStr;
Button::from_str("{a}");Will create button with text “a”.
use egui_virtual_keyboard::Button;
use std::str::FromStr;
Button::from_str("{a:Key(A)}");After text KeyAction can be specified with : separator
use egui_virtual_keyboard::Button;
use std::str::FromStr;
Button::from_str("{a;2.5}");Button width can be specified after ; separator
Note that final width is calculated as
single_width_button * width + item_spacing.x * (width - 1)
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Button
impl<'de> Deserialize<'de> for Button
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Button
Auto Trait Implementations§
impl Freeze for Button
impl RefUnwindSafe for Button
impl Send for Button
impl Sync for Button
impl Unpin for Button
impl UnwindSafe for Button
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more