Path: utzoo!attcan!uunet!husc6!bloom-beacon!UTADNX.CC.UTEXAS.EDU!ccaw001
From: ccaw001@UTADNX.CC.UTEXAS.EDU ("Rick Watson")
Newsgroups: comp.windows.x
Subject: calling a widget's select proc/HP widget
Message-ID: <8808171454.AA27975@ATHENA.MIT.EDU>
Date: 17 Aug 88 14:37:00 GMT
Sender: daemon@bloom-beacon.MIT.EDU
Organization: The Internet
Lines: 31

What is the correct way to simulate a mouse hit on a button/toggle
widget?

I need to simulate a mouse hit on an XwtoggleWidgetClass (HP) widget.
If I use :

	XtSetArg(arg[0], XtNset, True);
	XtSetValues(widget, arg, 1);

The widget does set, but it is erased and redrawn. Is this a problem
with the widget or my code?

I can call the select routine directly:

  if(XtIsSubclass((Widget)widget, XwprimitiveWidgetClass))
     (*(((XwPrimitiveWidgetClass)
         (widget -> core.widget_class)) ->
          primitive_class.select_proc)) (widget, (XEvent *)NULL);

and things work ok, but this doesn't seem quite legal to me.  (This is
how the HP RowColumn manager widget does it.)

Is there a general way to call routines in a widget's XtActionsRec?

Rick Watson
University of Texas Computation Center
 arpa:   watson@utadnx.cc.utexas.edu (128.83.1.26)
 uucp:   ...seismo!cs.utexas.edu!ut-emx!rick
 bitnet: watson@utadnx
 span:   utspan::watson (UTSPAN is 25.128)
 phone:  512/471-8220 512/471-3241