EditTable Data Structures

The values of every cell in a table can be created and maintained entirely by the EditTable widget. Alternatively, the application can define and manage the data structures holding the values of every cell in the table. The XmNuseOriginalData resource needs to be set to True at EditTable widget creation time if the application wants to share the table data with the widget. In either case, the EditTable creates and manages the data structures for the row annotation and for the column annotation.

Application Defined Data Structures

If the application defines and maintains the data structures for the cell values, then the data structures required are a collection of arrays with the same number of elements; one array for every column in the table. The application will need to pass the address of each array to the EditTable by using the XintEditTableFillColumnData function. If the end user makes a change in the value of a cell, then the EditTable widget will update the application's data with the new value. When the application directly changes the values in one or more cells in a column, then the application must use the function, XintEditTableUpdateDataDisplay, to signal the EditTable widget that the display of a column needs to be updated. When the application shares the table data with the widget, there are restrictions on the operations that can be performed on the table. For instance, rows can not be deleted from the table. When the end user deletes a column, the application will need to use a delete column callback so that it is aware that the column has been deleted from the table.

Specifying Undefined Values

If the value of a cell is undefined then the EditTable will display an empty cell. To specify an undefined value for a cell, use the following defined constants:

Defined ConstantDescription
XintUNDEFINED_SHORTSpecifies an undefined short integer value.
XintUNDEFINED_INTEGERSpecifies an undefined integer value.
XintUNDEFINED_LONGSpecifies an undefined long integer value.
XintUNDEFINED_FLOATSpecifies an undefined floating point value.
XintUNDEFINED_DOUBLESpecifies an undefined double precision floating point value.
XintUNDEFINED_STRINGSpecifies an undefined character string.
XintUNDEFINED_POINTERSpecifies a NULL pointer.