本文整理汇总了C++中MCStack::mdrag方法的典型用法代码示例。如果您正苦于以下问题:C++ MCStack::mdrag方法的具体用法?C++ MCStack::mdrag怎么用?C++ MCStack::mdrag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MCStack
的用法示例。
在下文中一共展示了MCStack::mdrag方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: wmdrag
void MCDispatch::wmdrag(Window w)
{
if (!MCModeMakeLocalWindows())
return;
if (isdragsource())
return;
MCStack *target = findstackd(w);
if (target != NULL)
target->mdrag();
MCPasteboard *t_pasteboard;
t_pasteboard = MCdragdata -> GetSource();
// OK-2009-03-13: [[Bug 7776]] - Check for null MCdragtargetptr to hopefully fix crash.
if (t_pasteboard != NULL && MCdragtargetptr != NULL)
{
m_drag_source = true;
m_drag_end_sent = false;
// MW-2009-02-02: [[ Improved image search ]]
// Search for the appropriate image object using the standard method - note
// here we search relative to the target of the dragStart message.
MCImage *t_image;
t_image = NULL;
if (MCdragimageid != 0)
t_image = MCdragtargetptr != NULL ? MCdragtargetptr -> resolveimageid(MCdragimageid) : resolveimageid(MCdragimageid);
MCdragsource = MCdragtargetptr;
if (MCdragtargetptr->gettype() > CT_CARD)
{
MCControl *cptr = (MCControl *)MCdragtargetptr;
cptr->munfocus();
cptr->getcard()->ungrab();
}
MCdragtargetptr->getstack()->resetcursor(True);
MCdragtargetptr -> getstack() -> munfocus();
MCdragaction = MCscreen -> dodragdrop(t_pasteboard, MCallowabledragactions, t_image, t_image != NULL ? &MCdragimageoffset : NULL);
dodrop(true);
MCdragdata -> ResetSource();
MCdragsource = NULL;
MCdragdest = NULL;
MCdropfield = NULL;
MCdragtargetptr = NULL;
m_drag_source = false;
}
else
{
MCdragdata -> ResetSource();
MCdragsource = NULL;
MCdragdest = NULL;
MCdropfield = NULL;
MCdragtargetptr = NULL;
m_drag_source = false;
}
}