A custom settings tab this plugin contributes to the host's Settings UI. More...
#include <processor.hpp>
Public Types | |
| using | ViewDeleter = void (*)(view::View*) |
Public Member Functions | |
| SettingsSection () noexcept | |
| SettingsSection (std::string title, std::unique_ptr< view::View > view) | |
| ~SettingsSection ()=default | |
| SettingsSection (SettingsSection &&) noexcept=default | |
| SettingsSection & | operator= (SettingsSection &&) noexcept=default |
| SettingsSection (const SettingsSection &)=delete | |
| SettingsSection & | operator= (const SettingsSection &)=delete |
| std::unique_ptr< view::View > | take_view () |
| Hand the view over as an ordinary owning pointer (empty if none). | |
Public Attributes | |
| std::string | title |
| Tab label, e.g. | |
| std::unique_ptr< view::View, ViewDeleter > | view |
| Tab content (built by the plugin). | |
A custom settings tab this plugin contributes to the host's Settings UI.
(The matching virtual settings_sections() is appended at the end of this class to preserve additive-only vtable ordering.)
The view is owned through a type-erased deleter, so a SettingsSection can be constructed, moved and destroyed where view::View is incomplete: a consumer of pulp::format-core alone (the inline settings_sections() below destroys a vector of them) never needs the view layer. Only the constructor that adopts a view, and take_view(), live on the view side.
| using pulp::format::Processor::SettingsSection::ViewDeleter = void (*)(view::View*) |
|
inlinenoexcept |
| pulp::format::Processor::SettingsSection::SettingsSection | ( | std::string | title, |
| std::unique_ptr< view::View > | view ) |
|
default |
|
defaultnoexcept |
|
delete |
|
delete |
|
defaultnoexcept |
| std::unique_ptr< view::View > pulp::format::Processor::SettingsSection::take_view | ( | ) |
Hand the view over as an ordinary owning pointer (empty if none).
| std::string pulp::format::Processor::SettingsSection::title |
Tab label, e.g.
"Models".
| std::unique_ptr<view::View, ViewDeleter> pulp::format::Processor::SettingsSection::view |
Tab content (built by the plugin).
Deleted by the deleter installed where it was adopted, so destroying it needs no view::View here.