// A popup view only does one thing: open the popup on Enter.
A popup view only does one thing: open the popup on Enter.
A popup view only does one thing : open the popup on Enter .
fn on_event_popup(&mut self, event: Event) -> EventResult {
        match event {
            // TODO: add Left/Right support for quick-switch?
            Event::Key(Key::Enter) => self.open_popup(),
            Event::Mouse {
                event: MouseEvent::Release(MouseButton::Left),
                position,
                offset,
            }
                if position.fits_in_rect(offset, self.last_size) =>
            {
                self.open_popup()
            }
            _ => EventResult::Ignored,
        }
    }
fn on_event_popup ( & mut self , event : Event ) -> EventResult { match event { // TODO: add Left/Right support for quick-switch? Event :: Key ( Key :: Enter ) => self . open_popup ( ) , Event :: Mouse { event : MouseEvent :: Release ( MouseButton :: Left ) , position , offset , } if position . fits_in_rect ( offset , self . last_size ) => { self . open_popup ( ) } _ => EventResult :: Ignored , } }
A popup view only does one thing: open the popup on Enter.
A popup view only does one thing : open the popup on Enter .
&mut self
event
Event