EditTable Functions


Defined Functions

The following convenience functions are defined for creating and manipulating an EditTable widget:

Function NameDescription
XintCreateEditTableCreates an unmanaged EditTable widget.
XintEditTableAbandonEditTo abandon editing of the current cell and restore the original value.
XintEditTableAddLocalCallbackAdds a callback procedure that is local to a cell, row or column.
XintEditTableAddToSelectionAdds a selection to the table.
XintEditTableAssociateDataAssociates a Data Object with an EditTable.
XintEditTableCellFlashMakes a cell flash at a specified time interval over a specified period of time.
XintEditTableCellSpanGetRangeReturns the span for the specified cell.
XintEditTableCellSpanSetRangeSets the span on a range of cells.
XintEditTableChangeColumnVisibilitySets a range of columns to be visible or non visible.
XintEditTableChangeRowVisibilitySets a range of rows to be visible or non visible.
XintEditTableClearAllSelectionsClears all the selections of a table.
XintEditTableClearCellsClears the content of the specified cells.
XintEditTableClearSelectionByNumberRemoves a specific selection.
XintEditTableColumnScrollControls scrolling of columns.
XintEditTableConfirmEditTo confirm the editing of the current cell and invoke callback XmNvalidateValueCallback.
XintEditTableCopyColumnCopies a single column to the EditTable widget's clipboard.
XintEditTableCopyRowsCopies a range of rows to the EditTable widget's clipboard.
XintEditTableDefineColumnFormatDefines the format of the cells in a specified column.
XintEditTableDeleteColumnsCopies a range of columns to the EditTable widget's clipboard and removes the columns from the table.
XintEditTableDeleteRowsCopies a range of rows to the EditTable widget's clipboard and removes the columns from the table.
XintEditTableFillCellSets the value of a specified cell.
XintEditTableFillCellNoUpdateSets the value of a specified cell without updating the display.
XintEditTableFillColumnAnnotationSets the column annotation for a specified column.
XintEditTableFillColumnDataSets the values of every cell in a specified column using an array of data.
XintEditTableFreezeColumnMoves a specified column to the left side of the table display so that it always stays visible when scrolling horizontally.
XintEditTableFreezeRowMoves a specified row to the top of the table display so that it always stays visible when scrolling vertically.
XintEditTableFreezeUpdateTo enable or disable geometry updates and redrawing on the table.
XintEditTableGetCellBackgroundReturns the background pixel color of a specified cell.
XintEditTableGetCellDataReturns the address of a copy of the value in a specified cell.
XintEditTableGetCellFontReturns the font index used by a cell.
XintEditTableGetCellForegroundReturns the foreground pixel color of a specified cell.
XintEditTableGetCellGeometryReturns the position and size of a cell inside the EditTable widget.
XintEditTableGetCellHeightReturns the height of the specified cell.
XintEditTableGetCellPixmapReturns the pixmap ID of a cell.
XintEditTableGetCellPointerPositionReturns the location of the cell pointer.
XintEditTableGetCellWidgetReturns the cell widget for the specified location.
XintEditTableGetCellWidthReturns the width of the specified cell.
XintEditTableGetColumnAttributesReturns the attributes of a specified column.
XintEditTableGetColumnDataReturns the address of a copy of an array containing the values in the cells of a specified column.
XintEditTableGetColumnUserDataReturns a pointer to a column's user data.
XintEditTableGetFrozenColumnsReturns the address of an integer array containing the column numbers of the frozen columns.
XintEditTableGetFrozenRowsReturns the address of an integer array containing the row numbers of the frozen rows.
XintEditTableGetHiddenColumnsReturns the columns that are not visible.
XintEditTableGetHiddenRowsReturns the rows that are not visible.
XintEditTableGetSelectionByNumberExtracts a specific selection from the table.
XintEditTableGetSelectionCountReturns the number of selections in the table.
XintEditTableGetSubtableReturns the ID of a specific subtable.
XintEditTableGetTextChildReturns the ID of the text widget used to edit a cell content.
XintEditTableGetVisibleAreaPasses back the visible area of the table.
XintEditTableInsertColumnsInserts a specified number of annotated columns before a specified column.
XintEditTableInsertRowsInserts a specified number of non-annotated rows before a specified row.
XintEditTableIsCellDefinedTells if a cell is defined or not.
XintEditTableIsColumnFrozenTells if a column is frozen or not.
XintEditTableIsRowFrozenTells if a row is frozen or not.
XintEditTableIsColumnHiddenTells if a column is hidden or not.
XintEditTableIsRowHiddenTells if a row is hidden or not.
XintEditTableOutputAsciiCreates an ASCII formatted file based on a specified range of cells in a table.
XintEditTableOutputPostscriptCreates a PostScript file based on a specified range of cells in the table.
XintEditTableOutputSimplePSOutput of PostScript file carries only the Courier-10 font and ignores all but left and middle alignment.
XintEditTableOutputSimplePS2Output of PostScript file uses fonts and alignments set in EditTable.
XintEditTableOutputSylkFileCreates a SYLK formatted file based on a specified range of cells in the table.
XintEditTablePSReportStyleCreates a Postscript formatted report based on a specified range of cells in the table.
XintEditTablePasteColumnsReplaces the values in a specified range of columns by a range of columns contained on the EditTable widget's clipboard.
XintEditTablePasteRowsReplaces the values in a specified range of rows by a range of rows contained on the EditTable widget's clipboard.
XintEditTableReadAsciiReads an ASCII file and loads the data.
XintEditTableReleaseColumnChanges a frozen column's state so that it is no longer frozen.
XintEditTableReleaseRowChanges a frozen row's state so that it is no longer frozen.
XintEditTableReorderColumnsChanges the ordering of a range of columns.
XintEditTableReorderRowsChanges the ordering of a range of rows.
XintEditTableRemoveAllLocalCallbacksRemoves all local callback procedures attached to a specified callback.
XintEditTableRemoveLocalCallbackRemoves a local callback procedure attached to a cell, row or column.
XintEditTableRowScrollAllows the application to control scrolling or rows.
XintEditTableSetCellBackgroundSets the background color of a specified set of cells.
XintEditTableSetCellDisplayAttributesSets the background, foreground, and data of a specified cell.
XintEditTableSetCellFontSets the font of a range of cells.
XintEditTableSetCellForegroundSets the foreground color of a specified set of cells.
XintEditTableSetCellHeightSets the height of a range of cells.
XintEditTableSetCellPixmapSets the background pixmap of a specified set of cells.
XintEditTableSetCellPixmapListSets the background pixmap of a set of cells from a pixmap list.
XintEditTableSetCellPointerPositionSpecifies the cell location at which to position the cell pointer.
XintEditTableSetCellWidthSets the width of a range of cells.
XintEditTableSetColumnFontSets the font of a specified column.
XintEditTableSetColumnUserDataAssigns user data to a specific column.
XintEditTableSetListBehaviorSimulates the XmList behavior.
XintEditTableSetRowFontSets the font of a specified row.
XintEditTableSetSelectionCauses a specified range of cells, rows or columns to be selected.
XintEditTableSortByColumnThis function allows the user to sort rows in the specified column.
XintEditTableUndeleteColumnsCauses the last column delete operation to be reversed so that the columns are not deleted.
XintEditTableUndeleteRowsCauses the last row delete operation to be reversed so that the rows are not deleted.
XintEditTableUnfreezeUnfreezes the table.
XintEditTableUpdateDataDisplayCauses the EditTable widget to update the display of a cell, row or column.


