pub struct ButtonEvents(/* private fields */);
Available on crate feature
gui
only.Expand description
Exposes button control notifications.
These event methods are just proxies to the
WindowEvents
of the parent window, who
is the real responsible for the child event handling.
You cannot directly instantiate this object, it is created internally by the control.
Implementations§
Source§impl ButtonEvents
impl ButtonEvents
Sourcepub fn bcn_drop_down<F>(&self, func: F) -> &Self
pub fn bcn_drop_down<F>(&self, func: F) -> &Self
BCN_DROPDOWN
notification.
Sourcepub fn bcn_hot_item_change<F>(&self, func: F) -> &Self
pub fn bcn_hot_item_change<F>(&self, func: F) -> &Self
BCN_HOTITEMCHANGE
notification.
Sourcepub fn bn_clicked<F>(&self, func: F) -> &Self
pub fn bn_clicked<F>(&self, func: F) -> &Self
BN_CLICKED
command notification.
§Examples
use winsafe::{self as w, prelude::*, gui};
let wnd: gui::WindowMain; // initialized somewhere
let btn: gui::Button;
btn.on().bn_clicked(
move || -> w::AnyResult<()> {
println!("Clicked.");
Ok(())
},
);
Sourcepub fn bn_dbl_clk<F>(&self, func: F) -> &Self
pub fn bn_dbl_clk<F>(&self, func: F) -> &Self
BN_DBLCLK
command notification.
Sourcepub fn bn_kill_focus<F>(&self, func: F) -> &Self
pub fn bn_kill_focus<F>(&self, func: F) -> &Self
BN_KILLFOCUS
command notification.
Sourcepub fn bn_set_focus<F>(&self, func: F) -> &Self
pub fn bn_set_focus<F>(&self, func: F) -> &Self
BN_SETFOCUS
command notification.
Sourcepub fn nm_custom_draw<F>(&self, func: F) -> &Self
pub fn nm_custom_draw<F>(&self, func: F) -> &Self
NM_CUSTOMDRAW
notification.
Auto Trait Implementations§
impl Freeze for ButtonEvents
impl !RefUnwindSafe for ButtonEvents
impl !Send for ButtonEvents
impl !Sync for ButtonEvents
impl Unpin for ButtonEvents
impl !UnwindSafe for ButtonEvents
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