void AttentionBar::OnAction(wxCommandEvent& event) { ActionsMap::const_iterator i = m_actions.find(event.GetEventObject()); if ( i == m_actions.end() ) { event.Skip(); return; } HideMessage(); i->second(); }
void AttentionBar::OnAction(wxCommandEvent& event) { ActionsMap::const_iterator i = m_actions.find(event.GetEventObject()); if ( i == m_actions.end() ) { event.Skip(); return; } // first perform the action... i->second(); // ...then hide the message HideMessage(); }
void AttentionBar::OnAction(wxCommandEvent& event) { ActionsMap::const_iterator i = m_actions.find(event.GetEventObject()); if ( i == m_actions.end() ) { event.Skip(); return; } // first perform the action... AttentionMessage::ActionInfo info; info.checkbox = m_checkbox->IsShown() && m_checkbox->IsChecked(); i->second(info); // ...then hide the message HideMessage(); }