Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
standalone_settings.hpp
Go to the documentation of this file.
1#pragma once
2
15
16#include <pulp/view/view.hpp>
17#include <pulp/view/ui_components.hpp> // TabPanel
18
19#include <string_view>
20
21namespace pulp::format {
22
27 for (view::View* v = (from != nullptr ? from->parent() : nullptr);
28 v != nullptr; v = v->parent()) {
29 if (auto* tp = dynamic_cast<view::TabPanel*>(v)) return tp;
30 }
31 return nullptr;
32}
33
39 auto* tp = enclosing_settings_chrome(from);
40 return tp != nullptr && tp->tab_count() >= 2;
41}
42
46 if (auto* tp = enclosing_settings_chrome(from)) {
47 if (tp->tab_count() >= 2) tp->set_active_tab(std::string_view("Settings"));
48 }
49}
50
51} // namespace pulp::format
Tabbed container that shows one child at a time.
Definition ui_components.hpp:356
Definition view.hpp:73
View * parent() const
Definition view.hpp:163
What the product grants a device: the quota table indexed by capability tier and live thermal state.
Definition aax_editor.hpp:31
view::TabPanel * enclosing_settings_chrome(view::View *from)
The nearest TabPanel ancestor of from, or nullptr.
Definition standalone_settings.hpp:26
void open_standalone_settings(view::View *from)
Switch the enclosing standalone chrome to its Settings tab (Audio/MIDI).
Definition standalone_settings.hpp:45
bool standalone_settings_available(view::View *from)
True when from is hosted in the standalone settings chrome (a TabPanel ancestor carrying the Settings...
Definition standalone_settings.hpp:38
Additional UI components: ComboBox, Tooltip, ProgressBar, CallOutBox, TabPanel, ListBox,...