Handle EVT_CONTEXT_MENU directly in wxSTC (wxGTK)
A simulation of context menu event by handling directly EVT_RIGHT_UP was implemented in wxSTC inddf2da08b5
, but later on, EVT_CONTEXT_MENU generation in wxGTK was fixed inac103441d1
so simulation is no longer necessary and this event can be directly handled in wxSTC.
This commit is contained in:
parent
c8cb673aa2
commit
6861a15607
@ -151,7 +151,7 @@ wxBEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
|
||||
EVT_LEFT_DCLICK (wxStyledTextCtrl::OnMouseLeftDown)
|
||||
EVT_MOTION (wxStyledTextCtrl::OnMouseMove)
|
||||
EVT_LEFT_UP (wxStyledTextCtrl::OnMouseLeftUp)
|
||||
#if defined(__WXGTK__) || defined(__WXMAC__)
|
||||
#if defined(__WXMAC__)
|
||||
EVT_RIGHT_UP (wxStyledTextCtrl::OnMouseRightUp)
|
||||
#else
|
||||
EVT_CONTEXT_MENU (wxStyledTextCtrl::OnContextMenu)
|
||||
@ -5210,7 +5210,7 @@ void wxStyledTextCtrl::OnMouseRightDown(wxMouseEvent& evt) {
|
||||
m_swx->DoRightButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(),
|
||||
evt.ShiftDown(), evt.ControlDown(), evt.AltDown());
|
||||
// we need to call evt.Skip() to ensure the context menu event
|
||||
// is generated with wxGTK and wxOSX
|
||||
// is generated with wxOSX
|
||||
evt.Skip();
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,7 @@ wxBEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
|
||||
EVT_LEFT_DCLICK (wxStyledTextCtrl::OnMouseLeftDown)
|
||||
EVT_MOTION (wxStyledTextCtrl::OnMouseMove)
|
||||
EVT_LEFT_UP (wxStyledTextCtrl::OnMouseLeftUp)
|
||||
#if defined(__WXGTK__) || defined(__WXMAC__)
|
||||
#if defined(__WXMAC__)
|
||||
EVT_RIGHT_UP (wxStyledTextCtrl::OnMouseRightUp)
|
||||
#else
|
||||
EVT_CONTEXT_MENU (wxStyledTextCtrl::OnContextMenu)
|
||||
@ -725,7 +725,7 @@ void wxStyledTextCtrl::OnMouseRightDown(wxMouseEvent& evt) {
|
||||
m_swx->DoRightButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(),
|
||||
evt.ShiftDown(), evt.ControlDown(), evt.AltDown());
|
||||
// we need to call evt.Skip() to ensure the context menu event
|
||||
// is generated with wxGTK and wxOSX
|
||||
// is generated with wxOSX
|
||||
evt.Skip();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user