diff options
author | nyamatongwe <unknown> | 2002-07-11 13:19:38 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2002-07-11 13:19:38 +0000 |
commit | 9a723bd955828d0227410c747d6502ba999f0e65 (patch) | |
tree | 3a6eda035de72b160b29d369e3da7c9940462be4 /src/Editor.h | |
parent | 265e3d5ed8ba0354ebafeb9af2f06d53103d15e9 (diff) | |
download | scintilla-mirror-9a723bd955828d0227410c747d6502ba999f0e65.tar.gz |
Patch from Philippe to improve caret policy.
Diffstat (limited to 'src/Editor.h')
-rw-r--r-- | src/Editor.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/Editor.h b/src/Editor.h index 9eba943a6..724775342 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -77,7 +77,7 @@ public: } } void SetLineStart(int line, int start); - void SetBracesHighlight(Range rangeLine, Position braces[], + void SetBracesHighlight(Range rangeLine, Position braces[], char bracesMatchStyle, int xHighlight); void RestoreBracesHighlight(Range rangeLine, Position braces[]); }; @@ -97,16 +97,16 @@ public: LineLayoutCache(); virtual ~LineLayoutCache(); void Deallocate(); - enum { - llcNone=SC_CACHE_NONE, - llcCaret=SC_CACHE_CARET, - llcPage=SC_CACHE_PAGE, + enum { + llcNone=SC_CACHE_NONE, + llcCaret=SC_CACHE_CARET, + llcPage=SC_CACHE_PAGE, llcDocument=SC_CACHE_DOCUMENT }; void Invalidate(LineLayout::validLevel validity_); void SetLevel(int level_); int GetLevel() { return level; } - LineLayout *Retrieve(int lineNumber, int lineCaret, int maxChars, int styleClock_, + LineLayout *Retrieve(int lineNumber, int lineCaret, int maxChars, int styleClock_, int linesOnScreen, int linesInDoc); void Dispose(LineLayout *ll); }; @@ -259,8 +259,11 @@ protected: // ScintillaBase subclass needs access to much of Editor int xEndSelect; bool primarySelection; - int caretPolicy; - int caretSlop; + int caretXPolicy; + int caretXSlop; ///< Ensure this many pixels visible on both sides of caret + + int caretYPolicy; + int caretYSlop; ///< Ensure this many lines visible on both sides of caret int visiblePolicy; int visibleSlop; @@ -338,7 +341,7 @@ protected: // ScintillaBase subclass needs access to much of Editor int SubstituteMarkerIfEmpty(int markerCheck, int markerDefault); 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, ViewStyle &vstyle, LineLayout *ll, int width=LineLayout::wrapWidthInfinite); void DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVisible, int xStart, PRectangle rcLine, LineLayout *ll, int subLine=0); |