uunet!ucbvax.Berkeley.EDU!agate!spool.mu.edu!uwm.edu!zaphod.mps.ohio-state.edu!usc!news.cerf.net!benton.prepress.com!benton!mark (Mark S. Bubien) writes:
>>
>> I am looking for a way to put rulers into a Motif
>> window.
>>
>> For example, on the Mac, PageMaker and QuarkExpress both
>> have vertical and horizontal rulers. I want implement
>> something very similar in Motif, but I don't know
>> where to start.
>>
Two different suggestions (I've successfully tried the second):
1) Subclass off the XmDrawingArea widget and use XDrawLines and XDrawString or
XDrawText to do implement the Expose method.
2) Use XmScale widget with numerous children XmLabel widgets, one set for
the tick marks (label: "|") and one set for the numerics.
Set the XmNshowValue resource to False.
To get the widget id of the scrollbar portion of the scale:
Do XtGetValues of XmNnumChildren and XmNchildren, loop over widget list
returned to test for XmIsScrollBar (see ScrollBar.h), unmap the scrollbar