XintCreateEditTable

XintCreateEditTable creates an unmanaged EditTable widget.

     Widget XintCreateEditTable (...)

WidgetparentParent of new EditTable widget.
char *nameName of new EditTable widget.
ArgListarglistList of resource/value items.
CardinalargcountNumber of items in arglist.


XintEditTableAbandonEdit

This function cancels the editing of the current cell and restores the original cell value. This function is called by action TextAbandonEdit.

     void XintEditTableAbandonEdit (Widget widget)

where widget is the ID of an EditTable widget.


XintEditTableAddLocalCallback

This function adds a callback procedure that is local to a cell, row or column.

     Boolean XintEditTableAddLocalCallback (...)

WidgetwidgetEditTable widget ID.
intcolumnColumn number (specify 0 to register the callback for all columns).
introwRow number (specify 0 to register the callback for all rows).
char *callback_nameCallback name (must be a cell, row or column callback defined by EditTable).
XtCallbackProccallbackCallback procedure.
XtPointerclient_dataClient data for callback procedure.
intcalling_sequenceSpecifies 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 ConstantDescription
XintLOCAL_CALLBACK_EXCLUSIVELocal callback is called instead of normal callback.
XintLOCAL_CALLBACK_BEFORELocal callback is called before.
XintLOCAL_CALLBACK_AFTERLocal callback is called after.


XintEditTableAddToSelection

This function adds a selection to the current selection. The selection can be specified as a set of cells, columns or rows.

     Boolean XintEditTableAddToSelection (...)

WidgetwidgetEditTable widget ID.
intcol_startStarting column number.
intnum_colsNumber of columns.
introw_startStarting row number.
intnum_rowsNumber of rows.
intselection_modeSpecifies if selection is for a set of cells, rows or columns.

The selection_mode argument must be one of the following:

Defined ConstantDescription
XintSELECT_CELLSelection is a block of cells.
XintSELECT_ROWSelection is a set of rows.
XintSELECT_COLUMNSelection is a set of columns.


XintEditTableAssociateData

This function is only available when the EditTable widget is used in conjunction with ChartObject. If you are not using ChartObject, you may want to ignore this function. XintEditTableAssociateData provides a mechanism to associate a data object (usually a DataGroup object) with an EditTable widget. This function handles a DataGroup object as follows:

  1. If a DataLabel object oriented along the X direction is found, it is used to provide column annotation.
  2. If a DataLabel object oriented along the Y direction is found, it is used to provided row annotation.
  3. Each DataSampled found is used to fill a column.

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 (...)

WidgetwidgetEditTable widget ID.
ObjectdataData object to associate with the table.
intcol_startFirst column where to position the data.
introw_startFirst row where to position the data.
BooleanlinkedIf 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).


XintEditTableCellFlash

This function will make the specified cell flash at a specified rate (in unit milliseconds), over a specified period of time (in unit seconds).

     Boolean XintEditTableCellFlash (...) 

WidgetwidgetEditTable widget ID.
intcolumnColumn location of the cell.
introwRow location of the cell.
longintervalFlashing rate in unit milliseconds.
longdurationFlashing time period in unit seconds.
PixelcolorSpecifies 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.


XintEditTableCellSpanGetRange

This function returns the cell span factor for the specified cell.

     void XintEditTableCellSpanGetRange (...)

WidgettableEditTable widget ID.
introwRow location of the cell.
intcolumnColumn location of the cell.
XintCellSpanFactor *factorPointer to the structure containing the span data.


XintEditTableCellSpanSetRange

This function will set the cell span factor for all of the cells within the designated row/column range.

     void XintEditTableCellSpanSetRange  (...)

WidgettableEditTable widget ID.
intcolumnFirst column in the range of columns to be selected.
introwFirst row in the range of rows to be selected.
intcolumnsNumber of columns in the range.
0 = all columns following the starting column.
introwsNumber of rows in the range.
0 = all rows following the starting row.
XintCellSpanFactor *factorPointer to the structure containing the span data.


XintEditTableChangeColumnVisibility

This function turns on or off the visibility of a range of columns.

     Boolean XintEditTableChangeColumnVisibility (...)

WidgetwidgetEditTable widget ID.
intcol_startFirst column to update.
intcol_endLast column to update.
BooleanvisibleTrue if column is to be made visible; False if column is to be made invisible (i.e., hidden).


XintEditTableChangeRowVisibility

This function turns on or off the visibility of a range of rows.

     Boolean XintEditTableChangeRowVisibility (...)

WidgetwidgetEditTable widget ID.
introw_startFirst row to update.
introw_endLast row to update.
BooleanvisibleTrue if row is to be made visible; False if row is to be made invisible (i.e., hidden).


XintEditTableClearAllSelections

This functions clears all existing selections.

     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.


XintEditTableClearCells

This function clears the content of the specified cells.

     Boolean XintEditTableClearCells (...)

WidgetwidgetEditTable widget ID.
intcol_startStarting column number.
intcol_endEnding column number.
introw_startStarting row number.
introw_endEnding row number.


XintEditTableClearSelectionByNumber

This function clears a specific selection. False is returned if selection_number is invalid.

     Boolean XintEditTableClearSelectionByNumber (...)

WidgetwidgetEditTable widget ID.
intselection_numberNumber of the selection to clear.


XintEditTableColumnScroll

This function causes an EditTable widget to scroll the displayed table.

     void XintEditTableColumnScroll (...)

