mod/maxgui.mod/fltkmaxgui.mod/src/Fl_Text_Display.cxx
void Fl_Text_Display::xy_to_rowcol( int X, int Y, int *row,
                                   int *column, int posType ) const {
  int fontHeight = mMaxsize;
  int fontWidth = TMPFONTWIDTH;   //mFontStruct->max_bounds.width;
  
  /* Find the visible line number corresponding to the Y coordinate */
  *row = ( Y - text_area.y ) / fontHeight;
  if ( *row < 0 ) *row = 0;
  if ( *row >= mNVisibleLines ) *row = mNVisibleLines - 1;
  
  *column = ( ( X - text_area.x ) + mHorizOffset +
             ( posType == CURSOR_POS ? fontWidth / 2 : 0 ) ) / fontWidth;
  if ( *column < 0 ) * column = 0;
}
/**
 \brief Translate pixel coordinates into row and column.
 
 Translate window coordinates to the nearest row and column number for
 positioning the cursor.  This, of course, makes no sense when the font is
 proportional, since there are no absolute columns.  The parameter posType
 specifies how to interpret the position: CURSOR_POS means translate the
 coordinates to the nearest position between characters, and CHARACTER_POS
 means translate the position to the nearest character cell.
 
 \param X, Y pixel coordinates
 \param[out] row, column neares row and column
 \param posType CURSOR_POS or CHARACTER_POS
 */
\brief Translate pixel coordinates into row and column.
Translate window coordinates to the nearest row and column number for
positioning the cursor.  This, of course, makes no sense when the font is
proportional, since there are no absolute columns.  The parameter posType
specifies how to interpret the position: CURSOR_POS means translate the
coordinates to the nearest position between characters, and CHARACTER_POS
means translate the position to the nearest character cell.

\param X, Y pixel coordinates
\param[out] row, column neares row and column
\param posType CURSOR_POS or CHARACTER_POS
\ brief Translate pixel coordinates into row and column . Translate window coordinates to the nearest row and column number for positioning the cursor . This of course makes no sense when the font is proportional since there are no absolute columns . The parameter posType specifies how to interpret the position : CURSOR_POS means translate the coordinates to the nearest position between characters and CHARACTER_POS means translate the position to the nearest character cell . \ param X Y pixel coordinates \ param [ out ] row column neares row and column \ param posType CURSOR_POS or CHARACTER_POS
void Fl_Text_Display::xy_to_rowcol( int X, int Y, int *row,
                                   int *column, int posType ) const {
  int fontHeight = mMaxsize;
  int fontWidth = TMPFONTWIDTH;   
  *row = ( Y - text_area.y ) / fontHeight;
  if ( *row < 0 ) *row = 0;
  if ( *row >= mNVisibleLines ) *row = mNVisibleLines - 1;
  *column = ( ( X - text_area.x ) + mHorizOffset +
             ( posType == CURSOR_POS ? fontWidth / 2 : 0 ) ) / fontWidth;
  if ( *column < 0 ) * column = 0;
}
void Fl_Text_Display :: xy_to_rowcol ( int X , int Y , int * row , int * column , int posType ) const { int fontHeight = mMaxsize ; int fontWidth = TMPFONTWIDTH ; * row = ( Y - text_area . y ) / fontHeight ; if ( * row < 0 ) * row = 0 ; if ( * row >= mNVisibleLines ) * row = mNVisibleLines - 1 ; * column = ( ( X - text_area . x ) + mHorizOffset + ( posType == CURSOR_POS ? fontWidth / 2 : 0 ) ) / fontWidth ; if ( * column < 0 ) * column = 0 ; }
\brief Translate pixel coordinates into row and column.
\ brief Translate pixel coordinates into row and column .
//mFontStruct->max_bounds.width; /* Find the visible line number corresponding to the Y coordinate */