Struct winsafe::gui::events::ButtonEvents
source · 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)
pub fn bcn_drop_down<F>(&self, func: F)
BCN_DROPDOWN
notification.
sourcepub fn bcn_hot_item_change<F>(&self, func: F)
pub fn bcn_hot_item_change<F>(&self, func: F)
BCN_HOTITEMCHANGE
notification.
sourcepub fn bn_clicked<F>(&self, func: F)
pub fn bn_clicked<F>(&self, func: F)
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)
pub fn bn_dbl_clk<F>(&self, func: F)
BN_DBLCLK
command notification.
sourcepub fn bn_kill_focus<F>(&self, func: F)
pub fn bn_kill_focus<F>(&self, func: F)
BN_KILLFOCUS
command notification.
sourcepub fn bn_set_focus<F>(&self, func: F)
pub fn bn_set_focus<F>(&self, func: F)
BN_SETFOCUS
command notification.
sourcepub fn nm_custom_draw<F>(&self, func: F)
pub fn nm_custom_draw<F>(&self, func: F)
NM_CUSTOMDRAW
notification.
Trait Implementations§
source§impl GuiNativeControlEvents<ButtonEvents> for Button
impl GuiNativeControlEvents<ButtonEvents> for Button
source§fn on(&self) -> &ButtonEvents
fn on(&self) -> &ButtonEvents
Exposes the specific control events. Read more
source§impl GuiNativeControlEvents<ButtonEvents> for CheckBox
impl GuiNativeControlEvents<ButtonEvents> for CheckBox
source§fn on(&self) -> &ButtonEvents
fn on(&self) -> &ButtonEvents
Exposes the specific control events. Read more
source§impl GuiNativeControlEvents<ButtonEvents> for RadioButton
impl GuiNativeControlEvents<ButtonEvents> for RadioButton
source§fn on(&self) -> &ButtonEvents
fn on(&self) -> &ButtonEvents
Exposes the specific control events. Read more
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