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
Xv_Window window;
Canvas canvas;
CANVAS_EACH_PAINT_WINDOW(canvas, window)
draw_into_window(window);
CANVAS_END_EACH
Because the paint windows are different from the view windows, a slightly different method
is used for getting view windows:
Xv_Window view;
Canvas canvas;
int i = 0;
while (window = (Xv_Window)xv_get(canvas, OPENWIN_NTH_VIEW, i)) {
/* process
window
*/
i++;
}
There is also a macro that loops through all the views in the canvas:
Xv_Window view;
Canvas canvas;
OPENWIN_EACH_VIEW(canvas, view)
...
OPENWIN_END_EACH
You can get the paint window associated with a view by using the attribute CANVAS_
VIEW_PAINT_WINDOW
:
Xv_Window view;
Xv_Window paint_window;
paint_window = (Xv_Window)xv_get(view, CANVAS_VIEW_PAINT_WINDOW);
This is useful in situations where you are given the view window and need to get the paint
window associated with it. For example, the routines called when views are split or joined
are passed handles to view windows. When a view is split, you will need to get the paint
window associated with the new view to install event or repaint callbacks.
5.7 Handling Input in the Canvas Package
This section discusses, to a limited degree, the method for handling and specifying events in
a canvas. For a detailed discussion of the types of events used and the proper method for
handling them, see Chapter 6, Handling Input.
Canvases and
Openwin
Canvases and Openwin 105
5.7.1 Default Events
The default
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