Beispiel #1
0
MovableIcon::MovableIcon(Icon *i)
: Fl_Window(desktop->x()+i->x(), desktop->y()+i->y(), i->w(), i->h())
{
    icon = i;
    set_override();
    create();

    Fl_Image *im = i->icon_im;
    if(im)
    {
        Pixmap mask = im->create_mask(im->width(), im->height());
        XShapeCombineMask(fl_display, fl_xid(this), ShapeBounding, 0, 0, mask, ShapeSet);

        align(FL_ALIGN_INSIDE);
        image(im);
    }
}
Beispiel #2
0
MovableIcon::MovableIcon(Icon* i) : Fl_Window(i->x(), i->y(), i->w(), i->h()), icon(i)
{
	assert(icon != NULL);
	set_override();
	create();

	Fl_Image* img = icon->icon_image();
	if(img)
	{
#ifdef SHAPE
		Pixmap mask = img->create_mask(img->width(), img->height());
		XShapeCombineMask(fl_display, fl_xid(this), ShapeBounding, 0, 0, mask, ShapeSet);
#endif
		align(FL_ALIGN_INSIDE);
		image(img);
	}
}