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
Example 10-1. The scroll_cells.c program (continued)
x = (int)xv_get(horiz_scrollbar, SCROLLBAR_VIEW_START);
y = (int)xv_get(vert_scrollbar, SCROLLBAR_VIEW_START);
for (xrects->count--; xrects->count >= 0; xrects->count--) {
printf("top–left cell = %d, %d –– %d,%d %d,%d0, x+1, y+1,
xrects->rect_array[xrects->count].x,
xrects->rect_array[xrects->count].y,
xrects->rect_array[xrects->count].width,
xrects->rect_array[xrects->count].height);
XCopyPlane(dpy, cell_map, win, gc,
xrects->rect_array[xrects->count].x,
xrects->rect_array[xrects->count].y,
xrects->rect_array[xrects->count].width,
xrects->rect_array[xrects->count].height,
xrects->rect_array[xrects->count].x,
xrects->rect_array[xrects->count].y, 1L);
}
}
10.4 Managing Your Own Scrollbar
A scrollbar may have delayed binding—that is, it may be created without an owner and
attached to objects that were created separately.
In most cases, you would probably never need to create a scrollbar that was not part of a text
subwindow or a canvas. These two packages handle all of the dirty work involved in manag-
ing and maintaining the types of attributes mentioned above. If you are using the CANVAS or
TEXTSW packages, you do not need to worry about any of this. If you do try to create your
own scrollbars and have them manage your own windows, you will probably find that you
will have reinvented the wheel in the form of the
CANVAS package.
If you are going to attempt ...
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