MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / mouseDrag

Method mouseDrag

Source/UIComponents/CtrlrComponents/CtrlrCustomComponent.cpp:136–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136void CtrlrCustomComponent::mouseDrag (const MouseEvent &e)
137{
138 _DBG("CtrlrCustomComponent::mouseDrag");
139 if (isADragAndDropContainer)
140 {
141 if (dadStartCbk && !dadStartCbk.wasObjectDeleted())
142 {
143 if (dadStartCbk->isValid())
144 {
145 DragAndDropContainer* const dragContainer = DragAndDropContainer::findParentDragContainerFor (this);
146 if (dragContainer)
147 {
148 DragAndDropSourceDetails details = owner.getOwnerPanel().getCtrlrLuaManager().getMethodManager().callWithRet (dadStartCbk, this, e);
149 Point<int> offset(details.getImageOffsetX(), details.getImageOffsetY());
150 dragContainer->startDragging (details.getDescription(), this, details.getDragImage(), true, &offset);
151 }
152 }
153 }
154 }
155
156 if (mouseDragCbk && !mouseDragCbk.wasObjectDeleted())
157 {
158 if (mouseDragCbk->isValid())
159 {
160 owner.getOwnerPanel().getCtrlrLuaManager().getMethodManager().call (mouseDragCbk, this, e);
161 }
162 }
163}
164
165void CtrlrCustomComponent::mouseEnter (const MouseEvent &e)
166{

Callers

nothing calls this directly

Calls 8

callWithRetMethod · 0.80
getImageOffsetXMethod · 0.80
getImageOffsetYMethod · 0.80
getDragImageMethod · 0.80
isValidMethod · 0.45
startDraggingMethod · 0.45
getDescriptionMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected