mod/maxgui.mod/fltkmaxgui.mod/src/Fl_Text_Display.cxx
void Fl_Text_Display::draw_line_numbers(bool /*clearAll*/) {
#if 0
  int y, line, visLine, nCols, lineStart;
  char lineNumString[12];
  int lineHeight = mMaxsize ? mMaxsize : textsize_;
  int charWidth = TMPFONTWIDTH;   //mFontStruct->max_bounds.width;
  
  /* Don't draw if mLineNumWidth == 0 (line numbers are hidden), or widget is
   not yet realized */
  if (mLineNumWidth == 0 || visible_r())
    return;
  
  /* GC is allocated on demand, since not everyone will use line numbering */
  if (textD->lineNumGC == NULL) {
    XGCValues values;
    values.foreground = textD->lineNumFGPixel;
    values.background = textD->bgPixel;
    values.font = textD->fontStruct->fid;
    textD->lineNumGC = XtGetGC(textD->w,
                               GCFont| GCForeground | GCBackground, &values);
  }
  
  /* Erase the previous contents of the line number area, if requested */
  if (clearAll)
    XClearArea(XtDisplay(textD->w), XtWindow(textD->w), textD->lineNumLeft,
               textD->top, textD->lineNumWidth, textD->height, False);
  
  /* Draw the line numbers, aligned to the text */
  nCols = min(11, textD->lineNumWidth / charWidth);
  y = textD->top;
  line = getAbsTopLineNum(textD);
  for (visLine=0; visLine < textD->nVisibleLines; visLine++) {
    lineStart = textD->lineStarts[visLine];
    if (lineStart != -1 && (lineStart==0 ||
                            BufGetCharacter(textD->buffer, lineStart-1)=='\n')) {
      sprintf(lineNumString, "%*d", nCols, line);
      XDrawImageString(XtDisplay(textD->w), XtWindow(textD->w),
                       textD->lineNumGC, textD->lineNumLeft, y + textD->ascent,
                       lineNumString, strlen(lineNumString));
      line++;
    } else {
      XClearArea(XtDisplay(textD->w), XtWindow(textD->w),
                 textD->lineNumLeft, y, textD->lineNumWidth,
                 textD->ascent + textD->descent, False);
      if (visLine == 0)
        line++;
    }
    y += lineHeight;
  }
#endif
}
/**
 \brief Refresh the line number area.  
 
 If clearAll is False, writes only over the character cell areas.  Setting 
 clearAll to True will clear out any stray marks outside of the character cell 
 area, which might have been left from before a resize or font change.
 
 This function is not used.
 */
\brief Refresh the line number area.
If clearAll is False, writes only over the character cell areas.  Setting
clearAll to True will clear out any stray marks outside of the character cell
area, which might have been left from before a resize or font change.

This function is not used.
\ brief Refresh the line number area . If clearAll is False writes only over the character cell areas . Setting clearAll to True will clear out any stray marks outside of the character cell area which might have been left from before a resize or font change . This function is not used .
void Fl_Text_Display::draw_line_numbers(bool ) {
#if 0
  int y, line, visLine, nCols, lineStart;
  char lineNumString[12];
  int lineHeight = mMaxsize ? mMaxsize : textsize_;
  int charWidth = TMPFONTWIDTH;   
  if (mLineNumWidth == 0 || visible_r())
    return;
  if (textD->lineNumGC == NULL) {
    XGCValues values;
    values.foreground = textD->lineNumFGPixel;
    values.background = textD->bgPixel;
    values.font = textD->fontStruct->fid;
    textD->lineNumGC = XtGetGC(textD->w,
                               GCFont| GCForeground | GCBackground, &values);
  }
  if (clearAll)
    XClearArea(XtDisplay(textD->w), XtWindow(textD->w), textD->lineNumLeft,
               textD->top, textD->lineNumWidth, textD->height, False);
  nCols = min(11, textD->lineNumWidth / charWidth);
  y = textD->top;
  line = getAbsTopLineNum(textD);
  for (visLine=0; visLine < textD->nVisibleLines; visLine++) {
    lineStart = textD->lineStarts[visLine];
    if (lineStart != -1 && (lineStart==0 ||
                            BufGetCharacter(textD->buffer, lineStart-1)=='\n')) {
      sprintf(lineNumString, "%*d", nCols, line);
      XDrawImageString(XtDisplay(textD->w), XtWindow(textD->w),
                       textD->lineNumGC, textD->lineNumLeft, y + textD->ascent,
                       lineNumString, strlen(lineNumString));
      line++;
    } else {
      XClearArea(XtDisplay(textD->w), XtWindow(textD->w),
                 textD->lineNumLeft, y, textD->lineNumWidth,
                 textD->ascent + textD->descent, False);
      if (visLine == 0)
        line++;
    }
    y += lineHeight;
  }
#endif
}
void Fl_Text_Display :: draw_line_numbers ( bool ) { #if 0 int y , line , visLine , nCols , lineStart ; char lineNumString [ 12 ] ; int lineHeight = mMaxsize ? mMaxsize : textsize_ ; int charWidth = TMPFONTWIDTH ; if ( mLineNumWidth == 0 || visible_r ( ) ) return ; if ( textD -> lineNumGC == NULL ) { XGCValues values ; values . foreground = textD -> lineNumFGPixel ; values . background = textD -> bgPixel ; values . font = textD -> fontStruct -> fid ; textD -> lineNumGC = XtGetGC ( textD -> w , GCFont | GCForeground | GCBackground , & values ) ; } if ( clearAll ) XClearArea ( XtDisplay ( textD -> w ) , XtWindow ( textD -> w ) , textD -> lineNumLeft , textD -> top , textD -> lineNumWidth , textD -> height , False ) ; nCols = min ( 11 , textD -> lineNumWidth / charWidth ) ; y = textD -> top ; line = getAbsTopLineNum ( textD ) ; for ( visLine = 0 ; visLine < textD -> nVisibleLines ; visLine ++ ) { lineStart = textD -> lineStarts [ visLine ] ; if ( lineStart != -1 && ( lineStart == 0 || BufGetCharacter ( textD -> buffer , lineStart - 1 ) == ' \n ' ) ) { sprintf ( lineNumString , " " , nCols , line ) ; XDrawImageString ( XtDisplay ( textD -> w ) , XtWindow ( textD -> w ) , textD -> lineNumGC , textD -> lineNumLeft , y + textD -> ascent , lineNumString , strlen ( lineNumString ) ) ; line ++ ; } else { XClearArea ( XtDisplay ( textD -> w ) , XtWindow ( textD -> w ) , textD -> lineNumLeft , y , textD -> lineNumWidth , textD -> ascent + textD -> descent , False ) ; if ( visLine == 0 ) line ++ ; } y += lineHeight ; } #endif }
\brief Refresh the line number area.
\ brief Refresh the line number area .
/*clearAll*/ //mFontStruct->max_bounds.width; /* Don't draw if mLineNumWidth == 0 (line numbers are hidden), or widget is
   not yet realized */ /* GC is allocated on demand, since not everyone will use line numbering */ /* Erase the previous contents of the line number area, if requested */ /* Draw the line numbers, aligned to the text */