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

Method NodeComponent

hi_scripting/scripting/scriptnode/ui/NodeComponent.cpp:403–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

401
402
403NodeComponent::NodeComponent(NodeBase* b) :
404 dataReference(b->getValueTree()),
405 node(b),
406 header(*this)
407{
408 if (auto en = node->getEmbeddedNetwork())
409 {
410 addAndMakeVisible(embeddedNetworkBar = new EmbeddedNetworkBar(b));
411 }
412
413 node->getRootNetwork()->addSelectionListener(this);
414
415 setName(b->getId());
416 addAndMakeVisible(header);
417 setOpaque(false);
418
419 repaintListener.setCallback(dataReference, {PropertyIds::ID, PropertyIds::NodeColour},
420 valuetree::AsyncMode::Asynchronously,
421 [this](Identifier id, var)
422 {
423 if (id == PropertyIds::NodeColour)
424 {
425 if (auto dng = findParentComponentOfClass<DspNetworkGraph>())
426 dng->repaint();
427 }
428
429 repaint();
430 });
431}
432
433
434NodeComponent::~NodeComponent()

Callers

nothing calls this directly

Calls 9

getRootNetworkMethod · 0.80
setNameFunction · 0.50
repaintFunction · 0.50
getValueTreeMethod · 0.45
getEmbeddedNetworkMethod · 0.45
addSelectionListenerMethod · 0.45
getIdMethod · 0.45
setCallbackMethod · 0.45
repaintMethod · 0.45

Tested by

no test coverage detected