aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-06-22 12:50:03 +1000
committerNeil <nyamatongwe@gmail.com>2014-06-22 12:50:03 +1000
commit77b174e27eb28ffce6794588d0de1433bffe7672 (patch)
tree196e0621062c01e8de3e294e321795413041468a /src/Editor.h
parent97738a2c60e7b3cb778f6d9f9045ad5a3ca67986 (diff)
downloadscintilla-mirror-77b174e27eb28ffce6794588d0de1433bffe7672.tar.gz
Drawing and measuring should not change ViewStyle which is set by the container
so mark ViewStyle parameters as const. Provide a FontAlias copy constructor and use it to work around non-const Font arguments to Surface when sourced from const ViewStyle.
Diffstat (limited to 'src/Editor.h')
-rw-r--r--src/Editor.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/Editor.h b/src/Editor.h
index 15a0fcf04..4826a1852 100644
--- a/src/Editor.h
+++ b/src/Editor.h
@@ -435,27 +435,27 @@ protected: // ScintillaBase subclass needs access to much of Editor
int SubstituteMarkerIfEmpty(int markerCheck, int markerDefault) const;
void PaintSelMargin(Surface *surface, PRectangle &rc);
LineLayout *RetrieveLineLayout(int lineNumber);
- void LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayout *ll,
+ void LayoutLine(int line, Surface *surface, const ViewStyle &vstyle, LineLayout *ll,
int width=LineLayout::wrapWidthInfinite);
- ColourDesired SelectionBackground(ViewStyle &vsDraw, bool main) const;
- ColourDesired TextBackground(ViewStyle &vsDraw, bool overrideBackground, ColourDesired background, int inSelection, bool inHotspot, int styleMain, int i, LineLayout *ll) const;
+ ColourDesired SelectionBackground(const ViewStyle &vsDraw, bool main) const;
+ ColourDesired TextBackground(const ViewStyle &vsDraw, bool overrideBackground, ColourDesired background, int inSelection, bool inHotspot, int styleMain, int i, LineLayout *ll) const;
void DrawIndentGuide(Surface *surface, int lineVisible, int lineHeight, int start, PRectangle rcSegment, bool highlight);
static void DrawWrapMarker(Surface *surface, PRectangle rcPlace, bool isEndMarker, ColourDesired wrapColour);
- void DrawEOL(Surface *surface, ViewStyle &vsDraw, PRectangle rcLine, LineLayout *ll,
+ void DrawEOL(Surface *surface, const ViewStyle &vsDraw, PRectangle rcLine, LineLayout *ll,
int line, int lineEnd, int xStart, int subLine, XYACCUMULATOR subLineStart,
bool overrideBackground, ColourDesired background,
bool drawWrapMark, ColourDesired wrapColour);
- static void DrawIndicator(int indicNum, int startPos, int endPos, Surface *surface, ViewStyle &vsDraw,
+ static void DrawIndicator(int indicNum, int startPos, int endPos, Surface *surface, const ViewStyle &vsDraw,
int xStart, PRectangle rcLine, LineLayout *ll, int subLine);
- void DrawIndicators(Surface *surface, ViewStyle &vsDraw, int line, int xStart,
+ void DrawIndicators(Surface *surface, const ViewStyle &vsDraw, int line, int xStart,
PRectangle rcLine, LineLayout *ll, int subLine, int lineEnd, bool under);
- void DrawAnnotation(Surface *surface, ViewStyle &vsDraw, int line, int xStart,
+ void DrawAnnotation(Surface *surface, const ViewStyle &vsDraw, int line, int xStart,
PRectangle rcLine, LineLayout *ll, int subLine);
- void DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVisible, int xStart,
+ void DrawLine(Surface *surface, const ViewStyle &vsDraw, int line, int lineVisible, int xStart,
PRectangle rcLine, LineLayout *ll, int subLine);
- void DrawBlockCaret(Surface *surface, ViewStyle &vsDraw, LineLayout *ll, int subLine,
+ void DrawBlockCaret(Surface *surface, const ViewStyle &vsDraw, LineLayout *ll, int subLine,
int xStart, int offset, int posCaret, PRectangle rcCaret, ColourDesired caretColour);
- void DrawCarets(Surface *surface, ViewStyle &vsDraw, int line, int xStart,
+ void DrawCarets(Surface *surface, const ViewStyle &vsDraw, int line, int xStart,
PRectangle rcLine, LineLayout *ll, int subLine);
void RefreshPixMaps(Surface *surfaceWindow);
void Paint(Surface *surfaceWindow, PRectangle rcArea);