void NodeComponent::mouseUp (const MouseEvent& e) { if (e.mouseWasClicked() && e.getNumberOfClicks() == 2) { if (const AudioProcessorGraph::Node::Ptr f = audioEngine.getDoc().getNodeForId (nodeID)) { AudioProcessor* const processor = f->getProcessor(); if(!InternalPluginFormat::isInternalFormat(processor->getName())) { if (PluginWindow* const w = PluginWindow::getWindowFor (f, PluginWindow::Generic/*Normal*/)) w->toFront (true); } } } else if (! e.mouseWasClicked()) { audioEngine.getDoc().setChangedFlag (true); if (moving) { moving = false; audioEngine.getDoc().beginTransaction(); audioEngine.getDoc().perform(new MoveNodeAction(audioEngine, *getGraphEditor(), nodeID, startPos, endPos), "move node"); } } }
void ObjectsHolder::mouseUp(const MouseEvent& e) { if (e.mouseWasClicked()) { } if (e.mouseWasClicked() && ! e.mods.isAnyModifierKeyDown()) { // object changed objController.getSelectedObjects().deselectAll(); } lassoComp.endLasso(); }
void CommentComponent::mouseDrag (const MouseEvent& e) { if (! e.mods.isPopupMenu()) { jassert (dynamic_cast <ObjectsHolder*> (getParentComponent()) != 0); // const Rectangle<int> area (((ObjectsHolder*) getParentComponent())->getComponentArea()); if (selected && ! dragging) { dragging = ! e.mouseWasClicked(); if (dragging) { owner.startDragging (); } } if (dragging) { owner.dragSelectedComps (e.getDistanceFromDragStartX(), e.getDistanceFromDragStartY()); } update(); } }
void Dockable::continueDocking (const MouseEvent& e) { if (! (e.mouseWasClicked() || isDragging)) { const String dragDescription (getDragDescription()); if (dragDescription.isNotEmpty()) { isDragging = true; Component* const dragSourceComponent = getDragComponent(); DragAndDropContainer* const dragContainer = DragAndDropContainer::findParentDragContainerFor (dragSourceComponent); if (dragContainer != 0) { dragContainer->startDragging (dragDescription, dragSourceComponent, getDragImage ()); } else { // to be able to do a drag-and-drop operation, the component needs to // be inside a component which is also a DragAndDropContainer. jassertfalse; } } } }
void ChildAlias::mouseDrag (const MouseEvent& e) { if (e.mods.isLeftButtonDown()){ if (e.eventComponent == resizer) { } else { if (!e.mouseWasClicked ()) { constrainer->setMinimumOnscreenAmounts(getHeight(), getWidth(), getHeight(), getWidth()); dragger.dragComponent (this,e, constrainer); applyToTarget (""); if(type.containsIgnoreCase("juce::GroupComponent")|| type.containsIgnoreCase("CabbageImage")) toBack(); } } if(type.containsIgnoreCase("juce::GroupComponent")|| type.containsIgnoreCase("CabbageImage")) toBack(); else toFront(true); }//end of left click check }
void ComboBox::mouseDrag (const MouseEvent& e) { beginDragAutoRepeat (50); if (isButtonDown && ! e.mouseWasClicked()) showPopupIfNotActive(); }
//================================================================================================= void ClipsContainer::mouseDown (const MouseEvent& event) { if (event.mouseWasClicked() && event.mods.isLeftButtonDown()) controller->deselectAll(); if (getParentComponent() != nullptr) getParentComponent()->mouseDown(event); }
void ComponentLayoutEditor::mouseUp (const MouseEvent& e) { lassoComp.endLasso(); removeChildComponent (&lassoComp); if (e.mouseWasClicked() && ! e.mods.isAnyModifierKeyDown()) layout.getSelectedSet().deselectAll(); }
void mouseUp (const MouseEvent& e) { if (e.mouseWasClicked() && e.getNumberOfClicks() == 2) { const AudioProcessorGraph::Node::Ptr f (graph.getNodeForId (filterID)); if (f != nullptr) { PluginWindow* const w = PluginWindow::getWindowFor (f, false); if (w != nullptr) w->toFront (true); } } else if (! e.mouseWasClicked()) { graph.setChangedFlag (true); } }
void PaintRoutineEditor::mouseUp (const MouseEvent& e) { lassoComp.endLasso(); if (e.mouseWasClicked() && ! e.mods.isAnyModifierKeyDown()) { graphics.getSelectedElements().deselectAll(); graphics.getSelectedPoints().deselectAll(); } }
void Label::mouseUp (const MouseEvent& e) { if (editSingleClick && e.mouseWasClicked() && contains (e.getPosition()) && ! e.mods.isPopupMenu()) { showEditor(); } }
void sfzero::ClickableLabel::mouseUp(const MouseEvent &e) { bool goodClick = e.mouseWasClicked() && contains(e.getPosition()) && !e.mods.isPopupMenu(); if (goodClick) { BailOutChecker checker(this); clickListeners.callChecked(checker, &ClickListener::labelClicked, this); } }
void AudioOutConnector::mouseUp(const MouseEvent& e) { if (e.mouseWasClicked() && e.getNumberOfClicks() == 2) { showGainPanel(); } owner.getSelectedObjects().addToSelectionOnMouseUp (this, e.mods, false, mouseDownSelectStatus); update(); }
void BaseConnector::mouseUp(const MouseEvent& e) { if (e.mouseWasClicked() && e.getNumberOfClicks() == 2) { propertiesWindow->makeVisible(true); } owner.getSelectedObjects().addToSelectionOnMouseUp (this, e.mods, false, mouseDownSelectStatus); update(); }
void mouseUp (const MouseEvent& e) { if (selectRowOnMouseUp && e.mouseWasClicked() && isEnabled()) { owner.selectRowsBasedOnModifierKeys (row, e.mods, true); const int columnId = owner.getHeader().getColumnIdAtX (e.x); if (columnId != 0 && owner.getModel() != nullptr) owner.getModel()->cellClicked (row, columnId, e); } }
//================================================================================================= void ClipsContainer::mouseUp (const MouseEvent& event) { // 右键单击弹出菜单, if (event.mouseWasClicked() && event.mods.isPopupMenu()) { popupMenu(); controller->expandContainerWidthIfNeeded(); } if (getParentComponent() != nullptr) getParentComponent()->mouseUp(event); }
void mouseUp (const MouseEvent& e) override { if (selectRowOnMouseUp && e.mouseWasClicked() && isEnabled()) { owner.selectRowsBasedOnModifierKeys (row, e.mods, true); const int columnId = owner.getHeader().getColumnIdAtX (e.x); if (columnId != 0) if (TableListBoxModel* m = owner.getModel()) m->cellClicked (row, columnId, e); } }
void mouseUp (const MouseEvent& e) { updateButtonUnderMouse (e); if (needSelectionOnMouseUp && e.mouseWasClicked()) { Rectangle<int> pos; TreeViewItem* const item = findItemAt (e.y, pos); if (item != 0) selectBasedOnModifiers (item, e.mods); } }
void SplittableWaveDisplay::mouseDown(const MouseEvent &e){ std::cout<<"Clicked \n"; if (!e.mouseWasClicked()){ mouseDrag(e); } if(e.mods.isShiftDown()){ if (!e.mods.isAltDown()){ } } else{} waveDisplay.mouseDown(e); }
void ChildAlias::mouseDrag (const MouseEvent& e) { if (e.eventComponent == resizer) { } else { if (!e.mouseWasClicked ()) { dragger.dragComponent (this,e); applyToTarget (); } } }
void InterpolationSpacePreset::mouseUp (const MouseEvent& e) { if (! e.mouseWasClicked()) { endBounds = getBounds(); if(dragging && startBounds != endBounds) { audioEngine.getDoc().beginTransaction(); audioEngine.getDoc().perform(new MovePresetAction(dynamic_cast<PMixInterpolationSpaceLayout*>(getParentComponent()), getComponentID(), startBounds, endBounds), TRANS("change preset bounds")); } } dragging = false; }
void LinkComponent::mouseUp(const MouseEvent& e) { if (e.mouseWasClicked() && e.getNumberOfClicks() == 2) { getObjectsHolder()->editObjectProperties(this); } else if (e.mods.isPopupMenu()) { showContextMenu(); return; // this may be deleted now.. } owner.getSelectedObjects().addToSelectionOnMouseUp (this, e.mods, false, mouseDownSelectStatus); update(); }
void ObjectComponent::mouseUp (const MouseEvent& e) { if (dragging) owner.endDragging(); if (e.mouseWasClicked() && e.getNumberOfClicks() == 2) { propertiesWindow->makeVisible(true); } owner.getSelectedObjects().addToSelectionOnMouseUp (this, e.mods, dragging, mouseDownSelectStatus); update(); }
void mouseDrag (const MouseEvent& e) { if (isEnabled() && owner.getModel() != nullptr && ! (e.mouseWasClicked() || isDragging)) { const SparseSet<int> selectedRows (owner.getSelectedRows()); if (selectedRows.size() > 0) { const var dragDescription (owner.getModel()->getDragSourceDescription (selectedRows)); if (! (dragDescription.isVoid() || (dragDescription.isString() && dragDescription.toString().isEmpty()))) { isDragging = true; owner.startDragAndDrop (e, dragDescription); } } } }
void ComponentOverlayComponent::mouseDrag (const MouseEvent& e) { if (! e.mods.isPopupMenu()) { if (selected && ! dragging) { dragging = ! e.mouseWasClicked(); if (dragging) layout.startDragging(); } if (dragging) { layout.dragSelectedComps (e.getDistanceFromDragStartX(), e.getDistanceFromDragStartY()); } } }
void mouseDrag (const MouseEvent& e) { if (! (isDragging || e.mouseWasClicked())) { isDragging = true; if (DragAndDropContainer* const dnd = DragAndDropContainer::findParentDragContainerFor (this)) { dnd->startDragging (Toolbar::toolbarDragDescriptor, getParentComponent(), Image::null, 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()) != 0); const Rectangle<int> area (((PaintRoutineEditor*) getParentComponent())->getComponentArea()); if (selected && ! dragging) { dragging = ! e.mouseWasClicked(); if (dragging) owner->startDragging (area); } if (dragging) owner->dragSelectedComps (e.getDistanceFromDragStartX(), e.getDistanceFromDragStartY(), area); } }
void mouseDrag (const MouseEvent& e) { if (isEnabled() && ! (isDragging || e.mouseWasClicked() || e.getDistanceFromDragStart() < 5 || e.mods.isPopupMenu())) { isDragging = true; Rectangle<int> pos; TreeViewItem* const item = findItemAt (e.getMouseDownY(), pos); if (item != 0 && e.getMouseDownX() >= pos.getX()) { const String dragDescription (item->getDragSourceDescription()); if (dragDescription.isNotEmpty()) { DragAndDropContainer* const dragContainer = DragAndDropContainer::findParentDragContainerFor (this); if (dragContainer != 0) { pos.setSize (pos.getWidth(), item->itemHeight); Image dragImage (Component::createComponentSnapshot (pos, true)); dragImage.multiplyAllAlphas (0.6f); Point<int> imageOffset (pos.getPosition() - e.getPosition()); dragContainer->startDragging (dragDescription, &owner, dragImage, true, &imageOffset); } else { // to be able to do a drag-and-drop operation, the treeview needs to // be inside a component which is also a DragAndDropContainer. jassertfalse; } } } } }
void ConnectorComponent::mouseDrag (const MouseEvent& e) { if ((! dragging) && ! e.mouseWasClicked()) { dragging = true; audioEngine.getDoc().removeConnection (sourceNodeId, sourceNodeChannel, destNodeId, destNodeChannel); double distanceFromStart, distanceFromEnd; getDistancesFromEnds (e.x, e.y, distanceFromStart, distanceFromEnd); const bool isNearerSource = (distanceFromStart < distanceFromEnd); getGraphEditor()->beginConnectorDrag (isNearerSource ? 0 : sourceNodeId, sourceNodeChannel, isNearerSource ? destNodeId : 0, destNodeChannel, e); } else if (dragging) { getGraphEditor()->dragConnector (e); } }
void mouseDrag (const MouseEvent& e) override { if (isEnabled() && owner.getModel() != nullptr && ! (e.mouseWasClicked() || 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) { const var dragDescription (owner.getModel()->getDragSourceDescription (rowsToDrag)); if (! (dragDescription.isVoid() || (dragDescription.isString() && dragDescription.toString().isEmpty()))) { isDragging = true; owner.startDragAndDrop (e, rowsToDrag, dragDescription, true); } } } }