aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Editor.h')
-rw-r--r--src/Editor.h87
1 files changed, 1 insertions, 86 deletions
diff --git a/src/Editor.h b/src/Editor.h
index a31777611..213b0e361 100644
--- a/src/Editor.h
+++ b/src/Editor.h
@@ -46,92 +46,6 @@ public:
};
/**
- */
-class LineLayout {
-private:
- friend class LineLayoutCache;
- int *lineStarts;
- int lenLineStarts;
- /// Drawing is only performed for @a maxLineLength characters on each line.
- int lineNumber;
- bool inCache;
-public:
- enum { wrapWidthInfinite = 0x7ffffff };
- int maxLineLength;
- int numCharsInLine;
- enum validLevel { llInvalid, llCheckTextAndStyle, llPositions, llLines } validity;
- int xHighlightGuide;
- bool highlightColumn;
- int selStart;
- int selEnd;
- bool containsCaret;
- int edgeColumn;
- char *chars;
- unsigned char *styles;
- int styleBitsSet;
- char *indicators;
- int *positions;
- char bracePreviousStyles[2];
-
- // Hotspot support
- int hsStart;
- int hsEnd;
-
- // Wrapped line support
- int widthLine;
- int lines;
-
- LineLayout(int maxLineLength_);
- virtual ~LineLayout();
- void Resize(int maxLineLength_);
- void Free();
- void Invalidate(validLevel validity_);
- int LineStart(int line) {
- if (line <= 0) {
- return 0;
- } else if ((line >= lines) || !lineStarts) {
- return numCharsInLine;
- } else {
- return lineStarts[line];
- }
- }
- void SetLineStart(int line, int start);
- void SetBracesHighlight(Range rangeLine, Position braces[],
- char bracesMatchStyle, int xHighlight);
- void RestoreBracesHighlight(Range rangeLine, Position braces[]);
-};
-
-/**
- */
-class LineLayoutCache {
- int level;
- int length;
- int size;
- LineLayout **cache;
- bool allInvalidated;
- int styleClock;
- int useCount;
- void Allocate(int length_);
- void AllocateForLevel(int linesOnScreen, int linesInDoc);
-public:
- LineLayoutCache();
- virtual ~LineLayoutCache();
- void Deallocate();
- 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_,
- int linesOnScreen, int linesInDoc);
- void Dispose(LineLayout *ll);
-};
-
-/**
* Hold a piece of text selected for copying or dragging.
* The text is expected to hold a terminating '\0' and this is counted in len.
*/
@@ -233,6 +147,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
Surface *pixmapIndentGuideHighlight;
LineLayoutCache llc;
+ PositionCache posCache;
KeyMap kmap;