pub(in crate::gui) fn process_one_message(&self,
		wm_any: WndMsg) -> ErrResult<ProcessResult>
	{
		Ok(match wm_any.msg_id {
			co::WM::NOTIFY => {
				let wm_nfy = wm::Notify::from_generic_wm(wm_any);
				let key = (wm_nfy.nmhdr.idFrom(), wm_nfy.nmhdr.code);
				match self.nfys.find(key) {
					Some(func) => { // we have a stored function to handle this WM_NOTIFY notification
						match func(wm_nfy)? { // execute user function
							Some(res) => ProcessResult::HandledWithRet(res), // meaningful return value
							None => ProcessResult::HandledWithoutRet,
						}
					},
					None => ProcessResult::NotHandled, // no stored WM_NOTIFY notification
				}
			},
			co::WM::COMMAND => {
				let wm_cmd = wm::Command::from_generic_wm(wm_any);
				let key = wm_cmd.event.code_id();
				match self.cmds.find(key) {
					Some(func) => { // we have a stored function to handle this WM_COMMAND notification
						func()?; // execute user function
						ProcessResult::HandledWithoutRet
					},
					None => ProcessResult::NotHandled, // no stored WM_COMMAND notification
				}
			},
			co::WM::TIMER => {
				let wm_tmr = wm::Timer::from_generic_wm(wm_any);
				match self.tmrs.find(wm_tmr.timer_id) {
					Some(func) => { // we have a stored function to handle this WM_TIMER message
						func()?; // execute user function
						ProcessResult::HandledWithoutRet
					},
					None => ProcessResult::NotHandled, // no stored WM_TIMER message
				}
			}
			_ => self.window_events.process_one_message(wm_any)?,
		})
	}
/// Searches for the last added user function for the given message, and
/// runs if it exists, returning the result.

Searches for the last added user function for the given message, and
runs if it exists, returning the result.
Searches for the last added user function for the given message and runs if it exists returning the result .
pub(in crate::gui) fn process_one_message(&self,
		wm_any: WndMsg) -> ErrResult<ProcessResult>
	{
		Ok(match wm_any.msg_id {
			co::WM::NOTIFY => {
				let wm_nfy = wm::Notify::from_generic_wm(wm_any);
				let key = (wm_nfy.nmhdr.idFrom(), wm_nfy.nmhdr.code);
				match self.nfys.find(key) {
					Some(func) => { // we have a stored function to handle this WM_NOTIFY notification
						match func(wm_nfy)? { // execute user function
							Some(res) => ProcessResult::HandledWithRet(res), // meaningful return value
							None => ProcessResult::HandledWithoutRet,
						}
					},
					None => ProcessResult::NotHandled, // no stored WM_NOTIFY notification
				}
			},
			co::WM::COMMAND => {
				let wm_cmd = wm::Command::from_generic_wm(wm_any);
				let key = wm_cmd.event.code_id();
				match self.cmds.find(key) {
					Some(func) => { // we have a stored function to handle this WM_COMMAND notification
						func()?; // execute user function
						ProcessResult::HandledWithoutRet
					},
					None => ProcessResult::NotHandled, // no stored WM_COMMAND notification
				}
			},
			co::WM::TIMER => {
				let wm_tmr = wm::Timer::from_generic_wm(wm_any);
				match self.tmrs.find(wm_tmr.timer_id) {
					Some(func) => { // we have a stored function to handle this WM_TIMER message
						func()?; // execute user function
						ProcessResult::HandledWithoutRet
					},
					None => ProcessResult::NotHandled, // no stored WM_TIMER message
				}
			}
			_ => self.window_events.process_one_message(wm_any)?,
		})
	}
pub ( in crate :: gui ) fn process_one_message ( & self , wm_any : WndMsg ) -> ErrResult < ProcessResult > { Ok ( match wm_any . msg_id { co :: WM :: NOTIFY => { let wm_nfy = wm :: Notify :: from_generic_wm ( wm_any ) ; let key = ( wm_nfy . nmhdr . idFrom ( ) , wm_nfy . nmhdr . code ) ; match self . nfys . find ( key ) { Some ( func ) => { // we have a stored function to handle this WM_NOTIFY notification
 match func ( wm_nfy ) ? { // execute user function
 Some ( res ) => ProcessResult :: HandledWithRet ( res ) , // meaningful return value
 None => ProcessResult :: HandledWithoutRet , } } , None => ProcessResult :: NotHandled , // no stored WM_NOTIFY notification
 } } , co :: WM :: COMMAND => { let wm_cmd = wm :: Command :: from_generic_wm ( wm_any ) ; let key = wm_cmd . event . code_id ( ) ; match self . cmds . find ( key ) { Some ( func ) => { // we have a stored function to handle this WM_COMMAND notification
 func ( ) ? ; // execute user function
 ProcessResult :: HandledWithoutRet } , None => ProcessResult :: NotHandled , // no stored WM_COMMAND notification
 } } , co :: WM :: TIMER => { let wm_tmr = wm :: Timer :: from_generic_wm ( wm_any ) ; match self . tmrs . find ( wm_tmr . timer_id ) { Some ( func ) => { // we have a stored function to handle this WM_TIMER message
 func ( ) ? ; // execute user function
 ProcessResult :: HandledWithoutRet } , None => ProcessResult :: NotHandled , // no stored WM_TIMER message
 } } _ => self . window_events . process_one_message ( wm_any ) ? , } ) }
Searches for the last added user function for the given message, and
runs if it exists, returning the result.
Searches for the last added user function for the given message and runs if it exists returning the result .
&self
wm_any
WndMsg
&self
wm_any
WndMsg