Struct winsafe::gui::events::TreeViewEvents
source · 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)
pub fn tvn_delete_item<F>(&self, func: F)
TVN_DELETEITEM
notification.
sourcepub fn tvn_item_changed<F>(&self, func: F)
pub fn tvn_item_changed<F>(&self, func: F)
TVN_ITEMCHANGED
notification.
sourcepub fn tvn_item_changing<F>(&self, func: F)
pub fn tvn_item_changing<F>(&self, func: F)
TVN_ITEMCHANGING
notification.
sourcepub fn tvn_item_expanded<F>(&self, func: F)
pub fn tvn_item_expanded<F>(&self, func: F)
TVN_ITEMEXPANDED
notification.
sourcepub fn tvn_item_expanding<F>(&self, func: F)
pub fn tvn_item_expanding<F>(&self, func: F)
TVN_ITEMEXPANDING
notification.
sourcepub fn tvn_sel_changed<F>(&self, func: F)
pub fn tvn_sel_changed<F>(&self, func: F)
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)
pub fn tvn_sel_changing<F>(&self, func: F)
TVN_SELCHANGING
notification.
sourcepub fn nm_custom_draw<F>(&self, func: F)
pub fn nm_custom_draw<F>(&self, func: F)
NM_CUSTOMDRAW
notification.
sourcepub fn nm_dbl_clk<F>(&self, func: F)
pub fn nm_dbl_clk<F>(&self, func: F)
NM_DBLCLK
notification.
sourcepub fn nm_kill_focus<F>(&self, func: F)
pub fn nm_kill_focus<F>(&self, func: F)
NM_KILLFOCUS
notification.
sourcepub fn nm_r_click<F>(&self, func: F)
pub fn nm_r_click<F>(&self, func: F)
NM_RCLICK
notification.
sourcepub fn nm_r_dbl_clk<F>(&self, func: F)
pub fn nm_r_dbl_clk<F>(&self, func: F)
NM_RDBLCLK
notification.
sourcepub fn nm_set_cursor<F>(&self, func: F)
pub fn nm_set_cursor<F>(&self, func: F)
NM_MOUSE
notification.
sourcepub fn nm_set_focus<F>(&self, func: F)
pub fn nm_set_focus<F>(&self, func: F)
NM_SETFOCUS
notification.
Trait Implementations§
source§impl<T> GuiNativeControlEvents<TreeViewEvents> for TreeView<T>
impl<T> GuiNativeControlEvents<TreeViewEvents> for TreeView<T>
source§fn on(&self) -> &TreeViewEvents
fn on(&self) -> &TreeViewEvents
Exposes the specific control events. Read more
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