[ Usenet FAQs | Search | Web FAQs | Documents | RFC Index ]
    Search the FAQ Archives

Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Part8 - Part9 - Single Page

Top Document: Motif FAQ (Part 6 of 9)
Previous Document: 193) Where can I find info and examples of the Motif drag and drop
Next Document: 195) Can I register client data for the Motif XmDropSite drop


194) How can I disable Drag and Drop in my Motif 1.2 client ?


[Last modified: Oct 94]

Answer: Several people have reported that for complex hierarchies of widgets,
drag and drop can slow down an application considerably. If you do not need
drag and drop's significant power, you can disable it in your application.

Set the XmDisplay drag-protocol resources to XmDRAG_NONE.  The following code
fragment demonstrates this:

#include <Xm/Display.h>


dw = XmGetXmDisplay(XtDisplay(shell)); /* where "shell" is your client's top-
level shell. */

XtVaSetValues(dw, XmNdragInitiatorProtocolStyle, XmDRAG_NONE, NULL);
XtVaSetValues(dw, XmNdragReceiverProtocolStyle,  XmDRAG_NONE, NULL);


Thanks to Lance Purple (purple@austin.ibm.com)

Ken Lee and Christoph Widmer (widmer@einsteinium.SLCS.SLB.COM) describe how to
disable drag and drop from a resource file:

*dragInitiatorProtocolStyle: XmDRAG_NONE
*dragReceiverProtocolStyle:  XmDRAG_NONE

Ken Lee also notes that as of Motif 1.2, the "Xm" prefix is required for all
token constants in resource files. (Which is why specifying "DRAG_NONE" won't
work but "XmDRAG_NONE" will.)



Top Document: Motif FAQ (Part 6 of 9)
Previous Document: 193) Where can I find info and examples of the Motif drag and drop
Next Document: 195) Can I register client data for the Motif XmDropSite drop

Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Part8 - Part9 - Single Page


[ Usenet FAQs | Search | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
kenton@rahul.net (Ken Lee)

Last Update July 25 2008 @ 00:12 AM

© 2008 FAQS.ORG. All rights reserved.