Skip to Main Content
Volume 7A: XView Programming Manual
book

Volume 7A: XView Programming Manual

by Dan Heller
October 1994
Intermediate to advanced content levelIntermediate to advanced
770 pages
22h 58m
English
O'Reilly Media, Inc.
Content preview from Volume 7A: XView Programming Manual
The following code fragment produces a slider with a label:
xv_create(panel, PANEL_SLIDER,
PANEL_LABEL_STRING, "Brightness: ",
PANEL_VALUE, 75,
PANEL_MIN_VALUE, 0,
PANEL_MAX_VALUE, 100,
PANEL_SLIDER_WIDTH, 300,
PANEL_TICKS, 5,
PANEL_NOTIFY_PROC, brightness_proc,
NULL);
The output is shown in Figure 7-17.
Figure 7-17. Sample panel with slider item
7.14 Gauges
Gauges are just like sliders, but they are “output only” items. That is, you set the value of the
item and the display of the gauge changes just as it would for sliders. Also, there is no op-
tional type-in field and there is no drag box for the user to interactively change the value of
the gauge. The gauge is intended to be used only as a feedback item.
To create a gauge, use the PANEL_GAUGE package. To set a gauge’s width or height, use
PANEL_GAUGE_WIDTH. This attribute sets the length of the object, whether it is vertically or
horizontally oriented. As with the slider, the orientation is set by the attribute
PANEL_DIRECTION.
7.15 Text Items
A panel text item contains as its value a NULL-terminated string. It contains only printable
characters with no newlines. When a panel receives keyboard input (regardless of where the
pointer is as long as it is within the boundaries of the panel), the keyboard event is passed to
the item with the keyboard focus. A caret is used to indicate the insertion point where new
text is added. You can type in more text ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Volume 6A: Motif Programming Manual

Volume 6A: Motif Programming Manual

David Brennan, Dan Heller, Paula Ferguson
Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization

Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization

Alejandro Terrazas, John Ostuni, Michael Barlow

Publisher Resources

ISBN: 9780937175873