diff options
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 65348f588..6d833c5d2 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -333,7 +333,7 @@ Point Editor::DocumentPointFromView(Point ptView) { return ptDocument; } -int Editor::TopLineOfMain() { +int Editor::TopLineOfMain() const { if (wMargin.GetID()) return 0; else @@ -489,7 +489,7 @@ int Editor::XFromPosition(SelectionPosition sp) { return pt.x - vs.textStart + xOffset; } -int Editor::LineFromLocation(Point pt) { +int Editor::LineFromLocation(Point pt) const { return cs.DocFromDisplay(pt.y / vs.lineHeight + topLine); } @@ -722,11 +722,11 @@ void Editor::InvalidateRange(int start, int end) { RedrawRect(RectangleFromRange(start, end)); } -int Editor::CurrentPosition() { +int Editor::CurrentPosition() const { return sel.MainCaret(); } -bool Editor::SelectionEmpty() { +bool Editor::SelectionEmpty() const { return sel.Empty(); } @@ -1740,7 +1740,7 @@ void Editor::LinesSplit(int pixelWidth) { } } -int Editor::SubstituteMarkerIfEmpty(int markerCheck, int markerDefault) { +int Editor::SubstituteMarkerIfEmpty(int markerCheck, int markerDefault) const { if (vs.markers[markerCheck].markType == SC_MARK_EMPTY) return markerDefault; return markerCheck; @@ -2426,14 +2426,14 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou } } -ColourDesired Editor::SelectionBackground(ViewStyle &vsDraw, bool main) { +ColourDesired Editor::SelectionBackground(ViewStyle &vsDraw, bool main) const { return main ? (primarySelection ? vsDraw.selbackground : vsDraw.selbackground2) : vsDraw.selAdditionalBackground; } ColourDesired Editor::TextBackground(ViewStyle &vsDraw, bool overrideBackground, - ColourDesired background, int inSelection, bool inHotspot, int styleMain, int i, LineLayout *ll) { + ColourDesired background, int inSelection, bool inHotspot, int styleMain, int i, LineLayout *ll) const { if (inSelection == 1) { if (vsDraw.selbackset && (vsDraw.selAlpha == SC_ALPHA_NOALPHA)) { return SelectionBackground(vsDraw, true); @@ -6217,7 +6217,7 @@ bool Editor::PointInSelMargin(Point pt) { } } -Window::Cursor Editor::GetMarginCursor(Point pt) { +Window::Cursor Editor::GetMarginCursor(Point pt) const { int x = 0; for (int margin = 0; margin <= SC_MAX_MARGIN; margin++) { if ((pt.x >= x) && (pt.x < x + vs.ms[margin].width)) @@ -6483,7 +6483,7 @@ void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, b ShowCaretAtCurrentPosition(); } -bool Editor::PositionIsHotspot(int position) { +bool Editor::PositionIsHotspot(int position) const { return vs.styles[pdoc->StyleAt(position) & pdoc->stylingBitsMask].hotspot; } @@ -6527,7 +6527,7 @@ void Editor::SetHotSpotRange(Point *pt) { } } -void Editor::GetHotSpotRange(int &hsStart_, int &hsEnd_) { +void Editor::GetHotSpotRange(int &hsStart_, int &hsEnd_) const { hsStart_ = hsStart; hsEnd_ = hsEnd; } @@ -6787,7 +6787,7 @@ void Editor::SetFocusState(bool focusState) { } } -int Editor::PositionAfterArea(PRectangle rcArea) { +int Editor::PositionAfterArea(PRectangle rcArea) const { // The start of the document line after the display line after the area // This often means that the line after a modification is restyled which helps // detect multiline comment additions and heals single line comments @@ -7046,7 +7046,7 @@ void Editor::FoldExpand(int line, int action, int level) { Redraw(); } -int Editor::ContractedFoldNext(int lineStart) { +int Editor::ContractedFoldNext(int lineStart) const { for (int line = lineStart; line<pdoc->LinesTotal();) { if (!cs.GetExpanded(line) && (pdoc->GetLevel(line) & SC_FOLDLEVELHEADERFLAG)) return line; |