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
(Resrcs.cols − view_width) * cell_width);
sw_hoffset = 0;
/* Case 2 above */
if (oldw > Resrcs.cols * cell_width)
do_clear = 1;
}
XtVaSetValues (hsb,
XmNsliderSize, max (view_width, 1),
XmNvalue, pix_hoffset / cell_width,
XmNpageIncrement, max (view_width − 1, 1),
NULL);
if (do_clear)
/* XClearWindow() doesn't generate an ExposeEvent */
XClearArea (dpy, cbs−>window, 0, 0, 0, 0, True);
}
void
redraw(window)
Window window;
{
XCopyArea (dpy, pixmap, window, gc, pix_hoffset, pix_voffset,
Resrcs.view_width, Resrcs.view_height, sw_hoffset, sw_voffset);
}
The output of the example is shown in the figure.
Output of xshowbitmap.c
28.3 A Memo Calendar
28 Additional Example Programs 28.3 A Memo Calendar
759
The xmemo program creates a main application window that contains a calendar and a list of months. Selecting a
month changes the calendar, while selecting a day causes that date to become activated. When a date is activated, the
application displays another window that contains a Text widget. The Text widget could be used to keep a memo for
that day if you were to add code to save and retrieve the contents of the memo. If you select the same day a second
time, the window is popped down. the figure shows the output of the program.
The program shown in the source code demonstrates a number of very ...
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