From 5488a4a1e7351963d9fc85c77cbc4a3979d01832 Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Mon, 9 Oct 2017 02:41:42 +0000 Subject: 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 --- FL/Fl_Text_Display.H | 13 +++++++++++-- 1 file 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 -- cgit v1.2.3