pub struct WindowEventsAll { /* private fields */ }
Available on crate feature gui only.
Expand description

Exposes window messages, plus timer and native control notifications.

You cannot directly instantiate this object, it is created internally by the window.

Trait Implementations§

source§

impl GuiEvents for WindowEventsAll

source§

fn wm<F>(&self, ident: WM, func: F)
where F: Fn(WndMsg) -> AnyResult<Option<isize>> + 'static,

source§

fn wm_activate<F>(&self, func: F)
where F: Fn(Activate) -> AnyResult<()> + 'static,

WM_ACTIVATE message.
source§

fn wm_activate_app<F>(&self, func: F)
where F: Fn(ActivateApp) -> AnyResult<()> + 'static,

source§

fn wm_app_command<F>(&self, func: F)
where F: Fn(AppCommand) -> AnyResult<()> + 'static,

WM_APPCOMMAND message.
source§

fn wm_cancel_mode<F>(&self, func: F)
where F: Fn() -> AnyResult<()> + 'static,

WM_CANCELMODE message.
source§

fn wm_capture_changed<F>(&self, func: F)
where F: Fn(CaptureChanged) -> AnyResult<()> + 'static,

source§

fn wm_char<F>(&self, func: F)
where F: Fn(Char) -> AnyResult<()> + 'static,

WM_CHAR message.
source§

fn wm_child_activate<F>(&self, func: F)
where F: Fn() -> AnyResult<()> + 'static,

source§

fn wm_close<F>(&self, func: F)
where F: Fn() -> AnyResult<()> + 'static,

source§

fn wm_context_menu<F>(&self, func: F)
where F: Fn() -> AnyResult<()> + 'static,

source§

fn wm_ctl_color_btn<F>(&self, func: F)
where F: Fn(CtlColorBtn) -> AnyResult<HBRUSH> + 'static,

source§

fn wm_ctl_color_dlg<F>(&self, func: F)
where F: Fn(CtlColorDlg) -> AnyResult<HBRUSH> + 'static,

source§

fn wm_ctl_color_edit<F>(&self, func: F)
where F: Fn(CtlColorEdit) -> AnyResult<HBRUSH> + 'static,

source§

fn wm_ctl_color_list_box<F>(&self, func: F)
where F: Fn(CtlColorListBox) -> AnyResult<HBRUSH> + 'static,

source§

fn wm_ctl_color_scroll_bar<F>(&self, func: F)
where F: Fn(CtlColorScrollBar) -> AnyResult<HBRUSH> + 'static,

source§

fn wm_ctl_color_static<F>(&self, func: F)
where F: Fn(CtlColorStatic) -> AnyResult<HBRUSH> + 'static,

source§

fn wm_dead_char<F>(&self, func: F)
where F: Fn(DeadChar) -> AnyResult<()> + 'static,

WM_DEADCHAR message.
source§

