]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stc/stc.cpp.in
updated setup.h for OpenVMS
[wxWidgets.git] / src / stc / stc.cpp.in
index 10ceabad07057ed48f0bbae89a9a0f77c01a2e8a..0313d2dae2bf0e1b8b947aa30d2040572aa0e122 100644 (file)
@@ -126,6 +126,7 @@ wxDEFINE_EVENT( wxEVT_STC_INDICATOR_CLICK, wxStyledTextEvent );
 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 );
 
 
 
@@ -199,7 +200,6 @@ bool wxStyledTextCtrl::Create(wxWindow *parent,
     m_swx = new ScintillaWX(this);
     m_stopWatch.Start();
     m_lastKeyDownConsumed = false;
-    m_timeToBlockWheelEventsUntil = 0;
     m_vScrollBar = NULL;
     m_hScrollBar = NULL;
 #if wxUSE_UNICODE
@@ -762,25 +762,11 @@ void wxStyledTextCtrl::OnContextMenu(wxContextMenuEvent& evt) {
 
 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());
 }
 
 
@@ -945,10 +931,12 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) {
 
     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:
@@ -960,6 +948,8 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) {
         evt.SetLine(scn.line);
         evt.SetFoldLevelNow(scn.foldLevelNow);
         evt.SetFoldLevelPrev(scn.foldLevelPrev);
+        evt.SetToken(scn.token);
+        evt.SetAnnotationLinesAdded(scn.annotationLinesAdded);
         break;
 
     case SCN_MACRORECORD:
@@ -1046,6 +1036,10 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) {
         evt.SetEventType(wxEVT_STC_AUTOCOMP_CHAR_DELETED);
         break;
 
+    case SCN_HOTSPOTRELEASECLICK:
+        evt.SetEventType(wxEVT_STC_HOTSPOT_RELEASE_CLICK);
+        break;
+
     default:
         return;
     }
@@ -1077,6 +1071,10 @@ wxStyledTextEvent::wxStyledTextEvent(wxEventType commandType, int id)
     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;
@@ -1112,6 +1110,10 @@ wxStyledTextEvent::wxStyledTextEvent(const wxStyledTextEvent& event):
     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;
@@ -1124,7 +1126,7 @@ wxStyledTextEvent::wxStyledTextEvent(const wxStyledTextEvent& event):
 
 /*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