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
14
Icons
A user may close an application to save space on the display. The program is still running
and it may even be active, but it is not receiving input from the user. In order to represent the
application in its closed state, an icon is used. An icon is a small picture that represents the
application, as shown in Figure 14-1 from the OPEN LOOK GUI Specification Guide.
Figure 14-1. Three bordered default icons
The graphic image that icons use may be used for other purposes and, therefore, may be
shared among other objects in the application. But the icon image should be designed to eas-
ily identify the application while in a closed state. Icons may also have text associated with
them. Space is limited, so the text is usually the name of the application.
14.1 Creating and Destroying Icons
To use the ICON package, include the header file <xview/icon.h>. Figure 14-2 shows the
class hierarchy for the ICON package.
The form for creating an icon is:
Icon icon;
icon = (Icon)xv_create(owner, ICON,
attributes
, NULL);
The owner of an icon is a base frame, but it may be created with a NULL owner. Once an
icon is assigned to a frame, the owner of the icon is changed to that frame. This is another
example of delayed binding.
Icons
Icons 339
Generic
Object
(Drawable) Window Icon
Figure 14-2. Icon package class hierarchy ...
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