
19
Drag and Drop
This chapter describes the XView packages that support drag and drop. Drag and drop
allows data to be moved within an application or between applications. Using drag and drop,
objects are selected, then moved or copied to a new location. The selected object is the drag
and drop source. Selecting the source is referred to as sourcing the drag. An area within the
source application or within another application receives the drop in a pre-registered drop-
site.
This chapter describes packages that are new for XView Version 3. The function
xv_decode_drop() that supports dragging and dropping is now obsolete. Note that
xv_decode_drop() will not work correctly once an application is compiled for V3. The
function is still provided for backwards compatibility for XView Version 2 programs.
Many OPEN LOOK applications use drag and drop operations. For example, an application
may allow text in a text subwindow to be sourced and copied or moved to a new location
within the text subwindow. Similarly, a File Manager’s file icon can be selected and dragged
to the Print Tool icon for printing. OPEN LOOK defines many uses for drag and drop, includ-
ing loading files into an application. Figure 19-1 shows a file being dragged into an editor
and Figure 19-2 shows the application loading the file (receiving the drop).
Drag and drop supports drop previewing where the drop-site image changes to show ...