Example #1
0
void IconDes::Paste(const Image& img)
{
	FinishPaste();
	if(!IsCurrent())
		return;
	Slot& c = Current();
	c.base_image = c.image;
	c.paste_image = img;
	c.pastepos = Point(0, 0);
	MakePaste();
	SetBar();
}
Example #2
0
void IconDes::MouseMove(Point p, dword keyflags)
{
	if(!HasCapture() || !IsCurrent())
		return;
	p = GetPos(p);
	if(IsPasting()) {
		Current().pastepos = p - startpoint;
		MakePaste();
		return;
	}
	if(selectrect)
		EmptyRectTool(p, keyflags);
	else
	if(tool)
		(this->*tool)(p, keyflags);
}
Example #3
0
void IconDes::Move()
{
	if(!IsCurrent())
		return;
	Slot& c = Current();
	selectrect = false;
	if(IsPasting())
		FinishPaste();
	else {
		doselection = false;
		rgbactrl.Mask(false);
		rgbactrl.Hide();
		Rect r = SelectionRect();
		Image m = Copy(r);
		Delete();
		SetSelect(255);
		c.base_image = c.image;
		c.paste_image = m;
		c.pastepos = r.TopLeft();
		MakePaste();
	}
	SetBar();
}
Example #4
0
void IconDes::TogglePaste()
{
	paste_opaque = !paste_opaque;
	MakePaste();
	SetBar();
}