| Function Name | Description |
|---|---|
| XintCreateEditTable | Creates an unmanaged EditTable widget. |
| XintEditTableAbandonEdit | To abandon editing of the current cell and restore the original value. |
| XintEditTableAddLocalCallback | Adds a callback procedure that is local to a cell, row or column. |
| XintEditTableAddToSelection | Adds a selection to the table. |
| XintEditTableAssociateData | Associates a Data Object with an EditTable. |
| XintEditTableCellFlash | Makes a cell flash at a specified time interval over a specified period of time. |
| XintEditTableCellSpanGetRange | Returns the span for the specified cell. |
| XintEditTableCellSpanSetRange | Sets the span on a range of cells. |
| XintEditTableChangeColumnVisibility | Sets a range of columns to be visible or non visible. |
| XintEditTableChangeRowVisibility | Sets a range of rows to be visible or non visible. |
| XintEditTableClearAllSelections | Clears all the selections of a table. |
| XintEditTableClearCells | Clears the content of the specified cells. |
| XintEditTableClearSelectionByNumber | Removes a specific selection. |
| XintEditTableColumnScroll | Controls scrolling of columns. |
| XintEditTableConfirmEdit | To confirm the editing of the current cell and invoke callback XmNvalidateValueCallback. |
| XintEditTableCopyColumn | Copies a single column to the EditTable widget's clipboard. |
| XintEditTableCopyRows | Copies a range of rows to the EditTable widget's clipboard. |
| XintEditTableDefineColumnFormat | Defines the format of the cells in a specified column. |
| XintEditTableDeleteColumns | Copies a range of columns to the EditTable widget's clipboard and removes the columns from the table. |
| XintEditTableDeleteRows | Copies a range of rows to the EditTable widget's clipboard and removes the columns from the table. |
| XintEditTableFillCell | Sets the value of a specified cell. |
| XintEditTableFillCellNoUpdate | Sets the value of a specified cell without updating the display. |
| XintEditTableFillColumnAnnotation | Sets the column annotation for a specified column. |
| XintEditTableFillColumnData | Sets the values of every cell in a specified column using an array of data. |
| XintEditTableFreezeColumn | Moves a specified column to the left side of the table display so that it always stays visible when scrolling horizontally. |
| XintEditTableFreezeRow | Moves a specified row to the top of the table display so that it always stays visible when scrolling vertically. |
| XintEditTableFreezeUpdate | To enable or disable geometry updates and redrawing on the table. |
| XintEditTableGetCellBackground | Returns the background pixel color of a specified cell. |
| XintEditTableGetCellData | Returns the address of a copy of the value in a specified cell. |
| XintEditTableGetCellFont | Returns the font index used by a cell. |
| XintEditTableGetCellForeground | Returns the foreground pixel color of a specified cell. |
| XintEditTableGetCellGeometry | Returns the position and size of a cell inside the EditTable widget. |
| XintEditTableGetCellHeight | Returns the height of the specified cell. |
| XintEditTableGetCellPixmap | Returns the pixmap ID of a cell. |
| XintEditTableGetCellPointerPosition | Returns the location of the cell pointer. |
| XintEditTableGetCellWidget | Returns the cell widget for the specified location. |
| XintEditTableGetCellWidth | Returns the width of the specified cell. |
| XintEditTableGetColumnAttributes | Returns the attributes of a specified column. |
| XintEditTableGetColumnData | Returns the address of a copy of an array containing the values in the cells of a specified column. |
| XintEditTableGetColumnUserData | Returns a pointer to a column's user data. |
| XintEditTableGetFrozenColumns | Returns the address of an integer array containing the column numbers of the frozen columns. |
| XintEditTableGetFrozenRows | Returns the address of an integer array containing the row numbers of the frozen rows. |
| XintEditTableGetHiddenColumns | Returns the columns that are not visible. |
| XintEditTableGetHiddenRows | Returns the rows that are not visible. |
| XintEditTableGetSelectionByNumber | Extracts a specific selection from the table. |
| XintEditTableGetSelectionCount | Returns the number of selections in the table. |
| XintEditTableGetSubtable | Returns the ID of a specific subtable. |
| XintEditTableGetTextChild | Returns the ID of the text widget used to edit a cell content. |
| XintEditTableGetVisibleArea | Passes back the visible area of the table. |
| XintEditTableInsertColumns | Inserts a specified number of annotated columns before a specified column. |
| XintEditTableInsertRows | Inserts a specified number of non-annotated rows before a specified row. |
| XintEditTableIsCellDefined | Tells if a cell is defined or not. |
| XintEditTableIsColumnFrozen | Tells if a column is frozen or not. |
| XintEditTableIsRowFrozen | Tells if a row is frozen or not. |
| XintEditTableIsColumnHidden | Tells if a column is hidden or not. |
| XintEditTableIsRowHidden | Tells if a row is hidden or not. |
| XintEditTableOutputAscii | Creates an ASCII formatted file based on a specified range of cells in a table. |
| XintEditTableOutputPostscript | Creates a PostScript file based on a specified range of cells in the table. |
| XintEditTableOutputSimplePS | Output of PostScript file carries only the Courier-10 font and ignores all but left and middle alignment. |
| XintEditTableOutputSimplePS2 | Output of PostScript file uses fonts and alignments set in EditTable. |
| XintEditTableOutputSylkFile | Creates a SYLK formatted file based on a specified range of cells in the table. |
| XintEditTablePSReportStyle | Creates a Postscript formatted report based on a specified range of cells in the table. |
| XintEditTablePasteColumns | Replaces the values in a specified range of columns by a range of columns contained on the EditTable widget's clipboard. |
| XintEditTablePasteRows | Replaces the values in a specified range of rows by a range of rows contained on the EditTable widget's clipboard. |
| XintEditTableReadAscii | Reads an ASCII file and loads the data. |
| XintEditTableReleaseColumn | Changes a frozen column's state so that it is no longer frozen. |
| XintEditTableReleaseRow | Changes a frozen row's state so that it is no longer frozen. |
| XintEditTableReorderColumns | Changes the ordering of a range of columns. |
| XintEditTableReorderRows | Changes the ordering of a range of rows. |
| XintEditTableRemoveAllLocalCallbacks | Removes all local callback procedures attached to a specified callback. |
| XintEditTableRemoveLocalCallback | Removes a local callback procedure attached to a cell, row or column. |
| XintEditTableRowScroll | Allows the application to control scrolling or rows. |
| XintEditTableSetCellBackground | Sets the background color of a specified set of cells. |
| XintEditTableSetCellDisplayAttributes | Sets the background, foreground, and data of a specified cell. |
| XintEditTableSetCellFont | Sets the font of a range of cells. |
| XintEditTableSetCellForeground | Sets the foreground color of a specified set of cells. |
| XintEditTableSetCellHeight | Sets the height of a range of cells. |
| XintEditTableSetCellPixmap | Sets the background pixmap of a specified set of cells. |
| XintEditTableSetCellPixmapList | Sets the background pixmap of a set of cells from a pixmap list. |
| XintEditTableSetCellPointerPosition | Specifies the cell location at which to position the cell pointer. |
| XintEditTableSetCellWidth | Sets the width of a range of cells. |
| XintEditTableSetColumnFont | Sets the font of a specified column. |
| XintEditTableSetColumnUserData | Assigns user data to a specific column. |
| XintEditTableSetListBehavior | Simulates the XmList behavior. |
| XintEditTableSetRowFont | Sets the font of a specified row. |
| XintEditTableSetSelection | Causes a specified range of cells, rows or columns to be selected. |
| XintEditTableSortByColumn | This function allows the user to sort rows in the specified column. |
| XintEditTableUndeleteColumns | Causes the last column delete operation to be reversed so that the columns are not deleted. |
| XintEditTableUndeleteRows | Causes the last row delete operation to be reversed so that the rows are not deleted. |
| XintEditTableUnfreeze | Unfreezes the table. |
| XintEditTableUpdateDataDisplay | Causes the EditTable widget to update the display of a cell, row or column. |
Widget XintCreateEditTable (...)
| Widget | parent | Parent of new EditTable widget. |
| char * | name | Name of new EditTable widget. |
| ArgList | arglist | List of resource/value items. |
| Cardinal | argcount | Number of items in arglist. |
void XintEditTableAbandonEdit (Widget widget)
where widget is the ID of an EditTable widget.
Boolean XintEditTableAddLocalCallback (...)
| Widget | widget | EditTable widget ID. |
| int | column | Column number (specify 0 to register the callback for all columns). |
| int | row | Row number (specify 0 to register the callback for all rows). |
| char * | callback_name | Callback name (must be a cell, row or column callback defined by EditTable). |
| XtCallbackProc | callback | Callback procedure. |
| XtPointer | client_data | Client data for callback procedure. |
| int | calling_sequence | Specifies if local callback is called instead of, before or after normal callbacks. |
The calling_sequence argument must be one of the following defined constants:
| Defined Constant | Description |
|---|---|
| XintLOCAL_CALLBACK_EXCLUSIVE | Local callback is called instead of normal callback. |
| XintLOCAL_CALLBACK_BEFORE | Local callback is called before. |
| XintLOCAL_CALLBACK_AFTER | Local callback is called after. |
Boolean XintEditTableAddToSelection (...)
| Widget | widget | EditTable widget ID. |
| int | col_start | Starting column number. |
| int | num_cols | Number of columns. |
| int | row_start | Starting row number. |
| int | num_rows | Number of rows. |
| int | selection_mode | Specifies if selection is for a set of cells, rows or columns. |
The selection_mode argument must be one of the following:
| Defined Constant | Description |
|---|---|
| XintSELECT_CELL | Selection is a block of cells. |
| XintSELECT_ROW | Selection is a set of rows. |
| XintSELECT_COLUMN | Selection is a set of columns. |
If one of the objects in the DataGroup has a range set, it is ignored. Only arguments col_start and row_start are used to position the data inside the table.
Boolean XintEditTableAssociateData (...)
| Widget | widget | EditTable widget ID. |
| Object | data | Data object to associate with the table. |
| int | col_start | First column where to position the data. |
| int | row_start | First row where to position the data. |
| Boolean | linked | If True, the table is linked with the data object (i.e.: changes in both the table and the data object are propagated to the other). If False, no connection is established (data object is just used to fill the table). |
Boolean XintEditTableCellFlash (...)
| Widget | widget | EditTable widget ID. |
| int | column | Column location of the cell. |
| int | row | Row location of the cell. |
| long | interval | Flashing rate in unit milliseconds. |
| long | duration | Flashing time period in unit seconds. |
| Pixel | color | Specifies the flashing color. |
The function returns False if the widget is not an EditTable widget or if the specified cell is not in the visible table area.
void XintEditTableCellSpanGetRange (...)
| Widget | table | EditTable widget ID. |
| int | row | Row location of the cell. |
| int | column | Column location of the cell. |
| XintCellSpanFactor * | factor | Pointer to the structure containing the span data. |
void XintEditTableCellSpanSetRange (...)
| Widget | table | EditTable widget ID. |
| int | column | First column in the range of columns to be selected. |
| int | row | First row in the range of rows to be selected. |
| int | columns | Number of columns in the range. 0 = all columns following the starting column. |
| int | rows | Number of rows in the range. 0 = all rows following the starting row. |
| XintCellSpanFactor * | factor | Pointer to the structure containing the span data. |
Boolean XintEditTableChangeColumnVisibility (...)
| Widget | widget | EditTable widget ID. |
| int | col_start | First column to update. |
| int | col_end | Last column to update. |
| Boolean | visible | True if column is to be made visible; False if column is to be made invisible (i.e., hidden). |
Boolean XintEditTableChangeRowVisibility (...)
| Widget | widget | EditTable widget ID. |
| int | row_start | First row to update. |
| int | row_end | Last row to update. |
| Boolean | visible | True if row is to be made visible; False if row is to be made invisible (i.e., hidden). |
Boolean XintEditTableClearAllSelections (Widget widget)
where widget is the ID of an EditTable widget. This functions returns True if there was a selection prior to the call.
Boolean XintEditTableClearCells (...)
| Widget | widget | EditTable widget ID. |
| int | col_start | Starting column number. |
| int | col_end | Ending column number. |
| int | row_start | Starting row number. |
| int | row_end | Ending row number. |
Boolean XintEditTableClearSelectionByNumber (...)
| Widget | widget | EditTable widget ID. |
| int | selection_number | Number of the selection to clear. |
void XintEditTableColumnScroll (...)
| Widget | widget | EditTable widget ID. |
| int | operation | Specifies the direction and amount of scrolling. |
The operation argument must be one of the following:
| Defined Constant | Description |
|---|---|
| XintDECREMENT | Scroll one column left. |
| XintINCREMENT | Scroll one column right. |
| XintPAGE_DECREMENT | Scroll one page left. |
| XintPAGE_INCREMENT | Scroll one page right. |
| XintTO_FIRST | Scroll back to the first column. |
| XintTO_LAST | Scroll to the last column. |
void XintEditTableConfirmEdit (Widget widget)
where widget is the ID of an EditTable widget.
Boolean XintEditTableCopyColumn (...)
| Widget | widget | EditTable widget ID. |
| int | column | Column index. |
This function returns False if the column index is out of range. Otherwise, it returns True.
Boolean XintEditTableCopyRows (...)
| Widget | widget | EditTable widget ID. |
| int | row | Row index of the first row to copy. |
| int | num_rows | Number of rows to copy including the first row. |
Boolean XintEditTableDefineColumnFormat (...)
| Widget | widget | EditTable widget ID. |
| int | column | Column index. |
| int | edit_mode | Specify whether the cells in the column are editable by using one of the following defined constants: XintCOLUMN_EDITABLE or XintCOLUMN_NON_EDITABLE. |
| int | alignment | Specify the alignment of the values in the cells of the column using one of the defined constants below. |
| int | max_char | The width of the column in terms of the number of characters displayed in a cell. |
| int | data_type | Specify the data type of the values in the cells of the column using one of the defined constants below. |
| char * | data_format | Specify the format of the values in the cells of the column using a character string containing a C language format descriptor (such as "%d") NOTE: the data format must be consistent with the data type. Specify NULL if you want to format the cells in the column yourself using callback XmNformatCellCallback. This format descriptor is ignored for pointer data in which case callback XmNformatCellCallback is always called. |
Specify constant XintCOLUMN_DEFAULT if you want the EditTable to use the default value for one of the integer arguments above. The alignment argument can be one of the following:
| Resource Value | Description |
|---|---|
| XintALIGNMENT_BEGINNING_TOP | Value is to be justified in the upper left hand corner of the cell. |
| XintALIGNMENT_CENTER_TOP | Value is to be justified horizontally in the center of the cell and vertically at the top of the cell. |
| XintALIGNMENT_END_TOP | Value is to be justified in the upper right hand corner of the cell. |
| XintALIGNMENT_BEGINNING_MIDDLE | Value is to be justified horizontally at the left side of the cell and vertically in the center of the cell. |
| XintALIGNMENT_CENTER_MIDDLE | Value is to be justified horizontally at the center of the cell and vertically in the center of the cell. |
| XintALIGNMENT_END_MIDDLE | Value is to be justified horizontally at the right side of the cell and vertically in the center of the cell. |
| XintALIGNMENT_BEGINNING_BOTTOM | Value is to be justified in the lower left hand corner of the cell. |
| XintALIGNMENT_CENTER_BOTTOM | Value is to be justified horizontally in the center of the cell and vertically at the bottom of the cell. |
| XintALIGNMENT_END_BOTTOM | Value is to be justified in the lower right hand corner of the cell. |
The data_type can be one of the following:
| Defined Constant | Description |
|---|---|
| XintTYPE_DOUBLE | Values are double precision floating point numbers. |
| XintTYPE_FLOAT | Values are single precision floating point numbers. |
| XintTYPE_INTEGER | Values are integer numbers. |
| XintTYPE_LONG_INTEGER | Values are long integer numbers. |
| XintTYPE_SHORT | Values are short integer numbers. |
| XintTYPE_STRING | Values are character strings. |
| XintTYPE_POINTER | Values are pointers. |
The function which retrieves the column attributes is XintEditTableGetColumnAttrinutes.
Boolean XintEditTableDeleteColumns (...)
| Widget | widget | EditTable widget ID. |
| int | column | Index of the first column to delete. |
| int | num_columns | Number of columns to delete. |
This function returns False if the starting column index or number of columns is out of range. Otherwise, it returns True.
Boolean XintEditTableDeleteRows (...)
| Widget | widget | EditTable widget ID. |
| int | row | Index of the first row to delete . |
| int | num_rows | Number of rows to delete. |
This function returns False if the starting row index or number of rows is out of range. Otherwise, it returns True.
Boolean XintEditTableFillCell (...)
| Widget | widget | EditTable widget ID. |
| int | column | Index of the column containing the cell. |
| int | row | Index of the row containing the cell. |
| XtPointer | data_address | Address of the value for the cell (if data type is XintTYPE_POINTER, pass pointer value directly). |
This function returns False if the column index or row index is out of range or if the data_address is NULL. Otherwise, it returns True. This function will not work for the cell that is being edited. Use the resource XmNvalidateValueCallback to define a callback procedure that changes the value of the cell being edited.
You can use this function to set the annotation for a row in the table by specifying the defined constant XintROW_ANNOTATION for the value of column and setting data_address to the address of the memory space containing the new row annotation.
Warning: this function is slow and should not be used to update a whole table or a large portion a table. Use function XintEditTableFillCellNoUpdate instead.
Boolean XintEditTableFillCellNoUpdate (...)
| Widget | widget | EditTable widget ID. |
| int | column | Index of the column containing the cell. |
| int | row | Index of the row containing the cell. |
| XtPointer | data_address | Address of the value for the cell (if data type is XintTYPE_POINTER, pass pointer value directly). |
This function returns False if the column index or row index is out of range or if the data_address is NULL. Otherwise, it returns True. This function will not work for the cell that is being edited. Use the resource XmNvalidateValueCallback to define a callback procedure that changes the value of the cell being edited.
Boolean XintEditTableFillColumnAnnotation (...)
| Widget | widget | EditTable widget ID. |
| int | column | Index of the column whose annotation is to be changed. |
| char * | annotation_string | Character string containing the annotation for the column. |
This function returns False if column is out of range or if the column specified is frozen. Otherwise, it returns True.
Boolean XintEditTableFillColumnData (...)
| Widget | widget | EditTable widget ID. |
| int | column | Index of the column whose values are to be changed. |
| XtPointer | data_array | Array containing the new values for the cells in the specified column. |
This function returns False if the column index is out of range or if data_array is NULL. Otherwise, it returns True.
You can use this function to set the annotation for every row in the table by specifying the defined constant XintROW_ANNOTATION for the value of column and putting the row annotation strings in data_array.
Boolean XintEditTableFreezeColumn (...)
| Widget | widget | EditTable widget ID. |
| int | column | Index of the column to be frozen. |
This function returns False if the column number is out of range, if the column is already frozen or if the parent of widget is not an INT Scroll widget. Otherwise, it returns True.
Boolean XintEditTableFreezeRow (...)
| Widget | widget | EditTable widget ID. |
| int | row | Index of the row to be frozen. |
This function returns False if the row number is out of range, if the row is already frozen or if the parent of widget is not an INT Scroll widget. Otherwise, it returns True.
Boolean XintEditTableFreezeUpdate (...)
| Widget | widget | EditTable widget ID. |
| Boolean | state | True to freeze updates, False to calculate new geometry and redisplay. |
Pixel XintEditTableGetCellBackground (...)
| Widget | widget | EditTable widget ID. |
| int | column | Index of the column. |
| int | row | Index of the row. |
This function returns the color used for the background of the specified cell as a pixel value.
XtPointer XintEditTableGetCellData (...)
| Widget | widget | EditTable widget ID. |
| int | column | Index of the column containing the cell. |
| int | row | Index of the row containing the cell. |
This function returns NULL if the column index or row index is out of range or if the value of the cell is undefined. Otherwise, it returns a pointer to a copy of the cell's value, unless the value is a pointer type. In the case of a pointer type, e.g., String, the pointer itself is returned (and it points to the original cell value).
int XintEditTableGetCellFont (...)
| Widget | widget | EditTable widget ID. |
| int | column | Index of the column. |
| int | row | Index of the row. |
This function returns XintUNDEFINED_INTEGER if the row or column specification is out of range or if the font index assigned to the cell was not valid.
Pixel XintEditTableGetCellForeground (...)
| Widget | widget | EditTable widget ID. |
| int | column | Index of the column. |
| int | row | Index of the row. |
This function returns the pixel value used to paint the foreground of the specified cell.
Boolean XintEditTableGetCellGeometry (...)
| Widget | widget | EditTable widget ID. |
| int | column | Index of the column. |
| int | row | Index of the row. |
| int * | x | Returns the X-coordinate of the cell. |
| int * | y | Returns the Y-coordinate of the cell. |
| int * | width | Returns the cell's width in pixels. |
| int * | height | Returns the cell's height in pixels. |
This function returns False if the specified cell is out of range.
Boolean XintEditTableGetCellHeight (...)
| Widget | widget | EditTable widget ID. |
| int | index | Index of the row (column if table is transposed) containing the cell. |
| int * | height | Returns the height of the cell. |
This function returns False if the index specified is out of range.
Pixmap XintEditTableGetCellPixmap (...)
| Widget | widget | EditTable widget ID. |
| int | column | Index of the column. |
| int | row | Index of the row. |
This function returns XintUNDEFINED_PIXMAP if no pixmap is assigned to that cell or if the cell specification is out of range.
Boolean XintEditTableGetCellPointerPosition (...)
| Widget | widget | EditTable widget ID. |
| int * | column | Returns the index of the column where the cell pointer is located.. |
| int * | row | Returns the index of the row where the cell pointer is located.. |
Widget XintEditTableGetCellWidget (...)
| Widget | table | EditTable widget ID. |
| int | column | Returns the index of the column location of the widget. |
| int | row | Returns the index of the row location of the widget. |
Boolean XintEditTableGetCellWidth (...)
| Widget | table | EditTable widget ID. |
| int | index | Index of the column (row if table is transposed) containing the cell. |
| int * | width | Returns the width of the cell. |
This function returns False if the index specified is out of range.
Boolean XintEditTableGetColumnAttributes (...)
| Widget | table | EditTable widget ID. |
| int | column | Column index. |
| int * | size | Returns the number of cells in the column. |
| int * | edit_mode | Returns the column edit mode as one of the defined integer constants below. |
| int * | alignment | Returns the column alignment as one of the defined integer constants below. |
| int * | width | Returns the width of the column in the unit system specified by resource XmNcellSizeUnit. |
| int * | data_type | Returns the data type of the values in the cells of the column as one of the defined constants below. |
| char ** | data_format | Returns the format of the values in the cells of the column using a character string containing a C language format descriptor (such as "%d"). |
| char ** | annotation_string | Returns the character string that annotates the column. |
The edit_mode is returned as one of the following:
| Defined Constant | Description |
|---|---|
| XintCOLUMN_EDITABLE | Indicates that the values in the cells of the column are editable. |
| XintCOLUMN_NON_EDITABLE | Indicates that the values in the cells of the column are not editable. |
The data_type is returned as one of the following:
| Defined Constant | Description |
|---|---|
| XintTYPE_DOUBLE | Values are double precision floating point numbers. |
| XintTYPE_FLOAT | Values are single precision floating point numbers. |
| XintTYPE_INTEGER | Values are integer numbers. |
| XintTYPE_LONG_INTEGER | Values are long integer numbers. |
| XintTYPE_SHORT | Values are short integer numbers. |
| XintTYPE_STRING | Values are character strings. |
| XintTYPE_POINTER | Values are pointers. |
The alignment is returned as one of the following:
| Resource Value | Description |
|---|---|
| XintALIGNMENT_BEGINNING_TOP | Value is to be justified in the upper left hand corner of the cell. |
| XintALIGNMENT_CENTER_TOP | Value in each cell is to be justified horizontally in the center of the cell and vertically at the top of the cell. |
| XintALIGNMENT_END_TOP | Value in each cell is to be justified in the upper right hand corner of the cell. |
| XintALIGNMENT_BEGINNING_MIDDLE | Value in each cell is to be justified horizontally at the left side of the cell and vertically in the center of the cell. |
| XintALIGNMENT_CENTER_MIDDLE | Value in each cell is to be justified horizontally at the center of the cell and vertically in the center of the cell. |
| XintALIGNMENT_END_MIDDLE | Value in each cell is to be justified horizontally at the right side of the cell and vertically in the center of the cell. |
| XintALIGNMENT_BEGINNING_BOTTOM | Value in each cell is to be justified in the lower left hand corner of the cell. |
| XintALIGNMENT-_CENTER_BOTTOM | Value in each cell is to be justified horizontally in the center of the cell and vertically at the bottom of the cell. |
| XintALIGNMENT_END_BOTTOM | Value in each cell is to be justified in the lower right hand corner of the cell. |
To set the column attributes use function XintEditTableDefineColumnFormat.
XtPointer XintEditTableGetColumnData (...)
| Widget | table | EditTable widget ID. |
| int | column | Index of the column whose values are to be returned. |
| int * | size | Returns the number of elements in the array. |
This function returns NULL if the column index is out of range or if the column contains no data. Otherwise, it returns the address of the array.
XtPointer XintEditTableGetColumnUserData (...)
| Widget | widget | Widget ID of the EditTable. |
| int | column | Column number to retrieve the user data. |
int * XintEditTableGetFrozenColumns (...)
| Widget | table | EditTable widget ID. |
| int * | num_cols | Returns the number of columns in the frozen list. |
This function returns NULL if there are no frozen columns. Otherwise, it returns a pointer to the array of frozen column indices.
int * XintEditTableGetFrozenRows (...)
| Widget | table | EditTable widget ID. |
| int * | num_rows | Returns the number of rows in the frozen list. |
This function returns NULL if there are no frozen rows. Otherwise, it returns a pointer to the array of frozen row indices.
int * XintEditTableGetHiddenColumns (...)
| Widget | table | EditTable widget ID. |
| int * | num_cols | Returns the number of hidden columns. |
Argument num_cols is a pointer to an integer value, which contains on return the number of hidden columns. The function returns an array that contains the indices of the hidden columns or NULL if all the columns are visible. The array must be deallocated by the application after it is no longer needed.
int * XintEditTableGetHiddenRows (...)
| Widget | table | EditTable widget ID. |
| int * | num_rows | Returns the number of hidden rows. |
Argument num_rows is a pointer to an integer value, which contains on return the number of hidden rows. The function returns an array that contains the indices of the hidden rows or NULL if all the rows are visible. The array must be deallocated by the application after it is no longer needed.
Boolean XintEditTableGetSelectionByNumber (...)
| Widget | table | EditTable widget ID. |
| int | selection_number | Number of the selection for which we want information. |
| int * | col_start | The column start value for selection. |
| int * | num_cols | The number of columns in selection. |
| int * | row_start | The row start value for the selection. |
| int * | num_rows | The number of rows in the selection. |
| int * | selection_mode | the type of the selection. |
The function returns False if selection_number is invalid, or if no selection exists. Otherwise it returns True. The selection_mode is returned as one of the following constants:
| Defined Constant | Description |
|---|---|
| XintSELECT_CELL | Selection is a block of cells. |
| XintSELECT_ROW | Selection is a set of rows. |
| XintSELECT_COLUMN | Selection is a set of columns. |
| XintSELECT_NONE | No selection exists. |
int XintEditTableGetSelectionCount (Widget widget)
where widget is the widget ID of an EditTable widget. The functions returns the number of selections currently defined. This function returns 0 if there are no current selections.
Widget XintEditTableGetTextChild (...)
| Widget | table | EditTable widget ID. |
| int | child | Code referring to one of the text widgets in the EditTable widget. |
where widget is the widget ID of an EditTable widget and child is a constant, from the table below, which refers to one of the EditTable text widgets. The function returns the widget ID of the specified text widget.
| Defined Constant | Description |
|---|---|
| XintEDIT_TABLE_MAIN_TEXT | Refers to the text widget used in the main table. |
| XintEDIT_TABLE_FROZEN_COLUMN_TEXT | Refers to the text widget used to edit frozen columns. |
| XintEDIT_TABLE_FROZEN_ROW_TEXT | Refers to the text widget used to edit frozen rows. |
| XintEDIT_TABLE_FROZEN_CELLS_TEXT | Refers to the text widget used to edit frozen cells (intersection of frozen rows and frozen columns). |
Widget XintEditTableGetSubtable (...)
| Widget | table | EditTable widget ID. |
| int | subtable_code | Code referring to one of the subtables in the EditTable widget. |
The function returns the widget ID of the specified subtable if it exists. Argument subtable_code is specified as one of the following constants:
| Defined Constant | Description |
|---|---|
| XintEDIT_TABLE_FROZEN_COLUMN_SUBTABLE | Refers to the subtable of frozen columns. |
| XintEDIT_TABLE_FROZEN_ROW_SUBTABLE | Refers to the subtable of frozen rows. |
| XintEDIT_TABLE_FROZEN_INTERSECTION_SUBTABLE | Refers to the subtable in the intersection of the frozen rows and columns. |
| XintEDIT_TABLE_MAIN_SUBTABLE | Refers to the subtable of non-frozen cells. |
Boolean XintEditTableGetVisibleArea (...)
| Widget | table | EditTable widget ID. |
| int * | first_column | Returns the index of the first (leftmost) column. |
| int * | last_column | Returns the index of the last (rightmost) column. |
| int * | first_row | Returns the index of the first (top) row. |
| int * | last_row | Returns the index of the last (bottom) row. |
This function returns False if the widget argument is not an EditTable widget. Otherwise, it returns True.
Boolean XintEditTableInsertColumns (...)
| Widget | table | EditTable widget ID. |
| int | column | The column index of the column before which the columns will be inserted. |
| int | num_cols | The number of empty columns to be inserted. |
| char ** | annotation | Pointer to an array of character strings each of which contains the annotation for one of new columns. |
This function returns False if the specified column index is out of range. Otherwise, it returns True.
Boolean XintEditTableInsertRows (...)
| Widget | table | EditTable widget ID. |
| int | row | The row index of the row before which the new rows will be inserted. |
| int | num_rows | The number of rows to be inserted. |
This function returns False if the specified row index is out of range. Otherwise, it returns True.
Boolean XintEditTableIsCellDefined (...)
| Widget | table | EditTable widget ID. |
| int | column | The column index of the cell of interest. |
| int | row | The row index of the cell of interest. |
Boolean XintEditTableIsColumnFrozen (...)
| Widget | table | EditTable widget ID. |
| int | column | The index of the column of interest. |
Boolean XintEditTableIsRowFrozen (...)
| Widget | table | EditTable widget ID. |
| int | row | The index of the row of interest. |
Boolean XintEditTableIsColumnHidden (...)
| Widget | table | EditTable widget ID. |
| int | column | The index of the column of interest. |
Boolean XintEditTableIsRowHidden (...)
| Widget | table | EditTable widget ID. |
| int | row | The index of the row of interest. |
Boolean XintEditTableOutputAscii (...)
| Widget | table | EditTable widget ID. |
| char * | filename | Character string specifying the output file name. |
| int | col_start | Column index of the first column containing cell values to be output. |
| int | col_end | Column index of the last column containing cell values to be output. |
| int | row_start | Row index of the first row containing cell values to be output. |
| int | row_end | Row index of the last row containing cell values to be output. |
| char | delimiter | Character to be inserted between values in a row (e.g. `,`). |
This function returns False if the file is not opened successfully or if any of the row or column indices are out of range. Otherwise, it returns True. See function XintEditTableReadAscii for a description of the ASCII file format.
Boolean XintEditTableOutputPostscript (...)
| Widget | widget | EditTable widget ID. |
| char * | filename | Character string specifying the output file name. |
| int | color_mode | Specify XintMONOCHROME for a black and white printer and XintCOLOR for a color printer. |
| float | scale | Specifies the scale factor for the output image |
| int | col_start | Column index of the first column containing cell values to be output. |
| int | col_end | Column index of the last column containing cell values to be output. |
| int | row_start | Row index of the first row containing cell values to be output. |
| int | row_end | Row index of the last row containing cell values to be output. |
The scale argument in the function call specifies the scaling that will be applied to the table to produce the output hardcopy display. A value of zero (0) causes the total set of selected cells to be scaled to fit the page. This means that all of the cells in the range of col_start to col_end and row_start to row_end will be displayed on a single sheet of paper. A value of one (1) causes the output cells to be displayed at their screen size. If a cell measures 1-inch by 3-inches on the screen, it will have those same dimensions on the output display. In general (and depending on the number of cells defined by the column and row ranges), a scale value of 1 will generate more than one page of output. Larger scale values create proportionately greater than screen size displays; while values between 0 and 1 cause the display to be scaled to less than screen size. Remember that the range of cells to be displayed may be significantly greater than the amount of the table that is visible in the viewport on the screen.
This function returns False if the file is not opened successfully or if any of the row or column indices are out of range. Otherwise, it returns True.
The XintOutputPostscript function provides a more general hardcopy capability for any widget instance derived from the CompBase widget class. It is described in that section.
Boolean XintEditTableOutputSimplePS (...)
| Widget | widget | Widget ID of the EditTable. |
| char * | filename | Name of output PostScript file. |
| int | orientation | Orientation of output. Use the constant of either XintORIENTATION_LANDSCAPE or XintORIENTATION_PORTRAIT. |
| int | start_column | Starting column for output to PostScript. |
| int | end_column | Ending column for output to PostScript. |
| int | start_row | Starting row for output to PostScript. |
| int | end_row | Ending row for output to PostScript. |
Returns False if widget is not a valid EditTable, if the column/row ranges are not valid, or if the filename cannot be written to. Returns True, o therwise.
Boolean XintEditTableOutputSimplePS2 (...)
| Widget | widget | Widget ID of the EditTable. |
| char * | filename | Name of output PostScript file. |
| int | orientation | Orientation of output. Use the constant of either XintORIENTATION_LANDSCAPE or XintORIENTATION_PORTRAIT. |
| double | scale | Scale to use for output to PostScript. Using a scale of 0 will fit the output EditTable to one page. |
| int | start_column | Starting column for output to PostScript. |
| int | end_column | Ending column for output to PostScript. |
| int | start_row | Starting row for output to PostScript. |
| int | end_row | Ending row for output to PostScript. |
Returns False if widget is not a valid EditTable, if the column/row ranges are not valid, or if the filename cannot be written to. Returns True, o therwise.
Boolean XintEditTableOutputSylkFile (...)
| Widget | widget | EditTable widget ID. |
| char * | filename | Character string specifying the output file name. |
| int | col_start | Column index of the first column containing cell values to be output. |
| int | col_end | Column index of the last column containing cell values to be output. |
| int | row_start | Row index of the first row containing cell values to be output. |
| int | row_end | Row index of the last row containing cell values to be output. |
| char * | font_name | Character string specifying the name of the font to be used in the output file. |
This function returns False if the file is not opened successfully or if any of the row or column indices are out of range. Otherwise, it returns True.
Boolean XintEditTablePasteColumns (...)
| Widget | widget | EditTable widget ID. |
| int | column | The column index of the column whose values will be replaced by the values of the column on the clipboard. |
| int | conversion | Specify the type of conversion performed on the data by using one of the defined integer constants below. |
where conversion is specified as one of the following:
| Defined Constant | Description |
|---|---|
| XintCONVERSION | Indicates that the values should be converted (e.g. "123" becomes the integer value 123). |
| XintNO_CONVERSION | Indicates that no conversion is to be performed. Function will return False on data type mismatch. |
| XintTYPE_CAST | Indicates that the values should be type cast (e.g. "123" becomes (int) "123"). |
This function returns False if the specified column index is out of range or if there is a data type mismatch when conversion is set to XintNO_CONVERSION. Otherwise, it returns True.
Boolean XintEditTablePSReportStyle (...)
| Widget | table | EditTable widget ID. |
| EditTableReportRange * | range | Pointer to the EditTableReportRange structure that specifies the range to be generated. |
| EditTableReportLayout * | layout | Pointer to the EditTableReportLayout structure that specifies the layout of the report. |
| EditTableReportAttributes * | attributes | Pointer to the EditTableReportAttributes that specifies the page attributes of the report. |
| char * | filename | The output filename. |
This function returns False if the widget is not an EditTable widget or if there exists a column/row whose width/height is greater than the page width or page height. It is the programmer's responsibility to free the parameters (range, layout, attributes) after completion. The structures used by this function are as follows:
typedef struct {
int column_start, column_end, row_start, row_end;
} EditTableReportRange;
Where the structure variables are:
| Member | Description |
|---|---|
| column_start | Starting column in the range of cells. |
| column_end | Ending column in the range of cells. |
| row_start | Starting row in the range of cells. |
| row_end | Ending row in the range of cells. |
typedef struct {
int orientation, processing_direction;
} EditTableReportLayout;
Where the structure variables are:
| Member | Description |
|---|---|
| orientation | Specifies the orientation of the page. The user can specify any one of the constants shown in the first Constant's table below. |
| processing_direction | Specifies the page stacking order. The user can specify any one of the constants shown in the second Constant's table below. |
| Defined Constant | Description |
|---|---|
| XintORIENTATION_PORTRAIT | Specifies the portrait orientation. |
| XintORIENTATION_LANDSCAPE | Specifies the landscape orientation. |
| Defined Constant | Description |
|---|---|
| XintFROM_L_TO_R | Specifies to process the table from left to right. In other words, process the table in terms of columns. |
| XintFROM_T_TO_B | Specifies to process the table from top to bottom. In other words, process the table in terms of rows. |
typedef struct {
int show_on_page;
String string;
String font;
int placement;
int alignment;
} FieldAttr;
typedef struct {
FieldAttr title;
FieldAttr horz_annotation;
FieldAttr vert_annotation;
FieldAttr page_number;
String table_text_font;
int table_text_alignment;
} EditTableReportAttributes;
Where the variables of structure FieldAttr are:
| Member | Description |
|---|---|
| show_on_page | Indicates whether to show on every page or just the front page. The user can specify one of the constants in the Constants table below. |
| string | The actual string in the report. |
| font | The actual font string to be used in the report. |
| placement | Specifies the placement of the EditTableReportAttributes members. The user can specify one of the constants in the Constants table below. |
| alignment | Specifies the alignment of the EditTableReportAttributes members. The user can specify one of the constants in the Constants table below. |
The constants available for members of the FieldAttr structure are:
| Defined Constant | Description |
|---|---|
| XintALL_PAGES | Constant value for show_on_page variable in structure FieldAttr. Indicates user wishes to show attribute on all pages in the report. |
| XintFRONT_PAGE_ONLY | Constant value for show_on_page variable in structure FieldAttr. Indicates user wishes to show attribute on front page only. |
| XintPLACEMENT_NONE | Constant value for placement variable. Indicates not to place the attribute on the page. |
| XintPLACEMENT_TOP | Constant value for placement variable. Indicates to place the attributes above the report content. |
| XintPLACEMENT_BOTTOM | Constant value for placement variable. Indicates to place the attributes below the report content. |
| XintPLACEMENT_TOP_BOTTOM | Constant value for placement variable. Indicates to place the attributes both above and below the report content. |
| XintPLACEMENT_LEFT | Constant value for placement variable. Indicates to place the attributes to the left of the report content. |
| XintPLACEMENT_RIGHT | Constant value for placement variable. Indicates to place the attributes to the right of the report content. |
| XintPLACEMENT_LEFT_RIGHT | Constant value for placement variable. Indicates to place the attributes both left and right of the report content. |
| XintALIGNMENT_BEGINNING | Constant value for alignment variable. Indicates to align the string starting from the left border of a cell. |
| XintALIGNMENT_CENTER | Constant value for alignment variable. Indicates to align the string at the center of a cell. |
| XintALIGNMENT_END | Constant value for alignment variable. Indicates to align the string ending at the right border of a cell. |
Where the variables of structure EditTableReportAttributes are:
| Member | Description |
|---|---|
| title | Title specification. |
| horz_annotation | Specifies the horizontal annotation. |
| vert_annotation | Specifies the vertical annotation. |
| page_number | Page number specification. |
| table_text_font | Specifies the text font for the report, if other than the default table font. |
| table_text_alignment | Specifies the text alignment for the report, if other than the default table text alignment. |
Boolean XintEditTablePasteRows (...)
| Widget | widget | EditTable widget ID. |
| int | row | The row index of the row where the paste will begin. |
This function returns False if the specified row index is out of range.
Boolean XintEditTableReadAscii (...)
| Widget | widget | EditTable widget ID. |
| char * | filename | The name of the ASCII file. |
| Boolean | resize | The EditTable widget will resize itself to match the size of the input dataset if resize is True. Otherwise, the table size will remain unchanged. In that case, if the dataset is larger than the table, the extra values are ignored, and if the table is larger than the dataset, the remaining table cells will be left unchanged. |
This function returns False if it cannot open the specified file.
Each line in the ASCII file corresponds to a row in the table. The default delimiter is a tab. If no tab is found in the first line, the widget will try a comma as the delimiter. If no comma is found, it will try a space. You can also explicitly specify the character to use as the delimiter by inserting the following command at the beginning of the file:
#DELIMITER = `delimiter'
where delimiter is the character to use as the delimiter. The file format supports missing values. A missing value is simply omitted and its following delimiter is supplied in its place. To specify the column annotation from the ASCII file, insert the following command at the beginning of the file:
#COLUMN ANNOTATION
This command specifies that the first row of data should be used as the column annotation. To specify the row annotation from the ASCII file, insert the following command at the beginning of the file.
#ROW ANNOTATION
This command specifies that the first value of each row is to be used as the row annotation for that line. An example of a valid ASCII file follows (Note - the entry for row 3, column 3 is missing):
#DELIMITER=',' #COLUMN ANNOTATION #ROW ANNOTATION Houston,Dallas,San Antonio,Austin QTR 1,12.5,21.4,34.6,12.6 QTR 2,11.5,22.6,41.4,14.8 QTR 3,14.1,27.6,,19.5 QTR 4,19.5,28.5,43.5,25.1
Boolean XintEditTableReleaseColumn (...)
| Widget | widget | EditTable widget ID. |
| int | column | The index of the frozen column to be released. |
This function returns False if the specified column index is out of range or if the column is not frozen. Otherwise, it returns True.
Boolean XintEditTableReleaseRow (...)
| Widget | widget | EditTable widget ID. |
| int | row | The index of the frozen row to be released. |
This function returns False if the specified row index is out of range or if the row is not frozen. Otherwise, it returns True.
Boolean XintEditTableReorderColumns (...)
| Widget | widget | EditTable widget ID. |
| int | col_start | The column index of the first column to be reordered. |
| int | col_end | The column index of the last column to be reordered. |
| int * | order | Pointer to an integer array containing the column indices in a different order. |
This function returns False if the specified columns could not be reordered.
Boolean XintEditTableReorderRows (...)
| Widget | widget | EditTable widget ID. |
| int | row_start | The row index of the first column to be reordered. |
| int | row_end | The column index of the last row to be reordered. |
| int * | order | Pointer to an integer array containing the row indices in a different order. |
This function returns False if the specified rows could not be reordered.
Boolean XintEditTableRemoveAllLocalCallbacks (...)
| Widget | widget | EditTable widget ID. |
| char * | callback_name | A callback resource name defined by the EditTable widget. |
The function returns False if callback_name is not a valid callback resource name.
Boolean XintEditTableRemoveLocalCallback (...)
| Widget | widget | EditTable widget ID. |
| int | col | Index of the column where local callback is registered. |
| int | row | Index of the row where local callback is registered. |
| char * | callback_name | Name of the callback to remove. |
| XtCallbackProc | callback_proc | Callback procedure to remove. |
| XtPointer | client_data | Client data attached to callback_proc. |
This function returns False if the specified column or row indices are out of range or if the name of the callback is invalid.
void XintEditTableRowScroll (...)
| Widget | widget | EditTable widget ID. |
| int | scroll_operation | Specifies the direction and amount of scrolling. |
The operation argument must be one of the following:
| Defined Constant | Description |
|---|---|
| XintDECREMENT | To scroll one row up. |
| XintINCREMENT | To scroll one row down. |
| XintPAGE_DECREMENT | To scroll one page up. |
| XintPAGE_INCREMENT | To scroll one page down. |
| XintTO_FIRST | To scroll back to the first row. |
| XintTO_LAST | To scroll to the last row. |
Boolean XintEditTableSetCellBackground (...)
| Widget | widget | EditTable widget ID. |
| int | col_start | The index of the starting column. |
| int | num_cols | Number of columns. |
| int | row_start | The index of the starting row. |
| int | num_rows | The number of rows. |
| Pixel | pixel | The pixel value used to draw the cell background. |
The function returns False if the cell specification is out of range. Otherwise, it returns True.
Boolean XintEditTableSetCellDisplayAttributes (...)
| Widget | widget | EditTable widget ID. |
| int | col_start | The index of the starting column. |
| int | num_cols | Number of columns. |
| int | row_start | The index of the starting row. |
| int | num_rows | The number of rows. |
| Pixel | background | The background color of the cells. |
| Pixel | foreground | The foreground color of the cells. |
| XtPointer | data_addr | Address of the value for the cell (if data type is XintTYPE_POINTER, pass pointer value directly). |
The function returns False if the widget is not an EditTable widget.
Boolean XintEditTableSetCellFont (...)
| Widget | widget | EditTable widget ID. |
| int | col_start | The index of the starting column. |
| int | num_cols | Number of columns. |
| int | row_start | The index of the starting row. |
| int | num_rows | The number of rows. |
| int | index | The index of the font into the font table (starts at 0). Specify -1 to use the default table font. |
The function returns False if the cell specification is out of range. Otherwise, it returns True.
Boolean XintEditTableSetCellForeground (...)
| Widget | widget | EditTable widget ID. |
| int | col_start | The index of the starting column. |
| int | num_cols | Number of columns. |
| int | row_start | The index of the starting row. |
| int | num_rows | The number of rows. |
| Pixel | pixel | The pixel value used to draw the cell foreground. |
The function returns False if the cell specification is out of range. Otherwise, it returns True.
Boolean XintEditTableSetCellHeight (...)
| Widget | widget | EditTable widget ID. |
| int | index_start | The index of the starting row (column if table is transposed). |
| int | num_units | Number of rows (columns if table is transposed) to change. |
| int | height | The height specification. |
The function returns False if the index specification is out of range. Otherwise, it returns True.
Boolean XintEditTableSetCellPixmap (...)
| Widget | widget | EditTable widget ID. |
| int | col_start | The index of the starting column. |
| int | num_cols | Number of columns. |
| int | row_start | The index of the starting row. |
| int | num_rows | The number of rows. |
| Pixmap | pixmap | The pixmap ID. Specify XintUNDEFINED_PIXMAP to have no pixmap drawn in the background. |
The function return False if the cell specification is out of range. Otherwise, it returns True.
Boolean XintEditTableSetCellPixmapList (...)
| Widget | widget | EditTable widget ID. |
| int | col_start | The index of the starting column. |
| int | num_cols | Number of columns. |
| int | row_start | The index of the starting row. |
| int | num_rows | The number of rows. |
| Pixmap * | pixmap_list | The list of pixmap IDs stored column wise. There must exactly the same number of pixmaps in the list as cells specified. Specify XintUNDEFINED_PIXMAP to have no pixmap drawn in the background of a cell. |
The function return False if the cell specification is out of range. Otherwise, it returns True.
Boolean XintEditTableSetCellPointerPosition (...)
| Widget | widget | EditTable widget ID. |
| int | col | The column index of the cell in which to position the cell pointer. |
| int | row | The row index of the cell in which to position the cell pointer. Specify -1 to have the cell pointer disappear. |
The function returns False if the cell location is out of range. Otherwise, it returns True.
Boolean XintEditTableSetCellWidth (...)
| Widget | widget | EditTable widget ID. |
| int | index_start | The index of the starting column (row if table is transposed). |
| int | num_units | Number of columns (rows if table is transposed) to change. |
| int | width | The width specification. |
The function return False if the index specification is out of range. Otherwise, it returns True.
Boolean XintEditTableSetColumnFont (...)
| Widget | widget | EditTable widget ID. |
| int | col_start | Starting column number. |
| int | num_cols | Number of columns. |
| int | font_index | Specifies an index into the font table (starts at 0). Specify -1 to use the default font. |
The function returns NULL if the column specification is out of range.
Boolean XintEditTableSetColumnUserData (...)
| Widget | widget | Widget ID of the EditTable. |
| int | column | Column number to store the user data. |
| XtPointer | user_data | Pointer to user data. |
The function returns False if widget is not a valid EditTable or if the column does not exist. Returns True, otherwise.
Boolean XintEditTableSetListBehavior (...)
| Widget | widget | EditTable widget ID. |
| int | policy | Specifies the selection policy. |
The policy argument must include one of the following:
| Defined Constant | Description |
|---|---|
| XmSINGLE_SELECT | Select one row at a time. |
| XmMULTIPLE_SELECT | Allows multiple rows selection. |
| XmEXTENDED_SELECT | Allows extended rows selection. |
| XmBROWSE_SELECT | Allows single selection with the "draw and browse" functionality. |
Specifying one of the above arguments will make the table read only. To restore the table back to its default behavior, call the function again with any integer value other than 0 thru 3. The function returns False if the widget is not an EditTable widget.
Boolean XintEditTableSetRowFont (...)
| Widget | widget | EditTable widget ID. |
| int | row_start | Starting row number. |
| int | num_rows | Number of rows. |
| int | font_index | Specifies an index into the font table (starts at 0). Specify -1 to use the default font. |
The function returns NULL if the row specification is out of range.
Boolean XintEditTableSetSelection (...)
| Widget | widget | EditTable widget ID. |
| int | col_start | Starting column number. |
| int | num_cols | Number of columns. |
| int | row_start | Starting row number. |
| int | num_rows | Number of rows. |
| int | selection_mode | Specifies if selection is for a set of cells, rows or columns. |
The selection_mode argument must include one of the following:
| Defined Constant | Description |
|---|---|
| XintSELECT_CELL | Selection is a block of cells. |
| XintSELECT_ROW | Selection is a set of rows. |
| XintSELECT_COLUMN | Selection is a set of columns. |
In addition, if the callback is NOT to be called, include the XintNO_CALLBACK constant by using bit-wise OR , as illustrated below.
XintEditTableSetSelection(table, 1, 2, 1, 10, XintSELECT_CELL | XintNO_CALLBACK);
int * XintEditTableSortByColumn (...)
| Widget | widget | EditTable widget ID. |
| int | column | The column to be sorted. |
| int(*)() | comparitor | The comparitor function pointer. |
The function returns NULL if the widget is not an EditTable widget. Otherwise, it returns the sorted row index array of the specified column.
Boolean XintEditTableUndeleteColumns (Widget widget)
where widget is the widget ID of a EditTable widget. This function returns True if the deleted columns were restored successfully to the table. Otherwise, it returns False.
Boolean XintEditTableUndeleteRows (Widget widget)
where widget is the widget ID of a EditTable widget. This function returns True if the deleted rows were restored successfully to the table. Otherwise, it returns False.
The table should be frozen (using function XintEditTableFreezeUpdate) when several cell attributes are to be changed, such as changing both the foreground and background colors. Freezing the table prevents the cell from being re-drawn after each individual change. Of course, if only a single attribute is changed, freezing is unnecessary.
Using this function together with XintEditTableUpdateDataDisplay is more efficient than calling the XintEditTableFreezeUpdate function with the state argument set to False, because the application can control more precisely which part of the table to re-draw. However, this function should only be used when the changes made do not affect the geometry.
Boolean XintEditTableUnfreeze (...)
| Widget | table | EditTable widget ID. |
This function returns False if the table argument is not an EditTable widget. Otherwise, it returns True.
Boolean XintEditTableUpdateDataDisplay (...)
| Widget | widget | EditTable widget ID. |
| int | column | Index of the cell or column to be updated. |
| int | row | Index of the cell or row to be updated. |
This function returns False if the specified column or row indices are out of range. Otherwise, it returns True.