Struct winsafe::gui::events::EditEvents
source · pub struct EditEvents(/* private fields */);
Available on crate feature
gui
only.Expand description
Exposes edit 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 EditEvents
impl EditEvents
sourcepub fn en_align_ltr_ec<F>(&self, func: F)
pub fn en_align_ltr_ec<F>(&self, func: F)
EN_ALIGN_LTR_EC
command notification.
sourcepub fn en_align_rtl_ec<F>(&self, func: F)
pub fn en_align_rtl_ec<F>(&self, func: F)
EN_ALIGN_LTR_EC
command notification.
sourcepub fn en_change<F>(&self, func: F)
pub fn en_change<F>(&self, func: F)
EN_CHANGE
command notification.
§Examples
use winsafe::{self as w, prelude::*, gui};
let wnd: gui::WindowMain; // initialized somewhere
let txt: gui::Edit;
let txt2 = txt.clone(); // to pass into the closure
txt.on().en_change(
move || -> w::AnyResult<()> {
println!("Text: {}", txt2.text());
Ok(())
},
);
sourcepub fn en_err_space<F>(&self, func: F)
pub fn en_err_space<F>(&self, func: F)
EN_ERRSPACE
command notification.
sourcepub fn en_h_scroll<F>(&self, func: F)
pub fn en_h_scroll<F>(&self, func: F)
EN_HSCROLL
command notification.
sourcepub fn en_kill_focus<F>(&self, func: F)
pub fn en_kill_focus<F>(&self, func: F)
EN_KILLFOCUS
command notification.
sourcepub fn en_max_text<F>(&self, func: F)
pub fn en_max_text<F>(&self, func: F)
EN_MAXTEXT
command notification.
sourcepub fn en_set_focus<F>(&self, func: F)
pub fn en_set_focus<F>(&self, func: F)
EN_SETFOCUS
command notification.
sourcepub fn en_v_scroll<F>(&self, func: F)
pub fn en_v_scroll<F>(&self, func: F)
EN_VSCROLL
command notification.
Trait Implementations§
source§impl GuiNativeControlEvents<EditEvents> for Edit
impl GuiNativeControlEvents<EditEvents> for Edit
source§fn on(&self) -> &EditEvents
fn on(&self) -> &EditEvents
Exposes the specific control events. Read more
Auto Trait Implementations§
impl Freeze for EditEvents
impl !RefUnwindSafe for EditEvents
impl !Send for EditEvents
impl !Sync for EditEvents
impl Unpin for EditEvents
impl !UnwindSafe for EditEvents
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