Drag and Drop


Overview

ChartObject supports full Motif drag and drop functionality (Note: drag and drop is not supported under X11R4/Motif1.1). One can drag and drop cells from a table widget into a chart object, data from a chart object into another chart object, etc. It is also possible to establish links using drag and drop between a table and a chart object or between two chart objects.

EditObject action MotifStartDrag controls the drag operation. It is connected using the following translation:

    <Btn2Down>: MotifStartDrag()

There is no specific action defined for dropping objects. The drop operation is activated automatically on a button release.

Drag and Drop operations can be disabled by setting EditObject resources XmNallowDrag and XmNallowDrop to False. Also, callback XmNdragDropCallback is invoked on both drag and drop operations and can be used to selectively enable or disable either drag or drop operations.


Summary

The following table summarizes the default behavior for drag and drop. Note: if there is a key sequence in the translation, it is important that the keys remain pressed until the drag and drop operation has been completed and the button has been released.

Key SequenceDrag SourceDrop SiteDescription
<Btn2Down>:Chart objectEditObjectMoves the chart to the specified location.
Ctrl <Btn2Down>:Chart objectEditObjectCopies the chart to the specified location.
Ctrl Shift <Btn2Down>Chart objectEditObjectCopies the chart to the specified location and makes a link between the two.
<Btn2Down>Chart objectChart objectMoves the data from the source chart to the destination chart.
Ctrl <Btn2Down>Chart objectChart objectCopies the data from the source chart object into the destination chart object.
Ctrl Shift <Btn2Down>Chart objectChart objectCopies the data from the source data object into the destination chart object. Establish a link between the two charts.
<Btn2Down>Chart objectEditTableThe data contained in the chart is moved to the table at the location specified by the pointer.
Ctrl <Btn2Down>Chart objectEditTableThe data contained in the chart is copied to the table at the location specified by the pointer.
Ctrl Shift <Btn2Down>Chart objectEditTableThe data contained in the chart is copied to the table at the location specified by the pointer. A link is established between the chart and the table.
<Btn2Down>Motif TextEditObjectCreates a text object containing the text.
<Btn2Down>Motif TextChart objectSet the Chart title to be the string contained in the text widget.
<Btn2Down>Motif TextEditTableContent of the Text widget is copied into the specified table cell.
<Btn2Down>EditTableChart objectThe data contained in the selected cells is copied into the chart object (move option is disabled for the EditTable widget).
Ctrl <Btn2Down>EditTableChart objectThe data contained in the selected cells is copied into the chart object.
Ctrl Shift <Btn2Down>EditTableChart objectThe data contained in the selected cells is copied into the chart object and a link is made between the table and the chart.
<Btn2Down>Graphic objectEditObjectMoves the object to the location specified by the pointer.
Ctrl <Btn2Down>Graphic objectEditObjectCopies the object to the location specified by the pointer.