?? XmNstateChangedCallback

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

5 posts / 0 new
Last post
?? XmNstateChangedCallback

Submitted by Anonymous on Thu, 12/13/2001 - 20:30. Developers
Anyone ever hear of this resource?
Can developers make up a resource callback list on Motif 1.2?

Thanks you, New

ICS_support

Perhaps you are referring to the XmNvalueChangedCallback on the XmToggleButton[Gadget], which is triggered when the XmNset is changed. The resource XmNset controls what is called the "state" or "value" of the widget and shouldn`t be confused with the actual resource XmNvalue, which is something else completely for XmScale and XmText[Field].

The callbacks Motif supports can be found through the file , which includes string definitions, probably from . The compiler will catch invalid string definitions. (Is this what is happening to you?)

The callbacks, and these string definitions, are determined by the widget writer, who decides that a widget supports such a callback and includes in the source code a resource of type XtCallback and calls from within the widget that call application callback routines associated with this callback. (The application could add its own in the same way, but the process is so unusual as to not be an option.)

Anonymous

Nope. I am referring to the Callback I wrote.

Anonymous

Not only does this compile but it runs correctly.
I just can`t find a definition for it.
-thanks, New

ICS_support

If you`re a widget-writer, you can put a definition in the public header file. That is, if you are writing the widget FooBar, then you`d typically have a header file "FooBar.h" for applications to include. In that file, you can put

#define XmNstateChangedCallback "stateChangedCallback"

Applications then use XmNstateChangedCallback.

If no definition exists already, then you can create one in this way.

You may find it useful, though, to use on of the callback definitions already provided by Motif. In this case, your widget can use XmNvalueChangedCallback, which sounds semantically close enough to be useful.

(If, on the other hand, you are talking about the application use of XmNstateChangedCallback, then you can check the man pages for the widget your application is using; the definition is in the public header files. You can use "cc -P" or "cc -E" to track down exactly which one.)