The program is written using X Toolkit Intrinsics and Xaw.
You want to add one or more actions to the widget in question (the actions
field in the core
of struct stripChartClassRec
) and one or more translations (the tm_table
field).
Actions are C functions called in response to abstract events that you, the widget writer, define (like e.g. startDragging()
or pageDown()
). Translations map these abstract events to concrete events that Xt understands (like e.g. <Btn1Down>
or <Key>KP_PageUp
).
Inside the action you have access to the XEvent
struct that has triggered the action, and from there you can get mouse coordinates or whatever.
To see how actions and translations are set up, look at one of the existing Xaw widgets, e.g. Panner. You can download the Xaw source here.