The Clipboard: 4.2 Using Quick-Transfer: Quick-Transfer Procedure

Up: GEOS SDK TechDocs | Up | Prev: 4.1 Supporting Quick-Transfer | Next: 4.3 Quick-Transfer Data Structures

Although applications must handle several situations to support the quick-transfer mechanism, the procedure involved in a quick-transfer is quite simple. The steps of how a quick-transfer operation is performed are outlined below:

  1. The user initiates a quick-transfer
    By pressing the right mouse button (in OSF/Motif), the user initiates a quick-transfer. The UI recognizes the mouse press and sends MSG_META_START_MOVE_COPY to the object under the pointer image.
  2. The source object builds the transfer item
    The object under the pointer image then becomes the "source" of the quick-transfer. It first calls ClipboardStartQuickTransfer() to initiate the quick-transfer mechanism. It then builds the transfer item just as it would if the user had clicked on the Copy trigger in the Edit menu. It then logs the transfer item with the quick-transfer mechanism.
  3. The source becomes a potential destination
    Immediately after logging the transfer item, the source object becomes a potential destination of the quick-transfer. It must immediately provide feedback to the UI indicating whether it can accept the transfer item and whether the operation would be a move or a copy. The feedback is provided by calling ClipboardSetQuickTransferFeedback() . If the source object is a visible object in a GenView, it must also send the message MSG_VIS_VUP_ALLOW_GLOBAL_TRANSFER to itself to allow the pointer events to be sent to other objects in other windows (because the GenView grabs the mouse on the press).
  4. The user moves the mouse
    When the user moves the mouse (continuing to hold down the move/copy button), the pointer image may cross over several objects. Each of these is a potential destination and as such must provide feedback similar to that described in (3) above until the pointer moves outside of its bounds. Each object that receives a MSG_META_PTR should check if a quick transfer is in progress by either checking the passed event flags or by calling ClipboardGetQuickTransferStatus() . The object should, in response, provide feedback as to whether it can accept the transfer item or not. It calls ClipboardSetQuickTransferFeedback() with the proper feedback signal.
  5. The user finishes the transfer
    When the user lets up the move/copy button, the object under the pointer image (if any) becomes the destination object (it will receive a MSG_META_END_MOVE_COPY from the UI).
  6. The destination receives the transfer item
    If the transfer item is in a receivable format, the destination will retrieve the item from the Transfer VM File just as if the user had selected the Paste trigger from the Edit menu (except the quick-transfer transfer item is received, not the Clipboard transfer item). The object first checks if it can take the item by calling ClipboardGetQuickItemInfo() on the transfer item. If it can handle the item, it calls ClipboardQueryItem() , grabs the transfer item, and finally calls ClipboardEndQuickTransfer() .
  7. The UI informs the source of the outcome
    After the transfer has been completed by the destination, the UI will send a MSG_META_CLIPBOARD_NOTIFY_QUICK_TRANSFER_CONCLUDED to the source object, informing it about the final outcome of the operation. Some source objects will change shape, shading, or color during a quick-transfer and must know when the transfer is concluded. If the operation is a quick-move, the source must delete the information or object that was moved.

Up: GEOS SDK TechDocs | Up | Prev: 4.1 Supporting Quick-Transfer | Next: 4.3 Quick-Transfer Data Structures