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
An event handler for a canvas would have to track help-key events, display the help frame,
and provide the text to display in the frame. The following code fragments show how this
might be done.
...
canvas = xv_create(frame, CANVAS,
...
WIN_CONSUME_EVENTS, ..., ACTION_HELP, ..., NULL,
WIN_EVENT_PROC, my_event_handler,
NULL);
...
my_event_handler(window, event)
Xv_Window window;
Event *event;
{
if (event_action(event) == ACTION_HELP) {
xv_help_show(window, "canvas:help_info", event);
return;
}
...
}
The meaning of “canvas:help_info” is the same as the help data described earlier.
23.2.5 Help File Installation
Once the help file has been written, you should install it in /usr/lib/help on your system. If
you don’t, then the user must set the $HELPPATH environment variable correctly to point to
the path where the file actually resides. Otherwise, the user’s request for help will result in a
notice that help being posted cannot be found. Further, the file and the path to the file
(including directories and links) must be readable and searchable.
If circumstances prevent you from installing the help file in the designated area, it is not rea-
sonable to expect the user to know where the help file is. That is, do not expect that the user
has set the $HELPPATH variable correctly. You should set the environment for the user. The
path must be set to include at least two pathnames: /usr/lib/help and the path to your help file. ...
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