Process a UI event.
(&mut self, view: &impl View, event: &Event)
| 321 | |
| 322 | /// Process a UI event. |
| 323 | pub fn process(&mut self, view: &impl View, event: &Event) { |
| 324 | let mut actions = vec![]; |
| 325 | let mut path = vec![0]; |
| 326 | view.process( |
| 327 | &event.offset(-self.root_offset), |
| 328 | &mut path, |
| 329 | self, |
| 330 | &mut actions, |
| 331 | ); |
| 332 | |
| 333 | for action in actions { |
| 334 | if !action.is::<()>() { |
| 335 | log::debug!("unhandled action: {:?}", (*action).type_id()); |
| 336 | } |
| 337 | } |
| 338 | } |
| 339 | |
| 340 | /// Get menu commands. |
| 341 | pub fn commands(&mut self, view: &impl View, cmds: &mut Vec<CommandInfo>) { |