예제 #1
0
static int iMatrixListSetIdValueAttrib(Ihandle* ih, int lin, const char* value)
{
  ImatrixListData* mtxList = (ImatrixListData*)iupAttribGet(ih, "_IUPMTXLIST_DATA");

  if (iupMatrixCheckCellPos(ih, lin, mtxList->label_col))
    iupMatrixSetValue(ih, lin, mtxList->label_col, value, 0);
  return 0;
}
예제 #2
0
static int iMatrixListSetTitleAttrib(Ihandle* ih, const char* value)
{
  ImatrixListData* mtxList = (ImatrixListData*)iupAttribGet(ih, "_IUPMTXLIST_DATA");
  if (!ih->handle)
    iupAttribSetId2(ih, "", 0, mtxList->label_col, value);
  else
    iupMatrixSetValue(ih, 0, mtxList->label_col, value, 0);
  return 0;
}
예제 #3
0
static int iMatrixListSetValueAttrib(Ihandle* ih, const char* value)
{
  ImatrixListData* mtxList = (ImatrixListData*)iupAttribGet(ih, "_IUPMTXLIST_DATA");

  if (!mtxList->label_col)
    return 0;

  if (ih->data->columns.num <= 1 || ih->data->lines.num <= 1)
    return 0;

  if (ih->data->editing)
    IupStoreAttribute(ih->data->datah, "VALUE", value);
  else 
    iupMatrixSetValue(ih, ih->data->lines.focus_cell, mtxList->label_col, value, 0);
  return 0;
}
예제 #4
0
static void iMatrixEditUpdateValue(Ihandle* ih)
{
    char *value = iupMatrixEditGetValue(ih);

    iupAttribSet(ih, "CELL_EDITED", "Yes");

    if (ih->data->undo_redo) iupAttribSetClassObject(ih, "UNDOPUSHBEGIN", "EDITCELL");

    iupMatrixSetValue(ih, ih->data->edit_lin, ih->data->edit_col, value, 1);

    if (ih->data->undo_redo) iupAttribSetClassObject(ih, "UNDOPUSHEND", NULL);

    iupBaseCallValueChangedCb(ih);

    iupAttribSet(ih, "CELL_EDITED", NULL);

    iupMatrixPrepareDrawData(ih);
    iupMatrixDrawCells(ih, ih->data->edit_lin, ih->data->edit_col, ih->data->edit_lin, ih->data->edit_col);
}