/*
==============================================================================
This file is part of the JUCE framework.
Copyright (c) Raw Material Software Limited
JUCE is an open source framework subject to commercial or open source
licensing.
By downloading, installing, or using the JUCE framework, or combining the
JUCE framework with any other source code, object code, content or any other
copyrightable work, you agree to the terms of the JUCE End User Licence
Agreement, and all incorporated terms including the JUCE Privacy Policy and
the JUCE Website Terms of Service, as applicable, which will bind you. If you
do not agree to the terms of these agreements, we will not license the JUCE
framework to you, and you must discontinue the installation or download
process and cease use of the JUCE framework.
JUCE End User Licence Agreement: https://juce.com/legal/juce-8-licence/
JUCE Privacy Policy: https://juce.com/juce-privacy-policy
This file has been truncated. show original
how do we override this with a custom menu
void showPopupMenu()
{
PopupMenu m;
m.setLookAndFeel (&owner.getLookAndFeel());
m.addItem (1, TRANS ("Velocity-sensitive mode"), true, isVelocityBased);
m.addSeparator();
if (isRotary())
{
PopupMenu rotaryMenu;
rotaryMenu.addItem (2, TRANS ("Use circular dragging"), true, style == Rotary);
rotaryMenu.addItem (3, TRANS ("Use left-right dragging"), true, style == RotaryHorizontalDrag);
rotaryMenu.addItem (4, TRANS ("Use up-down dragging"), true, style == RotaryVerticalDrag);
rotaryMenu.addItem (5, TRANS ("Use left-right/up-down dragging"), true, style == RotaryHorizontalVerticalDrag);
m.addSubMenu (TRANS ("Rotary mode"), rotaryMenu);
}
m.showMenuAsync (PopupMenu::Options(),
ModalCallbackFunction::forComponent (sliderMenuCallback, &owner));
}
I haven’t tried this but could you disable the menu on the slider (I think it should be disabled by default, otherwise call setPopupMenuEnabled (false), then add a MouseListener to the slider and show your own PopupMenu from the mouseDown() event?
Oh yeah it just looks like a very useful menu to me when right clicking a slider to add stuff other than the rotary menu. specifically modulation values or hidden options.