diff options
author | Neil <nyamatongwe@gmail.com> | 2014-07-08 13:22:40 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2014-07-08 13:22:40 +1000 |
commit | 3b77731b31ed34ccf945f15144e53f8a8860b57d (patch) | |
tree | 9d68181c28d116a073c0dcd75dc1a7010f659afb | |
parent | 7a875962c50e21c6403bdeecc549faca72a3bea1 (diff) | |
download | scintilla-mirror-3b77731b31ed34ccf945f15144e53f8a8860b57d.tar.gz |
Changing further non-virtual methods to const where made possible by previous
change.
-rw-r--r-- | src/Editor.cxx | 10 | ||||
-rw-r--r-- | src/Editor.h | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 686012f32..89b61a222 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -359,7 +359,7 @@ Point Editor::GetVisibleOriginInMain() const { return Point(0,0); } -Point Editor::DocumentPointFromView(Point ptView) { +Point Editor::DocumentPointFromView(Point ptView) const { Point ptDocument = ptView; if (wMargin.GetID()) { Point ptOrigin = GetVisibleOriginInMain(); @@ -388,7 +388,7 @@ PRectangle Editor::GetClientDrawingRectangle() { return GetClientRectangle(); } -PRectangle Editor::GetTextRectangle() { +PRectangle Editor::GetTextRectangle() const { PRectangle rc = GetClientRectangle(); rc.left += vs.textStart; rc.right -= vs.rightMarginWidth; @@ -402,7 +402,7 @@ int Editor::LinesOnScreen() const { return htClient / vs.lineHeight; } -int Editor::LinesToScroll() { +int Editor::LinesToScroll() const { int retVal = LinesOnScreen() - 1; if (retVal < 1) return 1; @@ -410,7 +410,7 @@ int Editor::LinesToScroll() { return retVal; } -int Editor::MaxScrollPos() { +int Editor::MaxScrollPos() const { //Platform::DebugPrintf("Lines %d screen = %d maxScroll = %d\n", //LinesTotal(), LinesOnScreen(), LinesTotal() - LinesOnScreen() + 1); int retVal = cs.LinesDisplayed(); @@ -6171,7 +6171,7 @@ bool Editor::PointInSelection(Point pt) { return false; } -bool Editor::PointInSelMargin(Point pt) { +bool Editor::PointInSelMargin(Point pt) const { // Really means: "Point in a margin" if (vs.fixedColumnWidth > 0) { // There is a margin PRectangle rcSelMargin = GetClientRectangle(); diff --git a/src/Editor.h b/src/Editor.h index 103891e71..64e46f83d 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -334,15 +334,15 @@ protected: // ScintillaBase subclass needs access to much of Editor // The top left visible point in main window coordinates. Will be 0,0 except for // scroll views where it will be equivalent to the current scroll position. virtual Point GetVisibleOriginInMain() const; - Point DocumentPointFromView(Point ptView); // Convert a point from view space to document + Point DocumentPointFromView(Point ptView) const; // Convert a point from view space to document int TopLineOfMain() const; // Return the line at Main's y coordinate 0 virtual PRectangle GetClientRectangle() const; virtual PRectangle GetClientDrawingRectangle(); - PRectangle GetTextRectangle(); + PRectangle GetTextRectangle() const; int LinesOnScreen() const; - int LinesToScroll(); - int MaxScrollPos(); + int LinesToScroll() const; + int MaxScrollPos() const; SelectionPosition ClampPositionIntoDocument(SelectionPosition sp) const; Point LocationFromPosition(SelectionPosition pos); Point LocationFromPosition(int pos); @@ -569,7 +569,7 @@ protected: // ScintillaBase subclass needs access to much of Editor /** PositionInSelection returns true if position in selection. */ bool PositionInSelection(int pos); bool PointInSelection(Point pt); - bool PointInSelMargin(Point pt); + bool PointInSelMargin(Point pt) const; Window::Cursor GetMarginCursor(Point pt) const; void TrimAndSetSelection(int currentPos_, int anchor_); void LineSelection(int lineCurrentPos_, int lineAnchorPos_, bool wholeLine); |