Reading the documentation, passing IUP_CONTINUE to the callback function
should both update the NUMLIN and NUMCOL values and insert the loaded data
at the same time.
This doesn't happen; for example, with a 1x1 matrix and a 10x10 data file,
the matrix is only resized and the data is loaded into the cell 1:1.
I think the num_lin and num_col values are not updated in the
iupmatex_clipboard.c file, specifically at this point:
********************************
num_lin = IupGetInt(ih, "NUMLIN");
num_col = IupGetInt(ih, "NUMCOL");
pastesize_cb = (IFnii)IupGetCallback(ih, "PASTESIZE_CB");
if (pastesize_cb)
{
int vis_num_lin = iMatrixExGetVisibleNumLin(ih, lin, data_num_lin);
int vis_num_col = iMatrixExGetVisibleNumCol(ih, col, data_num_col);
if (lin+vis_num_lin>num_lin ||
col+vis_num_col>num_col)
{
int ret = pastesize_cb(ih, lin+vis_num_lin, col+vis_num_col);
if (ret == IUP_IGNORE)
return;
else if (ret == IUP_CONTINUE)
{
if (lin+vis_num_lin>num_lin) IupSetInt(ih, "NUMLIN",
lin+vis_num_lin);
if (col+vis_num_col>num_col) IupSetInt(ih, "NUMCOL",
col+vis_num_col);
}
}
}
iMatrixExPasteSetData(ih, data, data_num_lin, data_num_col, sep, lin,
col, num_lin, num_col, busyname);
*****************************
P.S.: The documentation is incorrect in describing the function values;
those listed refer to the busy_cb function.
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users