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
This commit is contained in:
Greg Ercolano 2017-10-09 02:41:42 +00:00
parent d0e1d16ae8
commit 5488a4a1e7
1 changed files with 11 additions and 2 deletions

View File

@ -456,7 +456,8 @@ protected:
the number of redraw calls */ the number of redraw calls */
int mCursorStyle; /* One of enum cursorStyles above */ int mCursorStyle; /* One of enum cursorStyles above */
int mCursorPreferredXPos; /* Pixel position for vert. cursor movement */ 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 */ int mNBufferLines; /* # of newlines in the buffer */
Fl_Text_Buffer* mBuffer; /* Contains text to be displayed */ Fl_Text_Buffer* mBuffer; /* Contains text to be displayed */
Fl_Text_Buffer* mStyleBuffer; /* Optional parallel buffer containing Fl_Text_Buffer* mStyleBuffer; /* Optional parallel buffer containing
@ -468,7 +469,15 @@ protected:
int mContinuousWrap; /* Wrap long lines when displaying */ int mContinuousWrap; /* Wrap long lines when displaying */
int mWrapMarginPix; /* Margin in # of pixels for int mWrapMarginPix; /* Margin in # of pixels for
wrapping in continuousWrap mode */ 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 int mTopLineNum; /* Line number of top displayed line
of file (first line of file is 1) */ of file (first line of file is 1) */
int mAbsTopLineNum; /* In continuous wrap mode, the line int mAbsTopLineNum; /* In continuous wrap mode, the line