WidgetwidgetEditTable widget ID.
intoperationSpecifies the direction and amount of scrolling.

The operation argument must be one of the following:

Defined ConstantDescription
XintDECREMENTScroll one column left.
XintINCREMENTScroll one column right.
XintPAGE_DECREMENTScroll one page left.
XintPAGE_INCREMENTScroll one page right.
XintTO_FIRSTScroll back to the first column.
XintTO_LASTScroll to the last column.


XintEditTableConfirmEdit

This function allows the confirmation of the editing of the current cell and the invocation of the callback XmNvalidateValueCallback. This function is invoked by action TextConfirmEdit.

     void XintEditTableConfirmEdit (Widget widget)

where widget is the ID of an EditTable widget.


XintEditTableCopyColumn

This function copies a specified column to the EditTable widget's clipboard.

     Boolean XintEditTableCopyColumn (...)

WidgetwidgetEditTable widget ID.
intcolumnColumn index.

This function returns False if the column index is out of range. Otherwise, it returns True.


XintEditTableCopyRows

This function copies a specified range of rows to the EditTable widget's clipboard.

     Boolean XintEditTableCopyRows (...)

WidgetwidgetEditTable widget ID.
introwRow index of the first row to copy.
intnum_rowsNumber of rows to copy including the first row.


XintEditTableDefineColumnFormat

This function defines the attributes of a specified column.

     Boolean XintEditTableDefineColumnFormat (...)

WidgetwidgetEditTable widget ID.
intcolumnColumn index.
intedit_modeSpecify whether the cells in the column are editable by using one of the following defined constants: XintCOLUMN_EDITABLE or XintCOLUMN_NON_EDITABLE.
intalignmentSpecify the alignment of the values in the cells of the column using one of the defined constants below.
intmax_charThe width of the column in terms of the number of characters displayed in a cell.
intdata_typeSpecify the data type of the values in the cells of the column using one of the defined constants below.
char *data_formatSpecify 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 ValueDescription
XintALIGNMENT_BEGINNING_TOPValue is to be justified in the upper left hand corner of the cell.
XintALIGNMENT_CENTER_TOPValue is to be justified horizontally in the center of the cell and vertically at the top of the cell.
XintALIGNMENT_END_TOPValue is to be justified in the upper right hand corner of the cell.
XintALIGNMENT_BEGINNING_MIDDLEValue is to be justified horizontally at the left side of the cell and vertically in the center of the cell.
XintALIGNMENT_CENTER_MIDDLEValue is to be justified horizontally at the center of the cell and vertically in the center of the cell.
XintALIGNMENT_END_MIDDLEValue is to be justified horizontally at the right side of the cell and vertically in the center of the cell.
XintALIGNMENT_BEGINNING_BOTTOMValue is to be justified in the lower left hand corner of the cell.
XintALIGNMENT_CENTER_BOTTOMValue is to be justified horizontally in the center of the cell and vertically at the bottom of the cell.
XintALIGNMENT_END_BOTTOMValue is to be justified in the lower right hand corner of the cell.

The data_type can be one of the following:

Defined ConstantDescription
XintTYPE_DOUBLEValues are double precision floating point numbers.
XintTYPE_FLOATValues are single precision floating point numbers.
XintTYPE_INTEGERValues are integer numbers.
XintTYPE_LONG_INTEGERValues are long integer numbers.
XintTYPE_SHORTValues are short integer numbers.
XintTYPE_STRINGValues are character strings.
XintTYPE_POINTERValues are pointers.

The function which retrieves the column attributes is XintEditTableGetColumnAttrinutes.


XintEditTableDeleteColumns

This function deletes a specified range of columns from a table. The deleted columns are copied to the EditTable Widget's clipboard so that they can be undeleted if necessary.

     Boolean XintEditTableDeleteColumns (...)

WidgetwidgetEditTable widget ID.
intcolumnIndex of the first column to delete.
intnum_columnsNumber 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.


XintEditTableDeleteRows

This function deletes a specified range of rows from a table. The deleted rows are copied to the EditTable Widget's clipboard so that they can be undeleted if necessary.

     Boolean XintEditTableDeleteRows (...)

WidgetwidgetEditTable widget ID.
introwIndex of the first row to delete .
intnum_rowsNumber 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.


XintEditTableFillCell

This function stores a value into a cell and updates the display.

     Boolean XintEditTableFillCell (...)

WidgetwidgetEditTable widget ID.
intcolumnIndex of the column containing the cell.
introwIndex of the row containing the cell.
XtPointerdata_addressAddress 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.


XintEditTableFillCellNoUpdate

This function is similar to XintEditTableFillCell except that it does not update the display. This function is designed for cases where the application needs to update a large number of cells as fast as possible. After all the cells have been filled, the application needs to call function XintEditTableUpdateDataDisplay, with both row and column arguments set to XintUPDATE_ALL, to update the EditTable display.

     Boolean XintEditTableFillCellNoUpdate (...)

WidgetwidgetEditTable widget ID.
intcolumnIndex of the column containing the cell.
introwIndex of the row containing the cell.
XtPointerdata_addressAddress 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.


XintEditTableFillColumnAnnotation

This function sets the annotation character string for a specified column.

     Boolean XintEditTableFillColumnAnnotation (...)

WidgetwidgetEditTable widget ID.
intcolumnIndex of the column whose annotation is to be changed.
char *annotation_stringCharacter 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.


XintEditTableFillColumnData

This function sets the values of every cell in a specified column. The values are specified by an array that must be the same size as the specified column and be of the same data type as the column.

     Boolean XintEditTableFillColumnData (...)

WidgetwidgetEditTable widget ID.
intcolumnIndex of the column whose values are to be changed.
XtPointerdata_arrayArray 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.


XintEditTableFreezeColumn

This function freezes a specified column. This function is only effective when the parent of the EditTable widget is an INT Scroll widget.

     Boolean XintEditTableFreezeColumn (...)

WidgetwidgetEditTable widget ID.
intcolumnIndex 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.


XintEditTableFreezeRow

This function freezes a specified row. This function is only effective when the parent of the EditTable widget is an INT Scroll widget.

     Boolean XintEditTableFreezeRow (...)

WidgetwidgetEditTable widget ID.
introwIndex 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.


XintEditTableFreezeUpdate

This function is a convenience function that sets the value of resource XmNfreezeUpdate. Resource XmNfreezeUpdate when set to True will disable all geometry updates and redisplay operations while an application is performing a series of changes on the table. After the changes are completed, resource XmNfreezeUpdate should be set back to False so that the table can automatically recalculate its new geometry and redisplay itself.

     Boolean XintEditTableFreezeUpdate (...)

