void ComboBox::mouseDrag (const MouseEvent& e) { beginDragAutoRepeat (50); if (isButtonDown && e.mouseWasDraggedSinceMouseDown()) showPopupIfNotActive(); }
void mouseDrag (const MouseEvent& e) override { if (auto* m = owner.getModel()) { if (isEnabled() && e.mouseWasDraggedSinceMouseDown() && ! isDragging) { SparseSet<int> rowsToDrag; if (owner.selectOnMouseDown || owner.isRowSelected (row)) rowsToDrag = owner.getSelectedRows(); else rowsToDrag.addRange (Range<int>::withStartAndLength (row, 1)); if (rowsToDrag.size() > 0) { auto dragDescription = m->getDragSourceDescription (rowsToDrag); if (! (dragDescription.isVoid() || (dragDescription.isString() && dragDescription.toString().isEmpty()))) { isDragging = true; owner.startDragAndDrop (e, rowsToDrag, dragDescription, true); } } } } if (! isDraggingToScroll) if (auto* vp = owner.getViewport()) isDraggingToScroll = vp->isCurrentlyScrollingOnDrag(); }
void PaintRoutineEditor::mouseUp (const MouseEvent& e) { lassoComp.endLasso(); if (! (e.mouseWasDraggedSinceMouseDown() || e.mods.isAnyModifierKeyDown())) { graphics.getSelectedElements().deselectAll(); graphics.getSelectedPoints().deselectAll(); } }
void Label::mouseUp (const MouseEvent& e) { if (editSingleClick && isEnabled() && contains (e.getPosition()) && ! (e.mouseWasDraggedSinceMouseDown() || e.mods.isPopupMenu())) { showEditor(); } }
void mouseDrag (const MouseEvent& e) override { if (e.mouseWasDraggedSinceMouseDown() && ! isDragging) { isDragging = true; if (DragAndDropContainer* const dnd = DragAndDropContainer::findParentDragContainerFor (this)) { dnd->startDragging (Toolbar::toolbarDragDescriptor, getParentComponent(), Image(), true); if (ToolbarItemComponent* const tc = getToolbarItemComponent()) { tc->isBeingDragged = true; if (tc->getEditingMode() == ToolbarItemComponent::editableOnToolbar) tc->setVisible (false); } } } }
void PaintElement::mouseDrag (const MouseEvent& e) { if (! e.mods.isPopupMenu()) { jassert (dynamic_cast<PaintRoutineEditor*> (getParentComponent()) != nullptr); const Rectangle<int> area (((PaintRoutineEditor*) getParentComponent())->getComponentArea()); if (selected && ! dragging) { dragging = e.mouseWasDraggedSinceMouseDown(); if (dragging) owner->startDragging (area); } if (dragging) owner->dragSelectedComps (e.getDistanceFromDragStartX(), e.getDistanceFromDragStartY(), area); } }