1. Introduction

Contents of this section

1.1 What is a drag and drop protocol ?

I'm supposing you understand what ``drag and drop'' means. It's an intuitive way to exchange data between programs. A drag and drop protocol is the mean used by the programs to comunicate with each other in order to perform this data exchange. If the programs want to exchange information, they must be able to comunicate with each other in a common language. This language is the ``protocol''. Therefore, if you create your own protocol, chances are other programs will not understand you. So you must ``talk'' to other programs in a common language. In this way, when you receive a drop, you will receive a ``I dropped on you'' message, and you will understand the message no matter who send it to you. This is the purpose of a drag and drop protocol: to provide a common language for this kind of actions.

1.2 What is DND, and why should I use it ?

DND is a drag and drop protocol developed by César Crusius . A C interface to Xt-based programs is avaliable together with OffiX, a collection of useful utilities using the DND protocol.

If you have a program that could benefit from having drag and drop capabilities, DND might be a good choice for the following reasons:

Of course, there are also reasons to not use DND:

I encourage you to use DND at least as a compile-time option for your program. There is already a good reason to do that: the ``files'' program furnished with OffiX. Won't it be good to be able to exchange data with a file manager? Certainly will! And, as you will note, it's very easy to bring this new capability to your program.

1.3 Getting and installing DND

In the actual stage you can only get the Xt interface for DND. If you want to use DND in non-Xt applications, you must write some code. It is not a difficult task to do so (see section The DND internals ).

The best way to install the DND Xt interface library is the following:

Now you should have the static DND library and the necessary header files installed on your system. If you are not root and want to compile your program with DND, just copy the files DragAndDrop.c and the DND header files from the OffiX directory and compile and link them with your program.

1.4 DND and window managers

There seems to be a strange behaviour when DND programs run under OpenWindows, at least under the version I have in my work. With FVWM there are no problems reported yet. If you run DND programs under another window manager, please send me a note telling about the results.


Next Chapter

Table of contents of this chapter, General table of contents

Top of the document, Beginning of this Chapter