WidgetwidgetEditTable widget ID.
BooleanstateTrue to freeze updates, False to calculate new geometry and redisplay.


XintEditTableGetCellBackground

This function returns the background color of a specified cell (as a pixel value).

     Pixel XintEditTableGetCellBackground (...)

WidgetwidgetEditTable widget ID.
intcolumnIndex of the column.
introwIndex of the row.

This function returns the color used for the background of the specified cell as a pixel value.


XintEditTableGetCellData

This function returns a pointer to a copy of the value in a specified cell. You should free the memory used by the copy of the value after you have finished with it.

     XtPointer XintEditTableGetCellData (...)

WidgetwidgetEditTable widget ID.
intcolumnIndex of the column containing the cell.
introwIndex 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).


XintEditTableGetCellFont

This function returns the index of the font used by the specified cell.

     int XintEditTableGetCellFont (...)

WidgetwidgetEditTable widget ID.
intcolumnIndex of the column.
introwIndex 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.


XintEditTableGetCellForeground

This function returns the foreground color of a specified cell (as a pixel value).

     Pixel XintEditTableGetCellForeground (...)

WidgetwidgetEditTable widget ID.
intcolumnIndex of the column.
introwIndex of the row.

This function returns the pixel value used to paint the foreground of the specified cell.


XintEditTableGetCellGeometry

This function returns the position and size in pixels coordinates of a cell relative to the upper left corner of the EditTable widget window.

     Boolean XintEditTableGetCellGeometry (...)

WidgetwidgetEditTable widget ID.
intcolumnIndex of the column.
introwIndex of the row.
int *xReturns the X-coordinate of the cell.
int *yReturns the Y-coordinate of the cell.
int *widthReturns the cell's width in pixels.
int *heightReturns the cell's height in pixels.

This function returns False if the specified cell is out of range.


XintEditTableGetCellHeight

This function returns the height of the specified cell in the unit system specified by resource XmNcellSizeUnit. Note that all the cells in a defined row (column if table is transposed) have the same height.

     Boolean XintEditTableGetCellHeight (...)

WidgetwidgetEditTable widget ID.
intindexIndex of the row (column if table is transposed) containing the cell.
int *heightReturns the height of the cell.

This function returns False if the index specified is out of range.


XintEditTableGetCellPixmap

This function returns the pixmap ID used for the background of the specified cell.

     Pixmap XintEditTableGetCellPixmap (...)

WidgetwidgetEditTable widget ID.
intcolumnIndex of the column.
introwIndex 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.


XintEditTableGetCellPointerPosition

This function can be used to query the location of the cell pointer. It returns False it the cell pointer is not active.

     Boolean XintEditTableGetCellPointerPosition (...)

WidgetwidgetEditTable widget ID.
int *columnReturns the index of the column where the cell pointer is located..
int *rowReturns the index of the row where the cell pointer is located..


XintEditTableGetCellWidget

This function returns the cell widget associated with a particular cell location. If no widget is associated with the cell, the function returns NULL.

     Widget XintEditTableGetCellWidget (...)

WidgettableEditTable widget ID.
intcolumnReturns the index of the column location of the widget.
introwReturns the index of the row location of the widget.


XintEditTableGetCellWidth

This function returns the width of the specified cell in the unit system specified by resource XmNcellSizeUnit. Note that all the cells in a defined column (row if table is transposed) have the same width.

     Boolean XintEditTableGetCellWidth (...)

WidgettableEditTable widget ID.
intindexIndex of the column (row if table is transposed) containing the cell.
int *widthReturns the width of the cell.

This function returns False if the index specified is out of range.


XintEditTableGetColumnAttributes

This function gets the attributes of a a specified column. If one or more of the attributes is of no interest to you, then set the corresponding argument to NULL.

     Boolean XintEditTableGetColumnAttributes (...)

WidgettableEditTable widget ID.
intcolumnColumn index.
int *sizeReturns the number of cells in the column.
int *edit_modeReturns the column edit mode as one of the defined integer constants below.
int *alignmentReturns the column alignment as one of the defined integer constants below.
int *widthReturns the width of the column in the unit system specified by resource XmNcellSizeUnit.
int *data_typeReturns the data type of the values in the cells of the column as one of the defined constants below.
char **data_formatReturns 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_stringReturns the character string that annotates the column.

The edit_mode is returned as one of the following:

Defined ConstantDescription
XintCOLUMN_EDITABLEIndicates that the values in the cells of the column are editable.
XintCOLUMN_NON_EDITABLEIndicates that the values in the cells of the column are not editable.

The data_type is returned as one of the following:

Defined ConstantDescription
XintTYPE_DOUBLEValues are double precision floating point numbers.
XintTYPE_FLOATValues are single precision floating point numbers.
XintTYPE_INTEGERValues are integer numbers.
XintTYPE_LONG_INTEGERValues are long integer numbers.
XintTYPE_SHORTValues are short integer numbers.
XintTYPE_STRINGValues are character strings.
XintTYPE_POINTERValues are pointers.

The alignment is returned as one of the following:

Resource ValueDescription
XintALIGNMENT_BEGINNING_TOPValue is to be justified in the upper left hand corner of the cell.
XintALIGNMENT_CENTER_TOPValue in each cell is to be justified horizontally in the center of the cell and vertically at the top of the cell.
XintALIGNMENT_END_TOPValue in each cell is to be justified in the upper right hand corner of the cell.
XintALIGNMENT_BEGINNING_MIDDLEValue 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_MIDDLEValue in each cell is to be justified horizontally at the center of the cell and vertically in the center of the cell.
XintALIGNMENT_END_MIDDLEValue 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_BOTTOMValue in each cell is to be justified in the lower left hand corner of the cell.
XintALIGNMENT-_CENTER_BOTTOMValue in each cell is to be justified horizontally in the center of the cell and vertically at the bottom of the cell.
XintALIGNMENT_END_BOTTOMValue in each cell is to be justified in the lower right hand corner of the cell.

To set the column attributes use function XintEditTableDefineColumnFormat.


XintEditTableGetColumnData

This function gets a copy of the values of every cell in a specified column. The values are returned in an array that you should free when you have finished with it.

     XtPointer XintEditTableGetColumnData (...)

WidgettableEditTable widget ID.
intcolumnIndex of the column whose values are to be returned.
int *sizeReturns 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.


XintEditTableGetColumnUserData

