aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-07-08 13:08:02 +1000
committerNeil <nyamatongwe@gmail.com>2014-07-08 13:08:02 +1000
commit0e655d49868553951a036a203b7407d9d2afc532 (patch)
tree5978f0a1f036cdf273de14eb5b940ed03bb056ef /src/Editor.cxx
parent126d13674fa63256b6576e5317791b6f77ebefb3 (diff)
downloadscintilla-mirror-0e655d49868553951a036a203b7407d9d2afc532.tar.gz
Specifying some methods as const as they are used from display and measurement
code that will be changed to have read-only access.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index d3e5f3090..686012f32 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -355,7 +355,7 @@ void Editor::RefreshStyleData() {
}
}
-Point Editor::GetVisibleOriginInMain() {
+Point Editor::GetVisibleOriginInMain() const {
return Point(0,0);
}
@@ -379,8 +379,9 @@ int Editor::TopLineOfMain() const {
return topLine;
}
-PRectangle Editor::GetClientRectangle() {
- return wMain.GetClientPosition();
+PRectangle Editor::GetClientRectangle() const {
+ Window &win = const_cast<Window &>(wMain);
+ return win.GetClientPosition();
}
PRectangle Editor::GetClientDrawingRectangle() {
@@ -394,7 +395,7 @@ PRectangle Editor::GetTextRectangle() {
return rc;
}
-int Editor::LinesOnScreen() {
+int Editor::LinesOnScreen() const {
PRectangle rcClient = GetClientRectangle();
int htClient = static_cast<int>(rcClient.bottom - rcClient.top);
//Platform::DebugPrintf("lines on screen = %d\n", htClient / lineHeight + 1);