int j, button=10, f=1, sizing=0;
Option *opt, *graph = (Option *) client_data;
PointerCallback *userHandler = graph->target;
- cairo_t *cr;
if (!XtIsRealized(widget)) return;
// so only change when size is no longer good
if(graph->choice) cairo_surface_destroy((cairo_surface_t *) graph->choice);
graph->choice = (char**) cairo_image_surface_create (CAIRO_FORMAT_ARGB32, w, h);
+ break;
}
- cr = cairo_create((cairo_surface_t *) graph->textValue);
- cairo_set_source_surface(cr, (cairo_surface_t *) graph->choice, 0, 0);
- cairo_rectangle(cr, ((XExposeEvent*)event)->x, ((XExposeEvent*)event)->y, ((XExposeEvent*)event)->width, ((XExposeEvent*)event)->height);
- cairo_fill(cr);
- cairo_destroy(cr);
+ ExposeRedraw(graph, ((XExposeEvent*)event)->x, ((XExposeEvent*)event)->y,
+ ((XExposeEvent*)event)->width, ((XExposeEvent*)event)->height);
return;
case MotionNotify:
f = 0;
}
void
-DrawExpose (Option *opt, int x, int y, int w, int h)
+GraphExpose (Option *opt, int x, int y, int w, int h)
{
XExposeEvent e;
- opt = &mainOptions[W_BOARD];
if(!opt->handle) return;
e.x = x; e.y = y; e.width = w; e.height = h; e.count = -1; e.type = Expose; // count = -1: kludge to suppress sizing
GraphEventProc(opt->handle, (caddr_t) opt, (XEvent *) &e); // fake expose event