Returns pointer to the column's user data.

     XtPointer XintEditTableGetColumnUserData (...)

WidgetwidgetWidget ID of the EditTable.
intcolumnColumn number to retrieve the user data.


XintEditTableGetFrozenColumns

This function returns an integer array containing the column indices of the columns currently frozen in a table. The column indices are returned in an array that you should free when you are finished with it.

     int * XintEditTableGetFrozenColumns (...)

WidgettableEditTable widget ID.
int *num_colsReturns 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.


XintEditTableGetFrozenRows

This function returns an integer array containing the row indices of the rows currently frozen in a table. The row indices are returned in an array that you should free when you are finished with it.

     int * XintEditTableGetFrozenRows (...)

WidgettableEditTable widget ID.
int *num_rowsReturns 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.


XintEditTableGetHiddenColumns

This function returns the list of the columns which are currently not visible.

     int * XintEditTableGetHiddenColumns (...)

WidgettableEditTable widget ID.
int *num_colsReturns 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.


XintEditTableGetHiddenRows

This function returns the list of the rows which are currently not visible.

     int * XintEditTableGetHiddenRows (...)

WidgettableEditTable widget ID.
int *num_rowsReturns 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.


XintEditTableGetSelectionByNumber

This function returns information regarding the specified selection. Selection numbers are positive integers which are assigned automatically by the EditTable widget. In case of a single selection, the selection_number should be set to 1. Otherwise, for a multiple selection, valid values are between 1 and the number returned by function XintEditTabelGetSelectionCount.

     Boolean XintEditTableGetSelectionByNumber (...)

WidgettableEditTable widget ID.
intselection_numberNumber of the selection for which we want information.
int *col_startThe column start value for selection.
int *num_colsThe number of columns in selection.
int *row_startThe row start value for the selection.
int *num_rowsThe number of rows in the selection.
int *selection_modethe 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 ConstantDescription
XintSELECT_CELLSelection is a block of cells.
XintSELECT_ROWSelection is a set of rows.
XintSELECT_COLUMNSelection is a set of columns.
XintSELECT_NONENo selection exists.


XintEditTableGetSelectionCount

This function returns the number of current selections.

     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.


XintEditTableGetTextChild

This function returns the ID of the text widget used to edit a cell. Editing is done using a floating text widget that is mapped when the user starts entering text. There are up to four text widgets, one for the main table, one for the frozen column area, one for the frozen row area and one for the area intersecting the frozen rows and columns.

     Widget XintEditTableGetTextChild (...)

WidgettableEditTable widget ID.
intchildCode 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 ConstantDescription
XintEDIT_TABLE_MAIN_TEXTRefers to the text widget used in the main table.
XintEDIT_TABLE_FROZEN_COLUMN_TEXTRefers to the text widget used to edit frozen columns.
XintEDIT_TABLE_FROZEN_ROW_TEXTRefers to the text widget used to edit frozen rows.
XintEDIT_TABLE_FROZEN_CELLS_TEXTRefers to the text widget used to edit frozen cells (intersection of frozen rows and frozen columns).


XintEditTableGetSubtable

This function returns the ID of one of the subtable widgets. A subtable may or may not exist so you should check the returned widget ID to ensure that it is not NULL.

     Widget XintEditTableGetSubtable (...)

WidgettableEditTable widget ID.
intsubtable_codeCode 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 ConstantDescription
XintEDIT_TABLE_FROZEN_COLUMN_SUBTABLERefers to the subtable of frozen columns.
XintEDIT_TABLE_FROZEN_ROW_SUBTABLERefers to the subtable of frozen rows.
XintEDIT_TABLE_FROZEN_INTERSECTION_SUBTABLERefers to the subtable in the intersection of the frozen rows and columns.
XintEDIT_TABLE_MAIN_SUBTABLERefers to the subtable of non-frozen cells.


XintEditTableGetVisibleArea

This function passes back the visible area of the table through its argument list. The visible area of the table starts from the first_column (the leftmost column) to the last_column (the rightmost column) and from the first_row (the top row) to the last_row (the bottom row).

     Boolean XintEditTableGetVisibleArea (...)

WidgettableEditTable widget ID.
int *first_columnReturns the index of the first (leftmost) column.
int *last_columnReturns the index of the last (rightmost) column.
int *first_rowReturns the index of the first (top) row.
int *last_rowReturns the index of the last (bottom) row.

This function returns False if the widget argument is not an EditTable widget. Otherwise, it returns True.


XintEditTableInsertColumns

This function inserts one or more empty columns before a specified column. You can specify an array of character strings for the new column annotations or specify NULL for new columns with no annotations. Specify 0 for the column index to have the new columns inserted at the end of the table.

     Boolean XintEditTableInsertColumns (...)

WidgettableEditTable widget ID.
intcolumnThe column index of the column before which the columns will be inserted.
intnum_colsThe number of empty columns to be inserted.
char **annotationPointer 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.


XintEditTableInsertRows

This function inserts one or more empty rows before a specified row. Specify 0 for the row index to cause the new rows to be inserted at the end of the table.

     Boolean XintEditTableInsertRows (...)

WidgettableEditTable widget ID.
introwThe row index of the row before which the new rows will be inserted.
intnum_rowsThe number of rows to be inserted.

This function returns False if the specified row index is out of range. Otherwise, it returns True.


XintEditTableIsCellDefined

This function returns True if the specified cell is within the table and if its content has been initialized.

     Boolean XintEditTableIsCellDefined (...)

WidgettableEditTable widget ID.
intcolumnThe column index of the cell of interest.
introwThe row index of the cell of interest.


XintEditTableIsColumnFrozen

This function returns True if the specified column is frozen.

     Boolean XintEditTableIsColumnFrozen (...)

WidgettableEditTable widget ID.
intcolumnThe index of the column of interest.


XintEditTableIsRowFrozen

This function returns True if the specified row is frozen.

     Boolean XintEditTableIsRowFrozen (...)

WidgettableEditTable widget ID.
introwThe index of the row of interest.


XintEditTableIsColumnHidden

This function returns True if the specified column is hidden. A column is hidden by calling function XintEditTableChangeColumnVisibility with the visible argument set to False.

     Boolean XintEditTableIsColumnHidden (...)

WidgettableEditTable widget ID.
intcolumnThe index of the column of interest.


XintEditTableIsRowHidden

This function returns True if the specified row is hidden.A row is hidden by calling function XintEditTableChangeRowVisibility with the visible argument set to False.

     Boolean XintEditTableIsRowHidden (...)

