EditTable Actions

Defined Actions

The following action procedures are defined by the EditTable widget for manipulating a table. These action procedures can be tied to user actions via a translation table.

NameDescription
AnnotationEdit()Calls the callback list specified by the resource XmNeditAnnotationCallback.
AnnotationEndDrag()Terminates the drag operation and calls callback XmNdragCallback.
AnnotationEndSelect()Terminates the pointer selection in the annotation area and marks the selection block. It calls the callback list specified by the resource XmNcolumnCallback or XmNrowCallback.
AnnotationExtendDrag()Extends the drag operation.
AnnotationExtendSelect()Extends the existing row or column selections to a list of rows or columns according to the position of the mouse pointer.
AnnotationStartDrag(move)Initiates a row or column move operation.
AnnotationStartDrag(copy)Initiates a row or column copy operation.
AnnotationStartDrag(resize)Initiates a row or column resize operation.
AnnotationStartDrag(move, resize) or (copy, resize)Initiates one of the specified operations on a row or column. Resize will be initiated if pointer is pressed close to the row or column border, otherwise a move or copy will be initiated.
AnnotationStartSelect() or (single)Initiates a row or column selection operation and clears all previous selections.
AnnotationsStartSelect (multiple)Initiates a row or column selection operation and adds to the previous selections.
EditTableClearAllSelections()Clears all existing selections.
EditTableClearSelection()Clears the selection where the pointer resides.
EditTableConfirmEdit()Calls the callbacks for XmNvalidateValueCallback. If the new value is approved, it is stored into the cell being edited, otherwise the old value is restored.
EditTableCopyColumn()Copies the data of the currently selected (highlighted) column to the clipboard.
EditTableCopyRows()Copies the data of the currently selected (highlighted) rows to the clipboard.
EditTableDeleteColumns()Deletes the currently selected (highlighted) columns and saves the column data to the clipboard.
EditTableDeleteRows()Deletes the currently selected (highlighted) rows and saves the row data to the clipboard.
EditTableEditCell()If a cell has been selected, this routine calls the callback list specified by the resource XmNcheckEditModeCallback.
EditTableEndDrag()Terminates the cell drag operation and calls callback XmNdragCallback.
EditTableEndSelect()Terminates the pointer selection and marks the selection area. It calls the callback list specified by XmNselectCellCallback.
EditTableEnterCell(Down)Moves the cursor (highlight) to the cell below the currently selected one and calls the callback list specified by the resource XmNtraverseCellCallback.
EditTableEnterCell(Left)Moves the cursor (highlight) to the cell to the left of the currently selected one and calls the callback list specified by the resource XmNtraverseCellCallback.
EditTableEnterCell(Right)Moves the cursor (highlight) to the cell to the right of the currently selected one and calls the callback list specified by the resource XmNtraverseCellCallback.
EditTableEnterCell(Pointer)Moves the cursor (highlight) to the cell that the user has clicked on and calls the callback list specified by the resource XmNtraverseCellCallback.
EditTableEnterCell(Up)Moves the cursor (highlight) to the cell above the currently selected one and calls the callback list specified by the resource XmNtraverseCellCallback.
EditTableEnterTable()Sets the keyboard focus to the table.
EditTableExtendDrag()Extends a cell drag operation.
EditTableExtendSelect()Extends the existing cell selection to a block of cells according to the position of the mouse pointer.
EditTableInsertColumns()If a column has been selected, this routine inserts the column(s) on the clipboard before the selected column.
EditTableInsertRows()If a row has been selected, this routine inserts the row(s) on the clipboard before the selected row.
EditTablePasteColumn()If a column has been selected, this routine replaces the selected column with the column on the clipboard.
EditTablePasteRows()If a row has been selected, this routine replaces the selected row (and possibly the rows below the selected row) with the row(s) on the clipboard.
EditTableResizeHandler()Shows the cell resizing cursor when mouse pointer is over the border/corner between adjacent cells.
EditTableStartDrag(copy)Initiates a cell copy operation.
EditTableStartDrag(move)Initiates a cell move operation.
EditTableStartDrag(resize)Initiates a cell resize operation.
EditTableStartDrag(move, resize) or (copy, resize) Initiates one of the specified operations on a cell. Resize will be initiated if pointer is pressed close to the cell border, otherwise a move or copy will be initiated.
EditTableStartSelect() or (single)Initiates the selection of a block of cells and clears all previous selections.
EditTableStartSelect(row) or (column)Initiates a row or a column selection from inside the table and clears all previous selections.
EditTableStartSelect (multiple)Initiates the selection of a block of cells and adds to the previous selections.
EditTableStartSelect (multiple, row) or (multiple, column)Initiates a row or a column selection from inside the table and adds to the previous selections.
EditTableTraverseCurrent()Causes the EditTable widget to receive the input focus.
EditTableUndeleteColumns()Restores the columns that were last deleted.
EditTableUndeleteRows()Restores the rows that were last deleted.
NextTabGroup()Traverses to the next tab group.
PreviousTabGroup()Traverses to the previous tab group.
TextAbandonEdit()Cancels current editing operation on a cell and restores original value.
TextConfirmEdit()Calls callback XmNvalidateValueCallback to confirm the value entered.


