Re: detecting a mouse click

1998-05-26 Thread Glynn Clements
Ibrahim Haddad wrote: How to call a function for example XtAddCallback (widget, XmNactivateCallback, modifyGraphTask, shell); when I don't have "widget"? Is there a straight forward way to call it without the use of XtAddCallback which requires the use of a widget for which the

Re: detecting a mouse click

1998-05-25 Thread Ibrahim Haddad
Hello All, I was able to get the mouse coordinates when clicking over a drawing area thanks to the very useful hint of Mr. Glynn Clements. Register a callback function on the XmNinputCallback list. The function will be passed a pointer to a XmDrawingAreaCallbackStruct: typedef struct

Re: detecting a mouse click

1998-05-20 Thread Glynn Clements
Ibrahim Haddad wrote: I am drawing objects in a Motif drawing area using X libraries routinres such as drawRectangle/line/... Every object has 4 coordinates: x1,y1 and x2,y2. I need to be able to: Whenever I detect a mouse click, see what are its coordinates, and if it falls within the

detecting a mouse click

1998-05-19 Thread Ibrahim Haddad
Hello All, I am drawing objects in a Motif drawing area using X libraries routinres such as drawRectangle/line/... Every object has 4 coordinates: x1,y1 and x2,y2. I need to be able to: Whenever I detect a mouse click, see what are its coordinates, and if it falls within the borders of some