srccontrols/matrix/iupmat_colres.c
void iupMatrixColResMove(Ihandle* ih, int x)
{
  int y1, y2;
  cdCanvas* cd_canvas_front = (cdCanvas*)IupGetAttribute(ih, "_CD_CANVAS");  /* front buffer canvas */

  int delta = x - ih->data->colres_drag_col_start_x;
  int width = ih->data->columns.dt[ih->data->colres_drag_col].size + delta;
  if (width < 0)
    return;

  y1 = ih->data->lines.dt[0].size;  /* from the bottom of the line of titles */
  y2 = iupMatrixGetHeight(ih) - 1;             /* to the bottom of the matrix */

  iupMatrixDrawUpdate(ih);

  cdCanvasForeground(cd_canvas_front, ih->data->colres_color);
  cdCanvasLine(cd_canvas_front, x, iupMATRIX_INVERTYAXIS(ih, y1), 
                                x, iupMATRIX_INVERTYAXIS(ih, y2));
}
/* Change the column width interactively, just change the line in the screen.
   When the user finishes the drag, the iupMatrixColResFinish function is called
   to truly change the column width. */
Change the column width interactively, just change the line in the screen.
When the user finishes the drag, the iupMatrixColResFinish function is called
to truly change the column width.
Change the column width interactively just change the line in the screen . When the user finishes the drag the iupMatrixColResFinish function is called to truly change the column width .
void iupMatrixColResMove(Ihandle* ih, int x)
{
  int y1, y2;
  cdCanvas* cd_canvas_front = (cdCanvas*)IupGetAttribute(ih, "_CD_CANVAS");  
  int delta = x - ih->data->colres_drag_col_start_x;
  int width = ih->data->columns.dt[ih->data->colres_drag_col].size + delta;
  if (width < 0)
    return;
  y1 = ih->data->lines.dt[0].size;  
  y2 = iupMatrixGetHeight(ih) - 1;             
  iupMatrixDrawUpdate(ih);
  cdCanvasForeground(cd_canvas_front, ih->data->colres_color);
  cdCanvasLine(cd_canvas_front, x, iupMATRIX_INVERTYAXIS(ih, y1), 
                                x, iupMATRIX_INVERTYAXIS(ih, y2));
}
void iupMatrixColResMove ( Ihandle * ih , int x ) { int y1 , y2 ; cdCanvas * cd_canvas_front = ( cdCanvas * ) IupGetAttribute ( ih , " " ) ; int delta = x - ih -> data -> colres_drag_col_start_x ; int width = ih -> data -> columns . dt [ ih -> data -> colres_drag_col ] . size + delta ; if ( width < 0 ) return ; y1 = ih -> data -> lines . dt [ 0 ] . size ; y2 = iupMatrixGetHeight ( ih ) - 1 ; iupMatrixDrawUpdate ( ih ) ; cdCanvasForeground ( cd_canvas_front , ih -> data -> colres_color ) ; cdCanvasLine ( cd_canvas_front , x , iupMATRIX_INVERTYAXIS ( ih , y1 ) , x , iupMATRIX_INVERTYAXIS ( ih , y2 ) ) ; }
Change the column width interactively, just change the line in the screen.
Change the column width interactively just change the line in the screen .
/* front buffer canvas */ /* from the bottom of the line of titles */ /* to the bottom of the matrix */