Home » U++ TheIDE » U++ TheIDE: CodeEditor, Assist++, Topic++ » Please bring back drag'n'drop copy
Re: Please bring back drag'n'drop copy [message #21268 is a reply to message #21266] |
Mon, 11 May 2009 12:57   |
 |
mirek
Messages: 14256 Registered: November 2005
|
Ultimate Member |
|
|
Mindtraveller wrote on Mon, 11 May 2009 06:41 | And again
> Without Ctrl, result is 100% predictable and it is move
YES!
>With Ctrl, result is random
Ctrl->drag = YES! (You`ve seen that on video, what a shame it doesn`t indicate pressed keys)
drag->Ctrl = WORKS 100%
So the problem is with initial period when Ctrl is ALREADY pressed before dragging start.
Your patch doesn`t compile (I patched Win32DnD.cpp):
> LOG("DnD " << e == DROPEFFECT_COPY);
error C2678: binary '==' : no operator found which takes a left-hand operand of type 'Upp::Stream' (or there is
no acceptable conversion)
> STDMETHODIMP UDropSource::GiveFeedback(DWORD dwEffect)
error C2027: use of undefined type 'Upp::UDropSource'
> LOG("GiveFeedback " << (dwEffect & DROPEFFECT_COPY) == DROPEFFECT_COPY);
error C2678: binary '==' : no operator found which takes a left-hand operand of type 'Upp::Stream' (or there is
no acceptable conversion)
... (about 5 more errors, please try to compile it)
|
Ah, sorry, put parenthesis around == operators please...
void UDropTarget::DnD(POINTL pl, bool drop, DWORD *effect, DWORD keys)
{
dword e = *effect;
LOG("DnD " << (e == DROPEFFECT_COPY));
*effect = DROPEFFECT_NONE;
if(!ctrl)
return;
PasteClip d;
d.dt = this;
d.paste = drop;
d.accepted = false;
d.allowed = 0;
d.action = 0;
if(e & DROPEFFECT_COPY) {
d.allowed = DND_COPY;
d.action = DND_COPY;
}
if(e & DROPEFFECT_MOVE) {
d.allowed |= DND_MOVE;
if(Ctrl::GetDragAndDropSource())
d.action = DND_MOVE;
}
DDUMP(keys & MK_CONTROL);
if((keys & MK_CONTROL) && (d.allowed & DND_COPY))
d.action = DND_COPY;
if((keys & (MK_ALT|MK_SHIFT)) && (d.allowed & DND_MOVE))
d.action = DND_MOVE;
ctrl->DnD(Point(pl.x, pl.y), d);
DDUMP(d.action);
if(d.IsAccepted()) {
if(d.action == DND_MOVE)
*effect = DROPEFFECT_MOVE;
if(d.action == DND_COPY)
*effect = DROPEFFECT_COPY;
}
}
STDMETHODIMP UDropSource::GiveFeedback(DWORD dwEffect)
{
LOG("GiveFeedback " << ((dwEffect & DROPEFFECT_COPY) == DROPEFFECT_COPY));
Image m = IsNull(move) ? copy : move;
if((dwEffect & DROPEFFECT_COPY) == DROPEFFECT_COPY) {
if(!IsNull(copy)) m = copy;
}
else
if((dwEffect & DROPEFFECT_MOVE) == DROPEFFECT_MOVE) {
if(!IsNull(move)) m = move;
}
else
m = no;
Ctrl::OverrideCursor(m);
Ctrl::SetMouseCursor(m);
return S_OK;
}
|
|
|
 |
|
Please bring back drag'n'drop copy
|
 |
|
Re: Please bring back drag'n'drop copy
By: mirek on Sun, 03 May 2009 22:49
|
 |
|
Re: Please bring back drag'n'drop copy
|
 |
|
Re: Please bring back drag'n'drop copy
By: koldo on Sun, 03 May 2009 23:55
|
 |
|
Re: Please bring back drag'n'drop copy
|
 |
|
Re: Please bring back drag'n'drop copy
By: koldo on Mon, 04 May 2009 09:38
|
 |
|
Re: Please bring back drag'n'drop copy
|
 |
|
Re: Please bring back drag'n'drop copy
By: mirek on Mon, 04 May 2009 10:05
|
 |
|
Re: Please bring back drag'n'drop copy
|
 |
|
Re: Please bring back drag'n'drop copy
By: mirek on Sat, 09 May 2009 17:28
|
 |
|
Re: Please bring back drag'n'drop copy
By: mirek on Mon, 04 May 2009 10:03
|
 |
|
Re: Please bring back drag'n'drop copy
By: kodos on Sat, 09 May 2009 20:34
|
 |
|
Re: Please bring back drag'n'drop copy
|
 |
|
Re: Please bring back drag'n'drop copy
By: mirek on Sun, 10 May 2009 11:38
|
 |
|
Re: Please bring back drag'n'drop copy
|
 |
|
Re: Please bring back drag'n'drop copy
By: mirek on Sun, 10 May 2009 13:16
|
 |
|
Re: Please bring back drag'n'drop copy
By: mirek on Sun, 10 May 2009 13:18
|
 |
|
Re: Please bring back drag'n'drop copy
|
 |
|
Re: Please bring back drag'n'drop copy
By: mirek on Sun, 10 May 2009 17:41
|
 |
|
Re: Please bring back drag'n'drop copy
|
 |
|
Re: Please bring back drag'n'drop copy
By: mirek on Sun, 10 May 2009 18:33
|
 |
|
Re: Please bring back drag'n'drop copy
|
 |
|
Re: Please bring back drag'n'drop copy
By: mirek on Sun, 10 May 2009 19:31
|
 |
|
Re: Please bring back drag'n'drop copy
|
 |
|
Re: Please bring back drag'n'drop copy
By: mirek on Sun, 10 May 2009 22:50
|
 |
|
Re: Please bring back drag'n'drop copy
|
 |
|
Re: Please bring back drag'n'drop copy
By: mirek on Mon, 11 May 2009 11:59
|
 |
|
Re: Please bring back drag'n'drop copy
|
 |
|
Re: Please bring back drag'n'drop copy
By: mirek on Mon, 11 May 2009 12:57
|
 |
|
Re: Please bring back drag'n'drop copy
|
 |
|
Re: Please bring back drag'n'drop copy
By: mirek on Tue, 12 May 2009 10:11
|
 |
|
Re: Please bring back drag'n'drop copy
|
 |
|
Re: Please bring back drag'n'drop copy
By: mirek on Tue, 12 May 2009 15:11
|
 |
|
Re: Please bring back drag'n'drop copy
|
 |
|
Re: Please bring back drag'n'drop copy
By: mirek on Tue, 12 May 2009 16:59
|
 |
|
Re: Please bring back drag'n'drop copy
By: mirek on Sun, 10 May 2009 17:44
|
 |
|
Re: Please bring back drag'n'drop copy
|
 |
|
Re: Please bring back drag'n'drop copy
By: mirek on Sun, 10 May 2009 18:23
|
Goto Forum:
Current Time: Wed Apr 30 06:51:06 CEST 2025
Total time taken to generate the page: 0.04301 seconds
|