EditTable Translations


Default Translations

The default translation table defined for use with an EditTable widget is the following:

Event SequenceAction Name
<FocusIn>ManagerFocusIn()
EditTableEnterCell(FocusIn)
<FocusOut>ManagerFocusOut()
Shift <Key>TabEditTableEnterCell(Left)
EditTableClearAllSelections()
Shift <Key>ReturnEditTableEnterCell(Up)
EditTableClearAllSelections()
None <Key>osfLeftEditTableEnterCell(Left)
EditTableClearAllSelections()
None <Key>osfRightEditTableEnterCell(Right)
EditTableClearAllSelections()
None <Key>TabEditTableEnterCell(Right)
EditTableClearAllSelections()
None <Key>osfUpEditTableEnterCell(Up)
EditTableClearAllSelections()
None <Key>osfDownEditTableEnterCell(Down)
EditTableClearAllSelections()
None <Key>ReturnEditTableEnterCell(Down)
EditTableClearAllSelections()
~Ctrl ~Shift ~Meta ~Alt <Btn1Down> EditTableEnterCell(Pointer)
EditTableStartSelect(single)
<Btn1Up>EditTableEndSelect()
<Btn2Down>MotifDragStart()
<Key>osfActivateEditTableConfirmEdit()
~Ctrl ~Meta ~Alt <Key>EditTableEditCell()
Ctrl ~Meta ~Alt <Key> TabNextTabGroup()
Shift Ctrl ~Meta ~Alt <Key> TabPreviousTabGroup()


Actions with no Default Translations

Some EditTable actions have no default translations specified. In particular, the default translation table contains no definitions for any cut, copy and paste operations on rows and columns nor does it contain definitions for any of the annotation actions.

Changing the Default Translation Table

The EditTable default translations table can be modified using the functions XtAugmentTranslations or XtOverrideTranslations or it can be replaced by specifying your own translation table using resource XmNtranslations. For example, you may wish to add support for multiple selections (add a translation for action EditTableStartSelect(multiple)) or add translations for cut and paste operations.

Specifying Translations for Annotation Actions

The annotation actions (AnnotationEdit, AnnotationStartSelect, AnnotationExtendSelect, AnnotationEndSelect, AnnotationStartDrag, AnnotationExtendDrag and AnnotationEndDrag) have no default translations. When the EditTable widget is not a child of an INT Scroll widget, you must merge (using XtAugmentTranslations or XtOverrideTranslations) the application defined translations for the annotation actions with the existing default translation table. When an EditTable widget is a child of an INT Scroll widget, then the translations for column annotation actions must be registered by specifying a translation table for those actions as the value of the EditTable resource, XmNcolumnAnnotationTranslations. Similarly, the translations for row annotation actions must be registered by specifying a translation table for those actions as the value of the EditTable resource, XmNrowAnnotationTranslations. Note that it is possible to use the same translation table for the row and column annotation translations.

Text Actions

Actions TextConfirmEdit and TextAbandonEdit should not be registered directly to the EditTable widget but rather to the internal text widget(s) created by the EditTable widget. The ID of the text widgets created by an EditTable can be obtained using convenience function XintEditTableGetTextChild.