WidgettableEditTable widget ID.
introwThe index of the row of interest.


XintEditTableOutputAscii

This function creates an ASCII output file that contains the values in a range of cells. You must specify a delimiter to be inserted between the values in a row.

     Boolean XintEditTableOutputAscii (...)

WidgettableEditTable widget ID.
char *filenameCharacter string specifying the output file name.
intcol_startColumn index of the first column containing cell values to be output.
intcol_endColumn index of the last column containing cell values to be output.
introw_startRow index of the first row containing cell values to be output.
introw_endRow index of the last row containing cell values to be output.
chardelimiterCharacter 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.


XintEditTableOutputPostscript

This function creates a PostScript output file that contains the values in a range of specified cells.

     Boolean XintEditTableOutputPostscript (...)

WidgetwidgetEditTable widget ID.
char *filenameCharacter string specifying the output file name.
intcolor_modeSpecify XintMONOCHROME for a black and white printer and XintCOLOR for a color printer.
floatscaleSpecifies the scale factor for the output image
intcol_startColumn index of the first column containing cell values to be output.
intcol_endColumn index of the last column containing cell values to be output.
introw_startRow index of the first row containing cell values to be output.
introw_endRow 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.


XintEditTableOutputSimplePS

Generates PostScript output, ignoring all font specifiers, and using only Courie r-10.

     Boolean XintEditTableOutputSimplePS (...)

WidgetwidgetWidget ID of the EditTable.
char *filenameName of output PostScript file.
intorientationOrientation of output. Use the constant of either XintORIENTATION_LANDSCAPE or XintORIENTATION_PORTRAIT.
intstart_columnStarting column for output to PostScript.
intend_columnEnding column for output to PostScript.
intstart_rowStarting row for output to PostScript.
intend_rowEnding 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.


XintEditTableOutputSimplePS2

Generates PostScript output, using all fonts and alignments set up in the EditTa ble. If the scale is set to 0, the output will be fitted to one page.

     Boolean XintEditTableOutputSimplePS2 (...)

WidgetwidgetWidget ID of the EditTable.
char *filenameName of output PostScript file.
intorientationOrientation of output. Use the constant of either XintORIENTATION_LANDSCAPE or XintORIENTATION_PORTRAIT.
doublescaleScale to use for output to PostScript. Using a scale of 0 will fit the output EditTable to one page.
intstart_columnStarting column for output to PostScript.
intend_columnEnding column for output to PostScript.
intstart_rowStarting row for output to PostScript.
intend_rowEnding 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.


XintEditTableOutputSylkFile

This function creates a SYLK formatted output file that contains the values in a range of specified cells. You can specify a font name of a font on the machine the SYLK file will be used on. Alternatively, specify NULL if you want to use the default font.

     Boolean XintEditTableOutputSylkFile (...)

WidgetwidgetEditTable widget ID.
char *filenameCharacter string specifying the output file name.
intcol_startColumn index of the first column containing cell values to be output.
intcol_endColumn index of the last column containing cell values to be output.
introw_startRow index of the first row containing cell values to be output.
introw_endRow index of the last row containing cell values to be output.
char *font_nameCharacter 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.


XintEditTablePasteColumns

This function copies the columns currently on the EditTable widget's clipboard into the columns of the table starting at a specified column. You must specify whether a data type conversion will or will not be performed when the data is pasted from the clipboard to the specified column. If no conversion is specified and the column types are not compatible (e.g. trying to paste strings into a floating point column), then no operation is performed and the function returns False.

     Boolean XintEditTablePasteColumns (...)

WidgetwidgetEditTable widget ID.
intcolumnThe column index of the column whose values will be replaced by the values of the column on the clipboard.
intconversionSpecify 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 ConstantDescription
XintCONVERSIONIndicates that the values should be converted (e.g. "123" becomes the integer value 123).
XintNO_CONVERSIONIndicates that no conversion is to be performed. Function will return False on data type mismatch.
XintTYPE_CASTIndicates 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.


XintEditTablePSReportStyle

This function generates a postscript formatted report.

     Boolean XintEditTablePSReportStyle (...) 

WidgettableEditTable widget ID.
EditTableReportRange *rangePointer to the EditTableReportRange structure that specifies the range to be generated.
EditTableReportLayout *layoutPointer to the EditTableReportLayout structure that specifies the layout of the report.
EditTableReportAttributes *attributesPointer to the EditTableReportAttributes that specifies the page attributes of the report.
char *filenameThe 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:

MemberDescription
column_startStarting column in the range of cells.
column_endEnding column in the range of cells.
row_startStarting row in the range of cells.
row_endEnding row in the range of cells.

    typedef struct {

                    int orientation, processing_direction;

    } EditTableReportLayout;

Where the structure variables are:

MemberDescription
orientationSpecifies the orientation of the page. The user can specify any one of the constants shown in the first Constant's table below.
processing_directionSpecifies the page stacking order. The user can specify any one of the constants shown in the second Constant's table below.

Defined ConstantDescription
XintORIENTATION_PORTRAITSpecifies the portrait orientation.
XintORIENTATION_LANDSCAPESpecifies the landscape orientation.

Defined ConstantDescription
XintFROM_L_TO_RSpecifies to process the table from left to right. In other words, process the table in terms of columns.
XintFROM_T_TO_BSpecifies 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:

MemberDescription
show_on_pageIndicates whether to show on every page or just the front page. The user can specify one of the constants in the Constants table below.
stringThe actual string in the report.
fontThe actual font string to be used in the report.
placementSpecifies the placement of the EditTableReportAttributes members. The user can specify one of the constants in the Constants table below.
alignmentSpecifies 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 ConstantDescription
XintALL_PAGESConstant value for show_on_page variable in structure FieldAttr. Indicates user wishes to show attribute on all pages in the report.
XintFRONT_PAGE_ONLYConstant value for show_on_page variable in structure FieldAttr. Indicates user wishes to show attribute on front page only.
XintPLACEMENT_NONEConstant value for placement variable. Indicates not to place the attribute on the page.
XintPLACEMENT_TOPConstant value for placement variable. Indicates to place the attributes above the report content.
XintPLACEMENT_BOTTOMConstant value for placement variable. Indicates to place the attributes below the report content.
XintPLACEMENT_TOP_BOTTOMConstant value for placement variable. Indicates to place the attributes both above and below the report content.
XintPLACEMENT_LEFTConstant value for placement variable. Indicates to place the attributes to the left of the report content.
XintPLACEMENT_RIGHTConstant value for placement variable. Indicates to place the attributes to the right of the report content.
XintPLACEMENT_LEFT_RIGHTConstant value for placement variable. Indicates to place the attributes both left and right of the report content.
XintALIGNMENT_BEGINNINGConstant value for alignment variable. Indicates to align the string starting from the left border of a cell.
XintALIGNMENT_CENTERConstant value for alignment variable. Indicates to align the string at the center of a cell.
XintALIGNMENT_ENDConstant value for alignment variable. Indicates to align the string ending at the right border of a cell.

