[−][src]Struct uniui_widget_button::Button
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
impl Button
[src]
pub fn new(text: String) -> Self
[src]
Creates new Button
with predefined text on it
pub fn signal_clicked(&mut self) -> &mut Signal<()>
[src]
The signal will be triggered every time user clicks the button.
You can connect your slots to the signal to receive notification about user clicks.
Trait Implementations
impl DataProcessor for Button
[src]
fn process_data(&mut self, _: i64, _: &mut Application)
[src]
impl Widget for Button
[src]
fn to_native(
&mut self,
widget_generator: &mut dyn WidgetGenerator
) -> Result<NativeWidget, ()>
[src]
&mut self,
widget_generator: &mut dyn WidgetGenerator
) -> Result<NativeWidget, ()>
fn draw(&mut self)
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,