mod/maxgui.mod/fltkmaxgui.mod/src/Fl_Text_Display.cxx
int Fl_Text_Display::line_end(int pos, bool startPosIsLineStart) const {
  IS_UTF8_ALIGNED2(buffer(), pos)

  int retLines, retPos, retLineStart, retLineEnd;
  
  /* If we're not wrapping use more efficien BufEndOfLine */
  if (!mContinuousWrap)
    return buffer()->line_end(pos);
  
  if (pos == buffer()->length())
    return pos;
  
  wrapped_line_counter(buffer(), pos, buffer()->length(), 1,
                       startPosIsLineStart, 0, &retPos, &retLines, &retLineStart,
                       &retLineEnd);
  
  IS_UTF8_ALIGNED2(buffer(), retLineEnd)
  return retLineEnd;
}
/**
 \brief Return the end of a line.
 
 Same as BufEndOfLine, but takes in to account line breaks when wrapping
 is turned on.  If the caller knows that startPos is at a line start, it
 can pass "startPosIsLineStart" as True to make the call more efficient
 by avoiding the additional step of scanning back to the last newline.

 Note that the definition of the end of a line is less clear when continuous
 wrap is on.  With continuous wrap off, it's just a pointer to the newline
 that ends the line.  When it's on, it's the character beyond the last
 DISPLAYABLE character on the line, where a whitespace character which has
 been "converted" to a newline for wrapping is not considered displayable.
 Also note that, a line can be wrapped at a non-whitespace character if the
 line had no whitespace.  In this case, this routine returns a pointer to
 the start of the next line.  This is also consistent with the model used by
 visLineLength.
 
 \param startPos index to starting character
 \param startPosIsLineStart avoid scanning back to the line start
 \retun new position as index
 */
\brief Return the end of a line.
Same as BufEndOfLine, but takes in to account line breaks when wrapping
is turned on.  If the caller knows that startPos is at a line start, it
can pass "startPosIsLineStart" as True to make the call more efficient
by avoiding the additional step of scanning back to the last newline.

Note that the definition of the end of a line is less clear when continuous
wrap is on.  With continuous wrap off, it's just a pointer to the newline
that ends the line.  When it's on, it's the character beyond the last
DISPLAYABLE character on the line, where a whitespace character which has
been "converted" to a newline for wrapping is not considered displayable.
Also note that, a line can be wrapped at a non-whitespace character if the
line had no whitespace.  In this case, this routine returns a pointer to
the start of the next line.  This is also consistent with the model used by
visLineLength.

\param startPos index to starting character
\param startPosIsLineStart avoid scanning back to the line start
\retun new position as index
\ brief Return the end of a line . Same as BufEndOfLine but takes in to account line breaks when wrapping is turned on . If the caller knows that startPos is at a line start it can pass " startPosIsLineStart " as True to make the call more efficient by avoiding the additional step of scanning back to the last newline . Note that the definition of the end of a line is less clear when continuous wrap is on . With continuous wrap off it ' s just a pointer to the newline that ends the line . When it ' s on it ' s the character beyond the last DISPLAYABLE character on the line where a whitespace character which has been " converted " to a newline for wrapping is not considered displayable . Also note that a line can be wrapped at a non - whitespace character if the line had no whitespace . In this case this routine returns a pointer to the start of the next line . This is also consistent with the model used by visLineLength . \ param startPos index to starting character \ param startPosIsLineStart avoid scanning back to the line start \ retun new position as index
int Fl_Text_Display::line_end(int pos, bool startPosIsLineStart) const {
  IS_UTF8_ALIGNED2(buffer(), pos)
  int retLines, retPos, retLineStart, retLineEnd;
  if (!mContinuousWrap)
    return buffer()->line_end(pos);
  if (pos == buffer()->length())
    return pos;
  wrapped_line_counter(buffer(), pos, buffer()->length(), 1,
                       startPosIsLineStart, 0, &retPos, &retLines, &retLineStart,
                       &retLineEnd);
  IS_UTF8_ALIGNED2(buffer(), retLineEnd)
  return retLineEnd;
}
int Fl_Text_Display :: line_end ( int pos , bool startPosIsLineStart ) const { IS_UTF8_ALIGNED2 ( buffer ( ) , pos ) int retLines , retPos , retLineStart , retLineEnd ; if ( ! mContinuousWrap ) return buffer ( ) -> line_end ( pos ) ; if ( pos == buffer ( ) -> length ( ) ) return pos ; wrapped_line_counter ( buffer ( ) , pos , buffer ( ) -> length ( ) , 1 , startPosIsLineStart , 0 , & retPos , & retLines , & retLineStart , & retLineEnd ) ; IS_UTF8_ALIGNED2 ( buffer ( ) , retLineEnd ) return retLineEnd ; }
\brief Return the end of a line.
\ brief Return the end of a line .
/* If we're not wrapping use more efficien BufEndOfLine */