MCPcopy Create free account
hub / github.com/christophhart/HISE / keyPressed

Method keyPressed

hi_scripting/scripting/scriptnode/ui/ParameterSlider.cpp:1925–1959  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1923}
1924
1925bool MacroParameterSlider::keyPressed(const KeyPress& key)
1926{
1927 if (key == KeyPress::F11Key)
1928 {
1929 NodeBase::List newSelection;
1930 auto network = getParameter()->parent->getRootNetwork();
1931
1932 network->deselectAll();
1933
1934 for (auto c : getParameter()->data.getChildWithName(PropertyIds::Connections))
1935 {
1936 auto nId = c[PropertyIds::NodeId].toString();
1937 if (auto n = network->getNodeWithId(nId))
1938 network->addToSelection(n, ModifierKeys::commandModifier);
1939 }
1940
1941 if (!newSelection.isEmpty())
1942 {
1943 if (auto g = findParentComponentOfClass<DspNetworkGraph>())
1944 {
1945 DspNetworkGraph::Actions::foldUnselectedNodes(*g);
1946 }
1947
1948 }
1949
1950 return true;
1951 }
1952 if (key == KeyPress::deleteKey || key == KeyPress::backspaceKey)
1953 {
1954 deleteButton.triggerClick();
1955 return true;
1956 }
1957
1958 return false;
1959}
1960
1961void ParameterSlider::resized()
1962{

Callers

nothing calls this directly

Calls 9

getParameterFunction · 0.85
getRootNetworkMethod · 0.80
getChildWithNameMethod · 0.80
getNodeWithIdMethod · 0.80
deselectAllMethod · 0.45
toStringMethod · 0.45
addToSelectionMethod · 0.45
isEmptyMethod · 0.45
triggerClickMethod · 0.45

Tested by

no test coverage detected