[ Previous | Next | Contents | Glossary | Home | Search ]
Motif 2.1 Programmer's Guide



Ideas For Applications

Your application can use two new callbacks, XmNconvertCallback and XmNdestinationCallback, to extend or override the data transfer capabilities of any Motif widget. In order to override the data transfer capability of a widget, an application has to provide the same data transfer code that a widget would. So, if those are your intentions, we refer you back to the Motif Widget Writer's Guide for complete details.

If, however, your intention is to extend the data transfer capabilities of a widget, then the section you are now reading should be helpful. The following suggest several ways in which an application could extend the data transfer capabilities of a widget:

  1. Your application can extend the list of targets supported by a widget. For example, perhaps your application can support a target called _FORMATTED_TEXT, which transfers text in some kind of justified formatted.

  2. Your application can extend the widget to support a new form of data transfer. For example, perhaps your application could extend a particular widget so that it supports Drag and Drop.

  3. Your application can provide a customized data transfer that improves runtime performance. For example, Motif toolkit widgets typically transfer only one target at a time. If your application always needs to transfer the same group of three targets, your application could request a special multiple transfer.

    Before undertaking a UTM project in your application, you should consider the following:

    1. Data transfer code is relatively complicated to write.

    2. By extending a widget, you may run into some consistency problems. For example, suppose your application extends the data transfer capabilities of an XmLabel widget. Since other applications probably will not extend XmLabel in the same way yours has, you run the risk of confusing users. Your application's documentation will have to explain the ways in which XmLabel widgets in your application are different from standard XmLabel widgets.

    3. [ Previous | Next | Contents | Glossary | Home | Search ]