Where the variables of structure EditTableReportAttributes are:

MemberDescription
titleTitle specification.
horz_annotationSpecifies the horizontal annotation.
vert_annotationSpecifies the vertical annotation.
page_numberPage number specification.
table_text_fontSpecifies the text font for the report, if other than the default table font.
table_text_alignmentSpecifies the text alignment for the report, if other than the default table text alignment.


XintEditTablePasteRows

This function copies the rows currently on the EditTable widget's clipboard into the rows of the table starting at a specified row.

     Boolean XintEditTablePasteRows (...)

WidgetwidgetEditTable widget ID.
introwThe row index of the row where the paste will begin.

This function returns False if the specified row index is out of range.


XintEditTableReadAscii

This function reads data from an ASCII file into the EditTable widget. The EditTable automatically converts the string data into the data type value of each column. If the conversion fails for a cell, the cell will be left unchanged. Set the column data type to XintTYPE_STRING to have no conversion performed (see resources XmNdefaultColumnDataType or XmNcolumnDataTypeData).

     Boolean XintEditTableReadAscii (...)

WidgetwidgetEditTable widget ID.
char *filenameThe name of the ASCII file.
BooleanresizeThe 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


XintEditTableReleaseColumn

This function releases a specified frozen column.

     Boolean XintEditTableReleaseColumn (...)

WidgetwidgetEditTable widget ID.
intcolumnThe 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.


XintEditTableReleaseRow

This function releases a specified frozen row.

     Boolean XintEditTableReleaseRow (...)

WidgetwidgetEditTable widget ID.
introwThe 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.


XintEditTableReorderColumns

This function changes the order of a list of columns. The columns to be reordered must be a contiguous sequence of columns. The new order is specified as an array of originsl column indices indicating the new ordering of the columns. For instance, if columns 5 through 10 are to be reordered, then the new order can be specified as an integer array containing the new order 8, 5, 9, 7, 6, 10; where the original column 8 is now column 5.

     Boolean XintEditTableReorderColumns (...)

WidgetwidgetEditTable widget ID.
intcol_startThe column index of the first column to be reordered.
intcol_endThe column index of the last column to be reordered.
int *orderPointer to an integer array containing the column indices in a different order.

This function returns False if the specified columns could not be reordered.


XintEditTableReorderRows

This function changes the order of a list of rows. The rows to be reordered must be a contiguous sequence of rows. The new order is specified as an array of original row indices indicating the new ordering of the rows. For instance, if rows 5 through 10 are to be reordered, then the new order can be specified as an integer array containing the new order 8, 5, 9, 7, 6, 10; where the original row 8 is now row 5.

     Boolean XintEditTableReorderRows (...)

WidgetwidgetEditTable widget ID.
introw_startThe row index of the first column to be reordered.
introw_endThe column index of the last row to be reordered.
int *orderPointer to an integer array containing the row indices in a different order.

This function returns False if the specified rows could not be reordered.


XintEditTableRemoveAllLocalCallbacks

This function removes all local callback procedures associated with a specified callback resource.

     Boolean XintEditTableRemoveAllLocalCallbacks (...)

WidgetwidgetEditTable widget ID.
char *callback_nameA callback resource name defined by the EditTable widget.

The function returns False if callback_name is not a valid callback resource name.


XintEditTableRemoveLocalCallback

This function removes a local callback attached to a cell, row or column.

     Boolean XintEditTableRemoveLocalCallback (...)

WidgetwidgetEditTable widget ID.
intcolIndex of the column where local callback is registered.
introwIndex of the row where local callback is registered.
char *callback_nameName of the callback to remove.
XtCallbackProccallback_procCallback procedure to remove.
XtPointerclient_dataClient 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.


XintEditTableRowScroll

This function allows the program to control scrolling of rows.

     void XintEditTableRowScroll (...)

WidgetwidgetEditTable widget ID.
intscroll_operationSpecifies the direction and amount of scrolling.

The operation argument must be one of the following:

Defined ConstantDescription
XintDECREMENTTo scroll one row up.
XintINCREMENTTo scroll one row down.
XintPAGE_DECREMENTTo scroll one page up.
XintPAGE_INCREMENTTo scroll one page down.
XintTO_FIRSTTo scroll back to the first row.
XintTO_LASTTo scroll to the last row.


XintEditTableSetCellBackground

This function sets the background color of a specified block of cells.

     Boolean XintEditTableSetCellBackground (...)

WidgetwidgetEditTable widget ID.
intcol_startThe index of the starting column.
intnum_colsNumber of columns.
introw_startThe index of the starting row.
intnum_rowsThe number of rows.
PixelpixelThe pixel value used to draw the cell background.

The function returns False if the cell specification is out of range. Otherwise, it returns True.


XintEditTableSetCellDisplayAttributes

This function sets the cell display attributes of the specified range of cells.

     Boolean  XintEditTableSetCellDisplayAttributes (...) 

WidgetwidgetEditTable widget ID.
intcol_startThe index of the starting column.
intnum_colsNumber of columns.
introw_startThe index of the starting row.
intnum_rowsThe number of rows.
PixelbackgroundThe background color of the cells.
PixelforegroundThe foreground color of the cells.
XtPointerdata_addrAddress 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.


XintEditTableSetCellFont

This function sets the index of the font used for displaying the specified set of cells. This function will have no effect if resource XmNfontTable is set to NULL.

     Boolean XintEditTableSetCellFont (...)

WidgetwidgetEditTable widget ID.
intcol_startThe index of the starting column.
intnum_colsNumber of columns.
introw_startThe index of the starting row.
intnum_rowsThe number of rows.
intindexThe 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.


XintEditTableSetCellForeground

This function sets the foreground color of a specified block of cells.

     Boolean XintEditTableSetCellForeground (...) 

WidgetwidgetEditTable widget ID.
intcol_startThe index of the starting column.
intnum_colsNumber of columns.
introw_startThe index of the starting row.
intnum_rowsThe number of rows.
PixelpixelThe pixel value used to draw the cell foreground.

