]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stc/ScintillaWX.cpp
fixed fl makefiles that Julian didn't fix correctly
[wxWidgets.git] / src / stc / ScintillaWX.cpp
index 9f19ebbca99f2b8180b8aa747c05535b0bbc8cc8..30a896b9038e23101c679210c62bbc41d09b5269 100644 (file)
@@ -95,6 +95,7 @@ ScintillaWX::ScintillaWX(wxStyledTextCtrl* win) {
     wMain = win;
     wDraw = win;
     stc   = win;
+    wheelRotation = 0;
     Initialise();
 }
 
@@ -363,6 +364,22 @@ void ScintillaWX::DoVScroll(int type, int pos) {
     ScrollTo(topLineNew);
 }
 
+
+void ScintillaWX::DoMouseWheel(int rotation, int delta, int linesPerAction) {
+    int topLineNew = topLine;
+    int lines;
+
+    wheelRotation += rotation;
+    lines = wheelRotation / delta;
+    wheelRotation -= lines * delta;
+    if (lines != 0) {
+        lines *= linesPerAction;
+        topLineNew -= lines;
+        ScrollTo(topLineNew);
+    }
+}
+
+
 void ScintillaWX::DoSize(int width, int height) {
     PRectangle rcClient(0,0,width,height);
     SetScrollBarsTo(rcClient);
@@ -473,13 +490,16 @@ void ScintillaWX::DoDragLeave() {
 // Redraw all of text area. This paint will not be abandoned.
 void ScintillaWX::FullPaint() {
     paintState = painting;
-//      rcPaint = GetTextRectangle();
-//      wxClientDC dc(wMain.GetID());
-//      Surface surfaceWindow;
-//      surfaceWindow.Init(&dc);
-//      Paint(&surfaceWindow, rcPaint);
-//      surfaceWindow.Release();
-    wMain.GetID()->Refresh(FALSE);
+    rcPaint = GetTextRectangle();
+    paintingAllText = true;
+    wxClientDC dc(wMain.GetID());
+    Surface surfaceWindow;
+    surfaceWindow.Init(&dc);
+    Paint(&surfaceWindow, rcPaint);
+    surfaceWindow.Release();
+
+//     wMain.GetID()->Refresh(FALSE);
+
     paintState = notPainting;
 }