
(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