The function returns False if the cell specification is out of range. Otherwise, it returns True.


XintEditTableSetCellHeight

This function sets the height, in the unit system specified by resource XmNcellSizeUnit, of a specified block of cells. Note that all the cells in a row (column if table is transposed) have the same height.

     Boolean XintEditTableSetCellHeight (...)  

WidgetwidgetEditTable widget ID.
intindex_startThe index of the starting row (column if table is transposed).
intnum_unitsNumber of rows (columns if table is transposed) to change.
intheightThe height specification.

The function returns False if the index specification is out of range. Otherwise, it returns True.


XintEditTableSetCellPixmap

This function sets the background pixmap of a specified block of cells. A pixmap of depth 1 or a depth equal to that of the EditTable widget window is supported. For a bitmap (pixmap of depth 1), the cell foreground color is used for the set bit and the background color is used for the unset bit.

     Boolean XintEditTableSetCellPixmap (...) 

WidgetwidgetEditTable widget ID.
intcol_startThe index of the starting column.
intnum_colsNumber of columns.
introw_startThe index of the starting row.
intnum_rowsThe number of rows.
PixmappixmapThe 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.


XintEditTableSetCellPixmapList

This function sets the background pixmap of a specified block of cells from a list of pixmaps.

     Boolean XintEditTableSetCellPixmapList (...)

WidgetwidgetEditTable widget ID.
intcol_startThe index of the starting column.
intnum_colsNumber of columns.
introw_startThe index of the starting row.
intnum_rowsThe number of rows.
Pixmap *pixmap_listThe 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.


XintEditTableSetCellPointerPosition

This function sets the cell pointer to the specified cell. The cell pointer indicates the cell that is being edited.

     Boolean XintEditTableSetCellPointerPosition (...)

WidgetwidgetEditTable widget ID.
intcolThe column index of the cell in which to position the cell pointer.
introwThe 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.


XintEditTableSetCellWidth

This function sets the width, in the unit system specified by resource XmNcellSizeUnit, of a specified block of cells. Note that all the cells in a column (row if table is transposed) have the same width.

     Boolean XintEditTableSetCellWidth (...)  

WidgetwidgetEditTable widget ID.
intindex_startThe index of the starting column (row if table is transposed).
intnum_unitsNumber of columns (rows if table is transposed) to change.
intwidthThe width specification.

The function return False if the index specification is out of range. Otherwise, it returns True.


XintEditTableSetColumnFont

This function specifies the font index to be used by a range of columns. This function has no effect if resource XmNfontTable is NULL.

     Boolean XintEditTableSetColumnFont (...)

WidgetwidgetEditTable widget ID.
intcol_startStarting column number.
intnum_colsNumber of columns.
intfont_indexSpecifies 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.


XintEditTableSetColumnUserData

Specifies the column and the column's user data.

     Boolean XintEditTableSetColumnUserData (...)

WidgetwidgetWidget ID of the EditTable.
intcolumnColumn number to store the user data.
XtPointeruser_dataPointer to user data.

The function returns False if widget is not a valid EditTable or if the column does not exist. Returns True, otherwise.


XintEditTableSetListBehavior

This function simulates the XmList widget. The number of the selection will be equal to the number of rows selected. (When this function is "off" the selection will be equal to one no matter the number of rows selected, since they are treated as one "group".)

     Boolean  XintEditTableSetListBehavior (...) 

WidgetwidgetEditTable widget ID.
intpolicySpecifies the selection policy.

The policy argument must include one of the following:

Defined ConstantDescription
XmSINGLE_SELECTSelect one row at a time.
XmMULTIPLE_SELECTAllows multiple rows selection.
XmEXTENDED_SELECTAllows extended rows selection.
XmBROWSE_SELECTAllows 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.


XintEditTableSetRowFont

This function specifies the font index to be used by a range of rows. This function has no effect if resource XmNfontTable is NULL.

     Boolean XintEditTableSetRowFont (...)

WidgetwidgetEditTable widget ID.
introw_startStarting row number.
intnum_rowsNumber of rows.
intfont_indexSpecifies 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.


XintEditTableSetSelection

This function clears all previous selections and sets a new selection. The selection can be specified as a set of cells, columns or rows. The function will trigger the added selection callback function, if any, unless XintNO_CALLBACK is also included as part of the selection_mode argument.

     Boolean XintEditTableSetSelection (...)

WidgetwidgetEditTable widget ID.
intcol_startStarting column number.
intnum_colsNumber of columns.
introw_startStarting row number.
intnum_rowsNumber of rows.
intselection_modeSpecifies if selection is for a set of cells, rows or columns.

The selection_mode argument must include one of the following:

Defined ConstantDescription
XintSELECT_CELLSelection is a block of cells.
XintSELECT_ROWSelection is a set of rows.
XintSELECT_COLUMNSelection 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);


XintEditTableSortByColumn

This function sorts the rows in the specified column using the user defined comparitor function.

     int * XintEditTableSortByColumn (...) 

WidgetwidgetEditTable widget ID.
intcolumnThe column to be sorted.
int(*)()comparitorThe 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.


XintEditTableUndeleteColumns

This function restores to the table columns that have been deleted with the function XintEditTableDeleteColumns.

     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.


XintEditTableUndeleteRows

This function restores rows to the table that have been deleted with the function XintEditTableDeleteRows.

     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.


XintEditTableUnfreeze

This function unfreezes a table that has been frozen in order to update one, or a small number, of cells without re-drawing the table after every change. Since XintEditTableUnfreeze does not redisplay the table, the XintEditTableUpdateDataDisplay function must be called to redisplay the cell, or cells, which have been changed.

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 (...)

WidgettableEditTable widget ID.

This function returns False if the table argument is not an EditTable widget. Otherwise, it returns True.


XintEditTableUpdateDataDisplay

This function causes the EditTable widget to redisplay the values of the specified cell, row or column. To specify a whole row or a whole column, use integer constant XintUPDATE_ALL for the other index value. To specify the whole table, set both row and column indexes to XintUPDATE_ALL. You need to call this function only if 1) you have directly changed the value of one or more array elements in the specified cell, row or column and the application is sharing column data with the EditTable widget, or 2) after you have made a series of calls to function XintEditTableFillCellNoUpdate.

     Boolean XintEditTableUpdateDataDisplay (...)

WidgetwidgetEditTable widget ID.
intcolumnIndex of the cell or column to be updated.
introwIndex 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.