diff options
author | Neil <nyamatongwe@gmail.com> | 2014-06-22 12:50:03 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2014-06-22 12:50:03 +1000 |
commit | 068bfb9213d810b1551cdc48fdfd216060253103 (patch) | |
tree | 961424276d263ea442f98112aa3bc26dafa92bef /src/Editor.h | |
parent | 318fb4b54beb34a036bfe405127c9329b67ea95f (diff) | |
download | scintilla-mirror-068bfb9213d810b1551cdc48fdfd216060253103.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.h | 20 |
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); |