fn wm_delete_item<F>(&self, func: F)
where F: Fn(DeleteItem<'_>) -> AnyResult<bool> + 'static,

WM_DELETEITEM message.
source§

fn wm_destroy<F>(&self, func: F)
where F: Fn() -> AnyResult<()> + 'static,

source§

fn wm_device_change<F>(&self, func: F)
where F: Fn(DeviceChange<'_>) -> AnyResult<()> + 'static,

source§

fn wm_display_change<F>(&self, func: F)
where F: Fn(DisplayChange) -> AnyResult<()> + 'static,

source§

fn wm_drop_files<F>(&self, func: F)
where F: Fn(DropFiles) -> AnyResult<()> + 'static,

source§

fn wm_enable<F>(&self, func: F)
where F: Fn(Enable) -> AnyResult<()> + 'static,

WM_ENABLE message.
source§

fn wm_end_session<F>(&self, func: F)
where F: Fn(EndSession) -> AnyResult<()> + 'static,

WM_ENDSESSION message.
source§

fn wm_enter_idle<F>(&self, func: F)
where F: Fn(EnterIdle) -> AnyResult<()> + 'static,

WM_ENTERIDLE message.
source§

fn wm_enter_menu_loop<F>(&self, func: F)
where F: Fn(EnterMenuLoop) -> AnyResult<()> + 'static,

source§

fn wm_enter_size_move<F>(&self, func: F)
where F: Fn() -> AnyResult<()> + 'static,

source§

fn wm_erase_bkgnd<F>(&self, func: F)
where F: Fn(EraseBkgnd) -> AnyResult<i32> + 'static,

WM_ERASEBKGND message.
source§

fn wm_exit_menu_loop<F>(&self, func: F)
where F: Fn(ExitMenuLoop) -> AnyResult<()> + 'static,

source§

fn wm_exit_size_move<F>(&self, func: F)
where F: Fn() -> AnyResult<()> + 'static,

source§

fn wm_get_dlg_code<F>(&self, func: F)
where F: Fn(GetDlgCode<'_>) -> AnyResult<DLGC> + 'static,

WM_GETDLGCODE message.
source§

fn wm_get_font<F>(&self, func: F)
where F: Fn() -> AnyResult<Option<HFONT>> + 'static,

WM_GETFONT message.
source§

fn wm_get_hmenu<F>(&self, func: F)
where F: Fn() -> AnyResult<Option<HMENU>> + 'static,

WM_GETHMENU message. Originally has MN prefix.
source§

fn wm_get_min_max_info<F>(&self, func: F)
where F: Fn(GetMinMaxInfo<'_>) -> AnyResult<()> + 'static,

source§

fn wm_get_text<F>(&self, func: F)
where F: Fn(GetText<'_>) -> AnyResult<u32> + 'static,

WM_GETTEXT message.
source§

fn wm_get_text_length<F>(&self, func: F)
where F: Fn() -> AnyResult<u32> + 'static,

source§

fn wm_get_title_bar_info_ex<F>(&self, func: F)
where F: Fn(GetTitleBarInfoEx<'_>) -> AnyResult<()> + 'static,

source§

fn wm_h_scroll<F>(&self, func: F)
where F: Fn(HScroll) -> AnyResult<()> + 'static,

WM_HSCROLL message.
source§

fn wm_help<F>(&self, func: F)
where F: Fn(Help<'_>) -> AnyResult<()> + 'static,

WM_HELP message.
source§

fn wm_init_menu_popup<F>(&self, func: F)
where F: Fn(InitMenuPopup) -> AnyResult<()> + 'static,

source§

fn wm_key_down<F>(&self, func: F)
where F: Fn(KeyDown) -> AnyResult<()> + 'static,

WM_KEYDOWN message.
source§

fn wm_key_up<F>(&self, func: F)
where F: Fn(KeyUp) -> AnyResult<()> + 'static,

WM_KEYUP message.
source§

fn wm_kill_focus<F>(&self, func: F)
where F: Fn(KillFocus) -> AnyResult<()> + 'static,

WM_KILLFOCUS message.
source§

fn wm_l_button_dbl_clk<F>(&self, func: F)
where F: Fn(LButtonDblClk) -> AnyResult<()> + 'static,

source§

fn wm_l_button_down<F>(&self, func: F)
where F: Fn(LButtonDown) -> AnyResult<()> + 'static,

source§

fn wm_l_button_up<F>(&self, func: F)
where F: Fn(LButtonUp) -> AnyResult<()> + 'static,

WM_LBUTTONUP message.
source§

fn wm_m_button_dbl_clk<F>(&self, func: F)
where F: Fn(MButtonDblClk) -> AnyResult<()> + 'static,

source§

fn wm_m_button_down<F>(&self, func: F)
where F: Fn(MButtonDown) -> AnyResult<()> + 'static,

source§

fn wm_m_button_up<F>(&self, func: F)
where F: Fn(MButtonUp) -> AnyResult<()> + 'static,

WM_MBUTTONUP message.
source§

fn wm_menu_command<F>(&self, func: F)
where F: Fn(MenuCommand) -> AnyResult<()> + 'static,

source§

fn wm_menu_drag<F>(&self, func: F)
where F: Fn(MenuDrag) -> AnyResult<MND> + 'static,

WM_MENUDRAG message.
source§

fn wm_menu_r_button_up<F>(&self, func: F)
where F: Fn(MenuRButtonUp) -> AnyResult<()> + 'static,

source§

fn wm_mouse_hover<F>(&self, func: F)
where F: Fn(MouseHover) -> AnyResult<()> + 'static,

WM_MOUSEHOVER message.
source§

fn wm_mouse_leave<F>(&self, func: F)
where F: Fn() -> AnyResult<()> + 'static,

WM_MOUSELEAVE message.
source§

fn wm_mouse_move<F>(&self, func: F)
where F: Fn(MouseMove) -> AnyResult<()> + 'static,

WM_MOUSEMOVE message.
source§

fn wm_move<F>(&self, func: F)
where F: Fn(Move) -> AnyResult<()> + 'static,

WM_MOVE message.
source§

fn wm_moving<F>(&self, func: F)
where F: Fn(Moving<'_>) -> AnyResult<()> + 'static,

WM_MOVING message.
source§

fn wm_nc_calc_size<F>(&self, func: F)
where F: Fn(NcCalcSize<'_, '_>) -> AnyResult<WVR> + 'static,

WM_NCCALCSIZE message.
source§

fn wm_nc_create<F>(&self, func: F)
where F: Fn(NcCreate<'_, '_, '_>) -> AnyResult<bool> + 'static,

WM_NCCREATE message.
source§

fn wm_nc_destroy<F>(&self, func: F)
where F: Fn() -> AnyResult<()> + 'static,

source§

fn wm_nc_hit_test<F>(&self, func: F)
where F: Fn(NcHitTest) -> AnyResult<HT> + 'static,

WM_NCHITTEST message.
source§

fn wm_nc_paint<F>(&self, func: F)
where F: Fn(NcPaint) -> AnyResult<()> + 'static,

WM_NCPAINT message.
source§

fn wm_next_dlg_ctl<F>(&self, func: F)
where F: Fn(NextDlgCtl) -> AnyResult<()> + 'static,

WM_NEXTDLGCTL message.
source§

fn wm_null<F>(&self, func: F)
where F: Fn() -> AnyResult<()> + 'static,

WM_NULL message.
source§

fn wm_paint<F>(&self, func: F)
where F: Fn() -> AnyResult<()> + 'static,

source§

fn wm_parent_notify<F>(&self, func: F)
where F: Fn(ParentNotify) -> AnyResult<()> + 'static,

source§

fn wm_power_broadcast<F>(&self, func: F)
where F: Fn(PowerBroadcast<'_>) -> AnyResult<()> + 'static,

source§

fn wm_query_open<F>(&self, func: F)
where F: Fn() -> AnyResult<bool> + 'static,

WM_QUERYOPEN message.
source§

fn wm_r_button_dbl_clk<F>(&self, func: F)
where F: Fn(RButtonDblClk) -> AnyResult<()> + 'static,

source§

fn wm_r_button_down<F>(&self, func: F)
where F: Fn(RButtonDown) -> AnyResult<()> + 'static,

source§

fn wm_r_button_up<F>(&self, func: F)
where F: Fn(RButtonUp) -> AnyResult<()> + 'static,

source§

fn wm_set_cursor<F>(&self, func: F)
where F: Fn(SetCursor) -> AnyResult<bool> + 'static,

WM_SETCURSOR message.
source§

fn wm_set_focus<F>(&self, func: F)
where F: Fn(SetFocus) -> AnyResult<()> + 'static,

WM_SETFOCUS message.
source§

fn wm_set_font<F>(&self, func: F)
where F: Fn(SetFont) -> AnyResult<()> + 'static,

WM_SETFONT message.
source§

fn wm_set_icon<F>(&self, func: F)
where F: Fn(SetIcon) -> AnyResult<Option<HICON>> + 'static,

WM_SETICON message.
source§

fn wm_set_redraw<F>(&self, func: F)
where F: Fn(SetRedraw) -> AnyResult<()> + 'static,

WM_SETREDRAW message.
source§

fn wm_set_text<F>(&self, func: F)
where F: Fn(SetText) -> AnyResult<bool> + 'static,

WM_SETTEXT message.
source§

fn wm_show_window<F>(&self, func: F)
where F: Fn(ShowWindow) -> AnyResult<()> + 'static,

WM_SHOWWINDOW message.
source§

fn wm_size<F>(&self, func: F)
where F: Fn(Size) -> AnyResult<()> + 'static,

source§

fn wm_sizing<F>(&self, func: F)
where F: Fn(Sizing<'_>) -> AnyResult<()> + 'static,

WM_SIZING message.
source§

fn wm_style_changed<F>(&self, func: F)
where F: Fn(StyleChanged<'_>) -> AnyResult<()> + 'static,

source§

fn wm_style_changing<F>(&self, func: F)
where F: Fn(StyleChanging<'_>) -> AnyResult<()> + 'static,

source§

fn wm_sync_paint<F>(&self, func: F)
where F: Fn() -> AnyResult<()> + 'static,

WM_SYNCPAINT message.
source§

fn wm_sys_char<F>(&self, func: F)
where F: Fn(SysChar) -> AnyResult<()> + 'static,

WM_SYSCHAR message.
source§

fn wm_sys_command<F>(&self, func: F)
where F: Fn(SysCommand) -> AnyResult<()> + 'static,

WM_SYSCOMMAND message.
source§

fn wm_sys_dead_char<F>(&self, func: F)
where F: Fn(SysDeadChar) -> AnyResult<()> + 'static,

source§

fn wm_sys_key_down<F>(&self, func: F)
where F: Fn(SysKeyDown) -> AnyResult<()> + 'static,

WM_SYSKEYDOWN message.
source§

fn wm_sys_key_up<F>(&self, func: F)
where F: Fn(SysKeyUp) -> AnyResult<()> + 'static,

WM_SYSKEYUP message.
source§

fn wm_theme_changed<F>(&self, func: F)
where F: Fn() -> AnyResult<()> + 'static,

source§

fn wm_uninit_menu_popup<F>(&self, func: F)
where F: Fn(UninitMenuPopup) -> AnyResult<()> + 'static,

source§

fn wm_undo<F>(&self, func: F)
where F: Fn() -> AnyResult<bool> + 'static,

WM_UNDO message.
source§

fn wm_v_scroll<F>(&self, func: F)
where F: Fn(VScroll) -> AnyResult<()> + 'static,

WM_VSCROLL message.
source§

fn wm_window_pos_changed<F>(&self, func: F)
where F: Fn(WindowPosChanged<'_>) -> AnyResult<()> + 'static,

source§

fn wm_window_pos_changing<F>(&self, func: F)
where F: Fn(WindowPosChanging<'_>) -> AnyResult<()> + 'static,

source§

fn wm_wts_session_change<F>(&self, func: F)
where F: Fn(WtsSessionChange) -> AnyResult<()> + 'static,

source§

fn wm_x_button_dbl_clk<F>(&self, func: F)
where F: Fn(XButtonDblClk) -> AnyResult<()> + 'static,

source§

fn wm_x_button_down<F>(&self, func: F)
where F: Fn(XButtonDown) -> AnyResult<()> + 'static,

source§

fn wm_x_button_up<F>(&self, func: F)
where F: Fn(XButtonUp) -> AnyResult<()> + 'static,

WM_XBUTTONUP message.
source§

impl GuiEventsAll for WindowEventsAll

source§

fn wm_timer<F>(&self, timer_id: usize, func: F)
where F: Fn() -> AnyResult<()> + 'static,

WM_TIMER message, narrowed to a specific timer ID.
source§

fn wm_command<F>(&self, code: impl Into<CMD>, ctrl_id: u16, func: F)
where F: Fn() -> AnyResult<()> + 'static,

WM_COMMAND message, for specific code and control ID. Read more
source§

fn wm_notify<F>(&self, id_from: u16, code: impl Into<NM>, func: F)
where F: Fn(Notify<'_>) -> AnyResult<Option<isize>> + 'static,

WM_NOTIFY message, for specific ID and notification code. Read more
source§

fn wm_create<F>(&self, func: F)
where F: Fn(Create<'_, '_, '_>) -> AnyResult<i32> + 'static,

WM_CREATE message, sent only to non-dialog windows. Dialog windows receive WM_INITDIALOG instead. Read more
source§

fn wm_init_dialog<F>(&self, func: F)
where F: Fn(InitDialog) -> AnyResult<bool> + 'static,

WM_INITDIALOG message, sent only to dialog windows. Non-dialog windows receive WM_CREATE instead. Read more
source§

fn wm_command_accel_menu<F>(&self, ctrl_id: u16, func: F)
where F: Fn() -> AnyResult<()> + 'static,

WM_COMMAND message, handling both CMD::Accelerator and CMD::Menu, for a specific command ID. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.