wMain = win;
wDraw = win;
stc = win;
+ wheelRotation = 0;
Initialise();
}
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);
// 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;
}