aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx18
-rw-r--r--src/Editor.h8
-rw-r--r--src/ScintillaBase.cxx6
3 files changed, 15 insertions, 17 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index dc5c03622..e79d43e6f 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -1,6 +1,6 @@
// Scintilla source code edit control
// Editor.cxx - main code for the edit control
-// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
+// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <stdlib.h>
@@ -168,7 +168,7 @@ void Editor::RefreshStyleData() {
}
PRectangle Editor::GetClientRectangle() {
- return wDraw.GetClientPosition();
+ return wMain.GetClientPosition();
}
PRectangle Editor::GetTextRectangle() {
@@ -310,7 +310,7 @@ int Editor::PositionFromLineX(int line, int x) {
}
void Editor::RedrawRect(PRectangle rc) {
- //Platform::DebugPrintf("Redraw %d %d - %d %d\n", rc.left, rc.top, rc.right, rc.bottom);
+ //Platform::DebugPrintf("Redraw %0d,%0d - %0d,%0d\n", rc.left, rc.top, rc.right, rc.bottom);
// Clip the redraw rectangle into the client area
PRectangle rcClient = GetClientRectangle();
@@ -324,13 +324,13 @@ void Editor::RedrawRect(PRectangle rc) {
rc.right = rcClient.right;
if ((rc.bottom > rc.top) && (rc.right > rc.left)) {
- wDraw.InvalidateRectangle(rc);
+ wMain.InvalidateRectangle(rc);
}
}
void Editor::Redraw() {
//Platform::DebugPrintf("Redraw all\n");
- wDraw.InvalidateAll();
+ wMain.InvalidateAll();
}
void Editor::RedrawSelMargin() {
@@ -339,7 +339,7 @@ void Editor::RedrawSelMargin() {
} else {
PRectangle rcSelMargin = GetClientRectangle();
rcSelMargin.right = vs.fixedColumnWidth;
- wDraw.InvalidateRectangle(rcSelMargin);
+ wMain.InvalidateRectangle(rcSelMargin);
}
}
@@ -549,7 +549,7 @@ void Editor::HorizontalScrollTo(int xPos) {
if (xOffset < 0)
xOffset = 0;
SetHorizontalScrollPos();
- Redraw();
+ RedrawRect(GetClientRectangle());
}
void Editor::MoveCaretInsideView() {
@@ -2563,9 +2563,9 @@ void Editor::SetDragPosition(int newPos) {
void Editor::DisplayCursor(Window::Cursor c) {
if (cursorMode == SC_CURSORNORMAL)
- wDraw.SetCursor(c);
+ wMain.SetCursor(c);
else
- wDraw.SetCursor(static_cast<Window::Cursor>(cursorMode));
+ wMain.SetCursor(static_cast<Window::Cursor>(cursorMode));
}
void Editor::StartDrag() {
diff --git a/src/Editor.h b/src/Editor.h
index 52b3d7037..0a37c8b8f 100644
--- a/src/Editor.h
+++ b/src/Editor.h
@@ -1,6 +1,6 @@
// Scintilla source code edit control
// Editor.h - defines the main editor class
-// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
+// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef EDITOR_H
@@ -48,11 +48,9 @@ class Editor : public DocWatcher {
Editor &operator=(const Editor &) { return *this; }
protected: // ScintillaBase subclass needs access to much of Editor
- // On GTK+, Scintilla is a container widget holding two scroll bars and a drawing area
+ // On GTK+, Scintilla is a container widget holding two scroll bars
// whereas on Windows there is just one window with both scroll bars turned on.
- // Therefore, on GTK+ the following are separate windows but only one window on Windows.
Window wMain; // The Scintilla parent window
- Window wDraw; // The text drawing area
// Style resources may be expensive to allocate so are cached between uses.
// When a style attribute is changed, this cache is flushed.
@@ -161,7 +159,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
void RefreshStyleData();
void DropGraphics();
- PRectangle GetClientRectangle();
+ virtual PRectangle GetClientRectangle();
PRectangle GetTextRectangle();
int LinesOnScreen();
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx
index 703d6e534..ccb9dcf53 100644
--- a/src/ScintillaBase.cxx
+++ b/src/ScintillaBase.cxx
@@ -1,6 +1,6 @@
// Scintilla source code edit control
// ScintillaBase.cxx - an enhanced subclass of Editor with calltips, autocomplete and context menu
-// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
+// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <stdlib.h>
@@ -187,7 +187,7 @@ void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) {
return;
}
}
- ac.Start(wDraw, idAutoComplete, currentPos, lenEntered);
+ ac.Start(wMain, idAutoComplete, currentPos, lenEntered);
PRectangle rcClient = GetClientRectangle();
Point pt = LocationFromPosition(currentPos-lenEntered);
@@ -448,7 +448,7 @@ long ScintillaBase::WndProc(unsigned int iMessage, unsigned long wParam, long lP
}
// Now display the window.
CreateCallTipWindow(rc);
- ct.wCallTip.SetPositionRelative(rc, wDraw);
+ ct.wCallTip.SetPositionRelative(rc, wMain);
ct.wCallTip.Show();
}
}