mod/maxgui.mod/fltkmaxgui.mod/src/Fl_Text_Display.cxx
void Fl_Text_Display::find_line_end(int startPos, bool startPosIsLineStart,
                                    int *lineEnd, int *nextLineStart) const {
  IS_UTF8_ALIGNED2(buffer(), startPos)

  int retLines, retLineStart;
  
  /* if we're not wrapping use more efficient BufEndOfLine */
  if (!mContinuousWrap) {
    int le = buffer()->line_end(startPos);
    int ls = buffer()->next_char(le);
    *lineEnd = le;
    *nextLineStart = min(buffer()->length(), ls);
    return;
  }
  
  /* use the wrapped line counter routine to count forward one line */
  wrapped_line_counter(buffer(), startPos, buffer()->length(),
                       1, startPosIsLineStart, 0, nextLineStart, &retLines,
                       &retLineStart, lineEnd);
}
/**
 \brief Finds both the end of the current line and the start of the next line.  
 
 Why?
 In continuous wrap mode, if you need to know both, figuring out one from the
 other can be expensive or error prone.  The problem comes when there's a
 trailing space or tab just before the end of the buffer.  To translate an
 end of line value to or from the next lines start value, you need to know
 whether the trailing space or tab is being used as a line break or just a
 normal character, and to find that out would otherwise require counting all
 the way back to the beginning of the line.
 
 \param startPos
 \param startPosIsLineStart
 \param[out] lineEnd
 \param[out] nextLineStart
 */
\brief Finds both the end of the current line and the start of the next line.
Why.
In continuous wrap mode, if you need to know both, figuring out one from the
other can be expensive or error prone.  The problem comes when there's a
trailing space or tab just before the end of the buffer.  To translate an
end of line value to or from the next lines start value, you need to know
whether the trailing space or tab is being used as a line break or just a
normal character, and to find that out would otherwise require counting all
the way back to the beginning of the line.


\ brief Finds both the end of the current line and the start of the next line . Why . In continuous wrap mode if you need to know both figuring out one from the other can be expensive or error prone . The problem comes when there ' s a trailing space or tab just before the end of the buffer . To translate an end of line value to or from the next lines start value you need to know whether the trailing space or tab is being used as a line break or just a normal character and to find that out would otherwise require counting all the way back to the beginning of the line .
void Fl_Text_Display::find_line_end(int startPos, bool startPosIsLineStart,
                                    int *lineEnd, int *nextLineStart) const {
  IS_UTF8_ALIGNED2(buffer(), startPos)
  int retLines, retLineStart;
  if (!mContinuousWrap) {
    int le = buffer()->line_end(startPos);
    int ls = buffer()->next_char(le);
    *lineEnd = le;
    *nextLineStart = min(buffer()->length(), ls);
    return;
  }
  wrapped_line_counter(buffer(), startPos, buffer()->length(),
                       1, startPosIsLineStart, 0, nextLineStart, &retLines,
                       &retLineStart, lineEnd);
}
void Fl_Text_Display :: find_line_end ( int startPos , bool startPosIsLineStart , int * lineEnd , int * nextLineStart ) const { IS_UTF8_ALIGNED2 ( buffer ( ) , startPos ) int retLines , retLineStart ; if ( ! mContinuousWrap ) { int le = buffer ( ) -> line_end ( startPos ) ; int ls = buffer ( ) -> next_char ( le ) ; * lineEnd = le ; * nextLineStart = min ( buffer ( ) -> length ( ) , ls ) ; return ; } wrapped_line_counter ( buffer ( ) , startPos , buffer ( ) -> length ( ) , 1 , startPosIsLineStart , 0 , nextLineStart , & retLines , & retLineStart , lineEnd ) ; }
\brief Finds both the end of the current line and the start of the next line.
\ brief Finds both the end of the current line and the start of the next line .
/* if we're not wrapping use more efficient BufEndOfLine */ /* use the wrapped line counter routine to count forward one line */