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(); }
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); }
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(); }
void IconDes::TogglePaste() { paste_opaque = !paste_opaque; MakePaste(); SetBar(); }