wxDEFINE_EVENT( wxEVT_STC_INDICATOR_RELEASE, wxStyledTextEvent );
wxDEFINE_EVENT( wxEVT_STC_AUTOCOMP_CANCELLED, wxStyledTextEvent );
wxDEFINE_EVENT( wxEVT_STC_AUTOCOMP_CHAR_DELETED, wxStyledTextEvent );
+wxDEFINE_EVENT( wxEVT_STC_HOTSPOT_RELEASE_CLICK, wxStyledTextEvent );
m_swx = new ScintillaWX(this);
m_stopWatch.Start();
m_lastKeyDownConsumed = false;
- m_timeToBlockWheelEventsUntil = 0;
m_vScrollBar = NULL;
m_hScrollBar = NULL;
#if wxUSE_UNICODE
void wxStyledTextCtrl::OnMouseWheel(wxMouseEvent& evt)
{
- // Prevent having an event queue with wheel events that cannot be processed
- // reasonably fast (see ticket #9057) by ignoring all of them that happen
- // during the time interval corresponding to the time it took us to handle
- // the last one.
- //
- // Notice the use of TimeInMicro() instead of Time() to avoid overflow in
- // long running programs.
- if ( m_timeToBlockWheelEventsUntil <= m_stopWatch.TimeInMicro() )
- {
- const wxLongLong beforeMouseWheel = m_stopWatch.TimeInMicro();
- m_swx->DoMouseWheel(evt.GetWheelRotation(),
- evt.GetWheelDelta(),
- evt.GetLinesPerAction(),
- evt.ControlDown(),
- evt.IsPageScroll());
- const wxLongLong afterMouseWheel = m_stopWatch.TimeInMicro();
- m_timeToBlockWheelEventsUntil = afterMouseWheel;
- m_timeToBlockWheelEventsUntil += afterMouseWheel - beforeMouseWheel;
- }
+ m_swx->DoMouseWheel(evt.GetWheelRotation(),
+ evt.GetWheelDelta(),
+ evt.GetLinesPerAction(),
+ evt.ControlDown(),
+ evt.IsPageScroll());
}
case SCN_DOUBLECLICK:
evt.SetEventType(wxEVT_STC_DOUBLECLICK);
+ evt.SetLine(scn.line);
break;
case SCN_UPDATEUI:
evt.SetEventType(wxEVT_STC_UPDATEUI);
+ evt.SetUpdated(scn.updated);
break;
case SCN_MODIFIED:
evt.SetLine(scn.line);
evt.SetFoldLevelNow(scn.foldLevelNow);
evt.SetFoldLevelPrev(scn.foldLevelPrev);
+ evt.SetToken(scn.token);
+ evt.SetAnnotationLinesAdded(scn.annotationLinesAdded);
break;
case SCN_MACRORECORD:
evt.SetEventType(wxEVT_STC_AUTOCOMP_CHAR_DELETED);
break;
+ case SCN_HOTSPOTRELEASECLICK:
+ evt.SetEventType(wxEVT_STC_HOTSPOT_RELEASE_CLICK);
+ break;
+
default:
return;
}
m_listType = 0;
m_x = 0;
m_y = 0;
+ m_token = 0;
+ m_annotationLinesAdded = 0;
+ m_updated = 0;
+
#if wxUSE_DRAG_AND_DROP
m_dragFlags = wxDrag_CopyOnly;
m_dragResult = wxDragNone;
m_x = event.m_x;
m_y = event.m_y;
+ m_token = event.m_token;
+ m_annotationLinesAdded = event.m_annotationLinesAdded;
+ m_updated = event.m_updated;
+
#if wxUSE_DRAG_AND_DROP
m_dragText = event.m_dragText;
m_dragFlags = event.m_dragFlags;
/*static*/ wxVersionInfo wxStyledTextCtrl::GetLibraryVersionInfo()
{
- return wxVersionInfo("Scintilla", 2, 3, 0, "Scintilla 2.03");
+ return wxVersionInfo("Scintilla", 3, 21, 0, "Scintilla 3.21");
}
#endif // wxUSE_STC