Skip to Main Content
Volume 6A: Motif Programming Manual
book

Volume 6A: Motif Programming Manual

by David Brennan, Dan Heller, Paula Ferguson
September 1993
Intermediate to advanced content levelIntermediate to advanced
1014 pages
28h 26m
English
O'Reilly Media, Inc.
Content preview from Volume 6A: Motif Programming Manual
Output of toggle_box.c with radioBehavior set to True
As you can see, simply changing this single RowColumn resource completely changes the appearance of all the
ToggleButtons.
12.4 ArrowButtons
An ArrowButton is just like a PushButton, except that it only displays a directional arrow symbol. The arrow can
point up, down, left, or right. Motif provides both widget and gadget versions of the ArrowButton; the associated
header files are <Xm/ArrowB.h> and <Xm/ArrowBG.h>. the source code shows a program that creates four
ArrowButtons, one for each direction. XtSetLanguageProc() is only available in X11R5; there is no
corresponding function in X11R4.
/* arrow.c −− demonstrate the ArrowButton widget.
* Have a Form widget display 4 ArrowButtons in a
* familiar arrangement.
*/
#include <Xm/ArrowBG.h>
#include <Xm/Form.h>
main(argc, argv)
int argc;
char *argv[];
{
XtAppContext app;
Widget toplevel, form;
Display *dpy;
XtSetLanguageProc (NULL, NULL, NULL);
toplevel = XtVaAppInitialize (&app, "Demos",
NULL, 0, &argc, argv, NULL, NULL);
dpy = XtDisplay (toplevel);
/* Rather than listing all these resources in an app−defaults file,
* add them directly to the database for this application only. This
* would be virtually equivalent to hard−coding values, since these
* resources will override any other specified external to this file.
12 Labels and Buttons 12.4 ArrowButtons
331
*/
XrmPutStringResource ...
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 7A: XView Programming Manual

Volume 7A: XView Programming Manual

Dan Heller

Publisher Resources

ISBN: 9780596000431