Struct winsafe::gui::events::ListViewEvents [−][src]
pub struct ListViewEvents { /* fields omitted */ }
Expand description
Exposes list 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
LVN_BEGINDRAG
notification.
Notifies that a drag-and-drop operation involving the left mouse button is being initiated.
pub fn lvn_begin_label_edit<F>(&self, func: F) where
F: Fn(&NMLVDISPINFO<'_>) -> BoxResult<bool> + 'static,
pub fn lvn_begin_label_edit<F>(&self, func: F) where
F: Fn(&NMLVDISPINFO<'_>) -> BoxResult<bool> + 'static,
LVN_BEGINLABELEDIT
notification.
Notifies about the start of label editing for an item.
pub fn lvn_begin_r_drag<F>(&self, func: F) where
F: Fn(&NMLISTVIEW) -> BoxResult<()> + 'static,
pub fn lvn_begin_r_drag<F>(&self, func: F) where
F: Fn(&NMLISTVIEW) -> BoxResult<()> + 'static,
LVN_BEGINRDRAG
notification.
Notifies that a drag-and-drop operation involving the right mouse button is being initiated.
pub fn lvn_begin_scroll<F>(&self, func: F) where
F: Fn(&NMLVSCROLL) -> BoxResult<()> + 'static,
pub fn lvn_begin_scroll<F>(&self, func: F) where
F: Fn(&NMLVSCROLL) -> BoxResult<()> + 'static,
LVN_BEGINSCROLL
notification.
Notifies when a scrolling operation starts.
pub fn lvn_column_click<F>(&self, func: F) where
F: Fn(&NMLISTVIEW) -> BoxResult<()> + 'static,
pub fn lvn_column_click<F>(&self, func: F) where
F: Fn(&NMLISTVIEW) -> BoxResult<()> + 'static,
LVN_COLUMNCLICK
notification.
Notifies that a column header was clicked while the list-view control was in report mode.
pub fn lvn_column_drop_down<F>(&self, func: F) where
F: Fn(&NMLISTVIEW) -> BoxResult<()> + 'static,
pub fn lvn_column_drop_down<F>(&self, func: F) where
F: Fn(&NMLISTVIEW) -> BoxResult<()> + 'static,
LVN_COLUMNDROPDOWN
notification.
Sent by a list-view control when the list-view’s drop-down button is pressed.
pub fn lvn_column_overflow_click<F>(&self, func: F) where
F: Fn(&NMLISTVIEW) -> BoxResult<()> + 'static,
pub fn lvn_column_overflow_click<F>(&self, func: F) where
F: Fn(&NMLISTVIEW) -> BoxResult<()> + 'static,
LVN_COLUMNOVERFLOWCLICK
notification.
Sent by a list-view control when its overflow button is clicked.
pub fn lvn_delete_all_items<F>(&self, func: F) where
F: Fn(&NMLISTVIEW) -> BoxResult<bool> + 'static,
pub fn lvn_delete_all_items<F>(&self, func: F) where
F: Fn(&NMLISTVIEW) -> BoxResult<bool> + 'static,
LVN_DELETEALLITEMS
notification.
Notifies that all items in the control are about to be deleted.
LVN_DELETEITEM
notification.
Notifies that an item is about to be deleted.
Examples
use winsafe::{gui, BoxResult, NMLISTVIEW};
let list: gui::ListView; // initialized somewhere
list.on().lvn_delete_item(|p: &NMLISTVIEW| -> BoxResult<()> {
println!("Item: {}", p.iItem);
Ok(())
});
pub fn lvn_end_label_edit<F>(&self, func: F) where
F: Fn(&NMLVDISPINFO<'_>) -> BoxResult<bool> + 'static,
pub fn lvn_end_label_edit<F>(&self, func: F) where
F: Fn(&NMLVDISPINFO<'_>) -> BoxResult<bool> + 'static,
LVN_ENDLABELEDIT
notification.
Notifies about the end of label editing for an item.
LVN_ENDSCROLL
notification.
Notifies when a scrolling operation ends.
pub fn lvn_get_disp_info<F>(&self, func: F) where
F: Fn(&NMLVDISPINFO<'_>) -> BoxResult<()> + 'static,
pub fn lvn_get_disp_info<F>(&self, func: F) where
F: Fn(&NMLVDISPINFO<'_>) -> BoxResult<()> + 'static,
LVN_GETDISPINFO
notification.
It is a request to provide information needed to display or sort a list-view item.
pub fn lvn_get_empty_markup<F>(&self, func: F) where
F: Fn(&mut NMLVEMPTYMARKUP) -> BoxResult<bool> + 'static,
pub fn lvn_get_empty_markup<F>(&self, func: F) where
F: Fn(&mut NMLVEMPTYMARKUP) -> BoxResult<bool> + 'static,
LVN_GETEMPTYMARKUP
notification.
Sent by list-view control when the control has no items. The notification code is a request for the parent window to provide markup text.
pub fn lvn_get_info_tip<F>(&self, func: F) where
F: Fn(&NMLVGETINFOTIP<'_>) -> BoxResult<()> + 'static,
pub fn lvn_get_info_tip<F>(&self, func: F) where
F: Fn(&NMLVGETINFOTIP<'_>) -> BoxResult<()> + 'static,
LVN_GETINFOTIP
notification.
Sent by a large icon view list-view control that has the
LVS_EX_INFOTIP
extended style. This
notification code is sent when the list-view control is requesting
additional text information to be displayed in a tooltip.
LVN_HOTTRACK
notification.
Sent by a list-view control when the user moves the mouse over an
item. This notification code is only sent by list-view controls that
have the LVS_EX_TRACKSELECT
extended list-view style.
pub fn lvn_incremental_search<F>(&self, func: F) where
F: Fn(&NMLVFINDITEM<'_>) -> BoxResult<()> + 'static,
pub fn lvn_incremental_search<F>(&self, func: F) where
F: Fn(&NMLVFINDITEM<'_>) -> BoxResult<()> + 'static,
LVN_INCREMENTALSEARCH
notification.
Notifies that an incremental search has started.
LVN_INSERTITEM
notification.
Notifies that a new item was inserted.
pub fn lvn_item_activate<F>(&self, func: F) where
F: Fn(&NMITEMACTIVATE) -> BoxResult<()> + 'static,
pub fn lvn_item_activate<F>(&self, func: F) where
F: Fn(&NMITEMACTIVATE) -> BoxResult<()> + 'static,
LVN_ITEMACTIVATE
notification.
Sent by a list-view control when the user activates an item.
pub fn lvn_item_changed<F>(&self, func: F) where
F: Fn(&NMLISTVIEW) -> BoxResult<()> + 'static,
pub fn lvn_item_changed<F>(&self, func: F) where
F: Fn(&NMLISTVIEW) -> BoxResult<()> + 'static,
LVN_ITEMCHANGED
notification.
Notifies that an item has changed.
Examples
use winsafe::{gui, BoxResult, NMLISTVIEW};
let list: gui::ListView; // initialized somewhere
list.on().lvn_item_changed(|p: &NMLISTVIEW| -> BoxResult<()> {
println!("Item: {}", p.iItem);
Ok(())
});
pub fn lvn_item_changing<F>(&self, func: F) where
F: Fn(&NMLISTVIEW) -> BoxResult<bool> + 'static,
pub fn lvn_item_changing<F>(&self, func: F) where
F: Fn(&NMLISTVIEW) -> BoxResult<bool> + 'static,
LVN_ITEMCHANGING
notification.
Notifies that an item is changing.
LVN_KEYDOWN
notification.
Notifies that a key has been pressed.
Examples
use winsafe::{gui, BoxResult, NMLVKEYDOWN};
let list: gui::ListView; // initialized somewhere
list.on().lvn_delete_item(|p: &NMLVKEYDOWN| -> BoxResult<()> {
if p.wVKey == co::VK::DELETE {
println!("DEL key was pressed.");
}
Ok(())
});
LVN_LINKCLICK
notification.
Notifies that a link has been clicked on.
LVN_MARQUEEBEGIN
notification.
Notifies that a bounding box (marquee) selection has begun.
pub fn lvn_od_cache_hint<F>(&self, func: F) where
F: Fn(&NMLVCACHEHINT) -> BoxResult<()> + 'static,
pub fn lvn_od_cache_hint<F>(&self, func: F) where
F: Fn(&NMLVCACHEHINT) -> BoxResult<()> + 'static,
LVN_ODCACHEHINT
notification.
Sent by a virtual list-view control when the contents of its display area have changed. For example, a list-view control sends this notification code when the user scrolls the control’s display.
pub fn lvn_od_find_item<F>(&self, func: F) where
F: Fn(&mut NMLVFINDITEM<'_>) -> BoxResult<Option<u32>> + 'static,
pub fn lvn_od_find_item<F>(&self, func: F) where
F: Fn(&mut NMLVFINDITEM<'_>) -> BoxResult<Option<u32>> + 'static,
LVN_ODFINDITEM
notification.
Sent by a virtual list-view control when it needs the owner to find a
particular callback item. For example, the control will send this
notification code when it receives shortcut keyboard input or when it
receives an lvm::FindItem
message.
pub fn lvn_od_state_changed<F>(&self, func: F) where
F: Fn(&NMLVODSTATECHANGE) -> BoxResult<()> + 'static,
pub fn lvn_od_state_changed<F>(&self, func: F) where
F: Fn(&NMLVODSTATECHANGE) -> BoxResult<()> + 'static,
LVN_ODSTATECHANGED
notification.
Sent by a list-view control when the state of an item or range of items has changed.
pub fn lvn_set_disp_info<F>(&self, func: F) where
F: Fn(&NMLVDISPINFO<'_>) -> BoxResult<()> + 'static,
pub fn lvn_set_disp_info<F>(&self, func: F) where
F: Fn(&NMLVDISPINFO<'_>) -> BoxResult<()> + 'static,
LVN_SETDISPINFO
notification.
Notifies that you must update the information it maintains for an item.
NM_CLICK
notification.
Sent by a list-view control when the user clicks an item with the left mouse button.
pub fn nm_custom_draw<F>(&self, func: F) where
F: Fn(&NMLVCUSTOMDRAW) -> BoxResult<CDRF> + 'static,
pub fn nm_custom_draw<F>(&self, func: F) where
F: Fn(&NMLVCUSTOMDRAW) -> BoxResult<CDRF> + 'static,
NM_CUSTOMDRAW
notification.
Sent by a list-view control to notify about drawing operations.
NM_DBLCLK
notification.
Sent by a list-view control when the user double-clicks an item with the left mouse button.
NM_HOVER
notification.
Sent by a list-view control when the mouse hovers over an item.
NM_KILLFOCUS
notification.
Notifies that the control has lost the input focus.
NM_RCLICK
notification.
Sent by a list-view control when the user clicks an item with the right mouse button.
pub fn nm_r_dbl_clk<F>(&self, func: F) where
F: Fn(&NMITEMACTIVATE) -> BoxResult<()> + 'static,
pub fn nm_r_dbl_clk<F>(&self, func: F) where
F: Fn(&NMITEMACTIVATE) -> BoxResult<()> + 'static,
NM_RDBLCLK
notification.
Sent by a list-view control when the user double-clicks an item with the right mouse button.
NM_RELEASEDCAPTURE
notification.
Notifies that the control is releasing mouse capture.
NM_RETURN
notification.
Notifies that the control has the input focus and that the user has pressed the ENTER key.
NM_SETFOCUS
notification.
Notifies that the control has received the input focus.