rem: int refresh = 0;
context: paintPreviewBox(Panel *panel, int elements){    WMScreen *scr = WMWidgetScreen(panel->parent);    Display *dpy = WMScreenDisplay(scr);	int refresh = 0;	GC gc;	WMColor *black = WMBlackColor(scr);	Pixmap mitem;	gc = XCreateGC(dpy, WMWidgetXID(panel->parent), 0, NULL);    if (panel->preview == None) {	WMPixmap *pix;	panel->preview = XCreatePixmap(dpy, WMWidgetXID(panel->parent),				       240-4, 190-4, WMScreenDepth(scr));	pix = WMCreatePixmapFromXPixmaps(scr, panel->preview, None,					 240-4, 190-4, WMScreenDepth(scr));	WMSetLabelImage(panel->prevL, pix);	WMReleasePixmap(pix);    }    XFillRectangle(dpy, panel->preview, WMColorGC(panel->back),		   0, 0, 240-4, 190-4);    if (elements & (1<<WINTITLE)) {	renderPreview(panel, gc, WINTITLE, RBEV_RAISED2);	XDrawRectangle(dpy, panel->preview, WMColorGC(black),		       previewPositions[WINTITLE].pos.x-1,		       previewPositions[WINTITLE].pos.y-1,		       previewPositions[WINTITLE].size.width,		       previewPositions[WINTITLE].size.height);    }    if (elements & (1<<DISTITLE)) {	XDrawRectangle(dpy, panel->preview, WMColorGC(panel->back),		       previewPositions[DISTITLE].pos.x-1,		       previewPositions[DISTITLE].pos.y-1,		       previewPositions[DISTITLE].size.width,		       previewPositions[DISTITLE].size.height);    }    if (elements & (1<<PMTITLE)) {	renderPreview(panel, gc, PMTITLE, RBEV_RAISED2);	XDrawRectangle(dpy, panel->preview, WMColorGC(black),		       previewPositions[PMTITLE].pos.x-1,		       previewPositions[PMTITLE].pos.y-1,		       previewPositions[PMTITLE].size.width,		       previewPositions[PMTITLE].size.height);    }   if (elements & (1<<PMITEM)) {	WMPropList *prop;	prop = GetObjectForKey(textureOptions[PMITEM]);	mitem = renderMenu(panel, prop,			 previewPositions[PMITEM].size.width,			 previewPositions[PMITEM].size.height/4);	XCopyArea(dpy, mitem, panel->preview, gc, 0, 0,		  previewPositions[PMITEM].size.width,		  previewPositions[PMITEM].size.height,		  previewPositions[PMITEM].pos.x,		  previewPositions[PMITEM].pos.y);	XFreePixmap(dpy, mitem);    }    if (elements & (1<<PMITEM|1<<PMTITLE)) {	XDrawLine(dpy, panel->preview, gc, 29, 125, 29, 125+20*4+25);	XDrawLine(dpy, panel->preview, gc, 119, 125, 119, 125+20*4+25);    }    if (elements & (1<<PCLIP)) {	renderClip(panel, gc, PCLIP, RBEV_RAISED3);	XDrawRectangle(dpy, panel->preview, WMColorGC(black),		       previewPositions[PCLIP].pos.x-1,		       previewPositions[PCLIP].pos.y-1,		       previewPositions[PCLIP].size.width,		       previewPositions[PCLIP].size.height);    }    if (elements & (1<<PICON)) {	renderPreview(panel, gc, PICON, RBEV_RAISED3);	XDrawRectangle(dpy, panel->preview, WMColorGC(black),		       previewPositions[PICON].pos.x-1,		       previewPositions[PICON].pos.y-1,		       previewPositions[PICON].size.width,		       previewPositions[PICON].size.height);    }	drawFonts(panel, elements);    WMRedisplayWidget(panel->prevL);	XFreeGC(dpy, gc);	WMReleaseColor(black);}