pub struct TreeViewEvents(/* private fields */);
Available on crate feature
gui
only.Expand description
Exposes tree view 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 TreeViewEvents
impl TreeViewEvents
Sourcepub fn tvn_delete_item<F>(&self, func: F) -> &Self
pub fn tvn_delete_item<F>(&self, func: F) -> &Self
TVN_DELETEITEM
notification.
Sourcepub fn tvn_item_changed<F>(&self, func: F) -> &Self
pub fn tvn_item_changed<F>(&self, func: F) -> &Self
TVN_ITEMCHANGED
notification.
Sourcepub fn tvn_item_changing<F>(&self, func: F) -> &Self
pub fn tvn_item_changing<F>(&self, func: F) -> &Self
TVN_ITEMCHANGING
notification.
Sourcepub fn tvn_item_expanded<F>(&self, func: F) -> &Self
pub fn tvn_item_expanded<F>(&self, func: F) -> &Self
TVN_ITEMEXPANDED
notification.
Sourcepub fn tvn_item_expanding<F>(&self, func: F) -> &Self
pub fn tvn_item_expanding<F>(&self, func: F) -> &Self
TVN_ITEMEXPANDING
notification.
Sourcepub fn tvn_sel_changed<F>(&self, func: F) -> &Self
pub fn tvn_sel_changed<F>(&self, func: F) -> &Self
TVN_SELCHANGED
notification.
§Examples
use winsafe::{self as w, prelude::*, gui, co};
let wnd: gui::WindowMain; // initialized somewhere
let tree: gui::TreeView;
tree.on().tvn_sel_changed(
move |p: &w::NMTREEVIEW| -> w::AnyResult<()> {
println!(
"Old item: {} - new item: {} - action: {}",
p.itemOld.pszText().unwrap(),
p.itemNew.pszText().unwrap(),
unsafe { co::TVC::from_raw(p.action) },
);
Ok(())
},
);
Sourcepub fn tvn_sel_changing<F>(&self, func: F) -> &Self
pub fn tvn_sel_changing<F>(&self, func: F) -> &Self
TVN_SELCHANGING
notification.
Sourcepub fn nm_custom_draw<F>(&self, func: F) -> &Self
pub fn nm_custom_draw<F>(&self, func: F) -> &Self
NM_CUSTOMDRAW
notification.
Sourcepub fn nm_dbl_clk<F>(&self, func: F) -> &Self
pub fn nm_dbl_clk<F>(&self, func: F) -> &Self
NM_DBLCLK
notification.
Sourcepub fn nm_kill_focus<F>(&self, func: F) -> &Self
pub fn nm_kill_focus<F>(&self, func: F) -> &Self
NM_KILLFOCUS
notification.
Sourcepub fn nm_r_click<F>(&self, func: F) -> &Self
pub fn nm_r_click<F>(&self, func: F) -> &Self
NM_RCLICK
notification.
Sourcepub fn nm_r_dbl_clk<F>(&self, func: F) -> &Self
pub fn nm_r_dbl_clk<F>(&self, func: F) -> &Self
NM_RDBLCLK
notification.
Sourcepub fn nm_set_cursor<F>(&self, func: F) -> &Self
pub fn nm_set_cursor<F>(&self, func: F) -> &Self
NM_MOUSE
notification.
Sourcepub fn nm_set_focus<F>(&self, func: F) -> &Self
pub fn nm_set_focus<F>(&self, func: F) -> &Self
NM_SETFOCUS
notification.
Auto Trait Implementations§
impl Freeze for TreeViewEvents
impl !RefUnwindSafe for TreeViewEvents
impl !Send for TreeViewEvents
impl !Sync for TreeViewEvents
impl Unpin for TreeViewEvents
impl !UnwindSafe for TreeViewEvents
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