PreferencesPanel — sidebar-of-pages container for app preferences. More...
#include <algorithm>#include <functional>#include <memory>#include <optional>#include <string>#include <vector>#include <pulp/state/properties_file.hpp>#include <pulp/view/view.hpp>Go to the source code of this file.
Classes | |
| class | pulp::view::PreferencesPanel |
| struct | pulp::view::PreferencesPanel::Page |
Namespaces | |
| namespace | pulp |
| namespace | pulp::view |
| Hover-cursor tracking for platform window hosts. | |
PreferencesPanel — sidebar-of-pages container for app preferences.
PreferencesPanel is a View subclass that hosts a sidebar of named "pages". Each page is a (title, icon, content) tuple; the panel shows the sidebar entries on the left and the active page's content view filling the rest. Setting the active page is one of:
Persistence: a PreferencesPanel can be bound to a pulp::state::PropertiesFile (typically the user lane of ApplicationProperties) so the last-selected page survives across runs. The persistence key defaults to "preferences.active_page" and is configurable via set_persistence_key. bind_persistence() does a one-shot read of the stored title and selects the matching page (no-op if the page is gone). Subsequent set_active_page calls write back.
Headless-friendly: pages register View content but PreferencesPanel never paints in tests — it just owns the registry + active-index state.
License-lineage note: the name is Pulp-native.