pub struct Button { /* private fields */ }
Expand description
Widget wich have a text and can be pressed by user.
Example (but you’re better to use macros insted):
let slot_button_clicked = SlotImpl::new();
let button = Button::new("PushMe".to_owned());
button.signal_clicked().connect_slot(&slot_button_clicked);
§Macros
You may be interested in u_button! macros
to simplify Button
creation. Better example with macros:
use uniui_widget_button::prelude::*;
let slot_button_clicked = SlotImpl::new();
let button = u_buton! {
text: "PushMe".to_owned(),
signal_clicked: &slot_button_clicked,
};
Implementations§
Trait Implementations§
Source§impl DataProcessor for Button
impl DataProcessor for Button
Source§fn process_data(&mut self, _: i64, _: &mut dyn Application)
fn process_data(&mut self, _: i64, _: &mut dyn Application)
Will be called by crate::Application time to time Read more
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