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

Method OSCLogger

hi_scripting/scripting/components/ScriptingPanelTypes.cpp:2383–2442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2381}
2382
2383OSCLogger::OSCLogger(FloatingTile* parent) :
2384 FloatingTileContent(parent),
2385 rm(scriptnode::routing::GlobalRoutingManager::Helpers::getOrCreate(parent->getMainController())),
2386 clearButton("clear", nullptr, *this),
2387 filterButton("filter", nullptr, *this),
2388 pauseButton("pause", nullptr, *this)
2389{
2390 addAndMakeVisible(searchBox);
2391
2392 GlobalHiseLookAndFeel::setTextEditorColours(searchBox);
2393
2394 rm->oscListeners.addListener(*this, OSCLogger::updateConnection, false);
2395
2396 updateConnection(*this, rm->lastData);
2397
2398 clearButton.onClick = [this]()
2399 {
2400 oscLogList.clear();
2401 triggerAsyncUpdate();
2402 };
2403
2404 pauseButton.setToggleModeWithColourChange(true);
2405 pauseButton.setToggleStateAndUpdateIcon(true);
2406
2407 searchBox.onReturnKey = [this]()
2408 {
2409 searchPattern = nullptr;
2410
2411 auto content = searchBox.getText();
2412
2413 if (content.isNotEmpty())
2414 {
2415 try
2416 {
2417 searchPattern = new OSCAddressPattern(content);
2418 }
2419 catch (String& e)
2420 {
2421 PresetHandler::showMessageWindow("OSC Address Pattern error", e, PresetHandler::IconType::Error);
2422 }
2423 }
2424
2425 triggerAsyncUpdate();
2426 };
2427
2428 filterButton.onClick = BIND_MEMBER_FUNCTION_0(OSCLogger::triggerAsyncUpdate);
2429
2430 list.setColour(ListBox::ColourIds::backgroundColourId, Colours::transparentBlack);
2431 list.setModel(this);
2432 addAndMakeVisible(list);
2433
2434 addAndMakeVisible(filterButton);
2435 addAndMakeVisible(clearButton);
2436 addAndMakeVisible(pauseButton);
2437
2438 filterButton.setToggleModeWithColourChange(true);
2439
2440 fader.addScrollBarToAnimate(list.getVerticalScrollBar());

Callers

nothing calls this directly

Calls 11

addScrollBarToAnimateMethod · 0.80
setScrollBarThicknessMethod · 0.80
getMainControllerMethod · 0.45
addListenerMethod · 0.45
clearMethod · 0.45
getTextMethod · 0.45
isNotEmptyMethod · 0.45
setColourMethod · 0.45
setModelMethod · 0.45

Tested by

no test coverage detected