diff options
| author | nyamatongwe <devnull@localhost> | 2002-02-28 10:54:35 +0000 |
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2002-02-28 10:54:35 +0000 |
| commit | c208c5796da3a499c25850698c84f423ff316408 (patch) | |
| tree | 0b1cc430dfbd1daef714aa8a477497c975dd6859 /src/Editor.h | |
| parent | 9a24b646f899734342a240964db61bb07ea41648 (diff) | |
| download | scintilla-mirror-c208c5796da3a499c25850698c84f423ff316408.tar.gz | |
Made number of display lines for a document line be dynamic.
Diffstat (limited to 'src/Editor.h')
| -rw-r--r-- | src/Editor.h | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/Editor.h b/src/Editor.h index a7047ef14..1056a95bb 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -34,13 +34,17 @@ public: /** */ class LineLayout { -public: - enum validLevel { llInvalid, llPositions, llLines } validity; +private: + friend class LineLayoutCache; + int *lineStarts; + int lenLineStarts; /// Drawing is only performed for @a maxLineLength characters on each line. - int maxLineLength; int lineNumber; bool inCache; +public: + int maxLineLength; int numCharsInLine; + enum validLevel { llInvalid, llPositions, llLines } validity; int xHighlightGuide; bool highlightColumn; int selStart; @@ -55,14 +59,22 @@ public: // Wrapped line support int widthLine; int lines; - int maxDisplayLines; - int *lineStarts; - LineLayout(int maxLineLength_ = 8000, int maxDisplayLines=100); + 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); }; /** |
