diff options
| author | Greg Ercolano <erco@seriss.com> | 2017-10-09 02:41:42 +0000 |
|---|---|---|
| committer | Greg Ercolano <erco@seriss.com> | 2017-10-09 02:41:42 +0000 |
| commit | 5488a4a1e7351963d9fc85c77cbc4a3979d01832 (patch) | |
| tree | 94f73073d88da3a7fbb8c198b0231b610db473ec /FL | |
| parent | d0e1d16ae899addf544c765ec8d50d8e095455df (diff) | |
Added docs for the mLineStarts[] array, and related mNVisibleLines.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12484 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl_Text_Display.H | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/FL/Fl_Text_Display.H b/FL/Fl_Text_Display.H index b86156583..714b8afad 100644 --- a/FL/Fl_Text_Display.H +++ b/FL/Fl_Text_Display.H @@ -456,7 +456,8 @@ protected: the number of redraw calls */ int mCursorStyle; /* One of enum cursorStyles above */ int mCursorPreferredXPos; /* Pixel position for vert. cursor movement */ - int mNVisibleLines; /* # of visible (displayed) lines */ + int mNVisibleLines; /* # of visible (displayed) lines. This is + also the size of the mLineStarts[] array. */ int mNBufferLines; /* # of newlines in the buffer */ Fl_Text_Buffer* mBuffer; /* Contains text to be displayed */ Fl_Text_Buffer* mStyleBuffer; /* Optional parallel buffer containing @@ -468,7 +469,15 @@ protected: int mContinuousWrap; /* Wrap long lines when displaying */ int mWrapMarginPix; /* Margin in # of pixels for wrapping in continuousWrap mode */ - int* mLineStarts; + int* mLineStarts; /* Array of the size mNVisibleLines. + This array only keeps track of lines + within the display area. Each entry + contains the starting character offset + (from the beginning of the text buffer) + for each /visible/ line. + If wrap enabled, points to the beginning + of each wrap. So a long line wrapping + 3 times will take up 3 entries. */ int mTopLineNum; /* Line number of top displayed line of file (first line of file is 1) */ int mAbsTopLineNum; /* In continuous wrap mode, the line |
