|
CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
|
#include <PluginListView.h>
Public Member Functions | |
| PluginListView () | |
| void | onEnter (void *context=nullptr) override |
| void | onExit () override |
| void | onResume () override |
| void | render (bool partial) override |
| bool | needsRender () const override |
| void | markDirty () override |
| void | clearDirty () override |
| cdc::ui::InputResult | onKey (char key) override |
| const char * | getName () const override |
| const char * | getFooterHint () const override |
| void | refresh () |
| Public Member Functions inherited from cdc::ui::ViewBase | |
| virtual | ~ViewBase ()=default |
| void | onEnter (void *context) override |
| void | onExit () override |
| void | onResume () override |
| void | onPause () override |
| void | setLifecycleHooks (void(*onHide)(void *), void(*onShow)(void *), void *userData) override |
| bool | needsRender () const override |
| void | markDirty () override |
| void | clearDirty () override |
| void | setFooterHint (const char *hint) override |
| const char * | getFooterHint () const override |
| Public Member Functions inherited from cdc::ui::IView | |
| virtual | ~IView ()=default |
| virtual bool | prefersLightRefresh () const |
| virtual InputResult | onLongPress (char key) |
| virtual void | onTick (uint32_t nowMs) |
Static Public Member Functions | |
| static PluginListView * | active () noexcept |
| Currently-mounted PluginListView instance, or nullptr if none. | |
Additional Inherited Members | |
| Protected Member Functions inherited from cdc::ui::ViewBase | |
| void | setTitle (const char *title) |
| const char * | getTitle () const |
| Protected Attributes inherited from cdc::ui::ViewBase | |
| bool | dirty_ = true |
| const char * | title_ = nullptr |
| const char * | customFooter_ = nullptr |
| void(* | onHide_ )(void *) = nullptr |
| void(* | onShow_ )(void *) = nullptr |
| void * | lifecycleUserData_ = nullptr |
Definition at line 24 of file PluginListView.h.
|
default |
Referenced by active().
|
staticnodiscardnoexcept |
Currently-mounted PluginListView instance, or nullptr if none.
Definition at line 107 of file PluginListView.cpp.
References PluginListView(), and cdc::plugin_manager::s_active.
|
inlineoverridevirtual |
Clear the dirty flag. Called automatically by ViewStack after a successful render() pass. Subclasses that animate or update every tick must call markDirty() themselves in onTick().
Implements cdc::ui::IView.
Definition at line 34 of file PluginListView.h.
|
overridevirtual |
Get footer hint text (e.g., "[Y] OK [N] Back") Return nullptr for no footer
Reimplemented from cdc::ui::IView.
Definition at line 147 of file PluginListView.cpp.
References cdc::ui::tr().
|
inlineoverridevirtual |
Get view name for debugging
Implements cdc::ui::IView.
Definition at line 36 of file PluginListView.h.
|
inlineoverridevirtual |
Mark view as needing re-render
Implements cdc::ui::IView.
Definition at line 33 of file PluginListView.h.
|
inlineoverridevirtual |
Check if view needs re-rendering
Implements cdc::ui::IView.
Definition at line 32 of file PluginListView.h.
|
overridevirtual |
Called when view becomes active (pushed or becomes top)
| context | Optional context data from parent |
Implements cdc::ui::IView.
Definition at line 111 of file PluginListView.cpp.
References cdc::plugin_manager::s_active.
|
overridevirtual |
Called when view is being removed from stack
Implements cdc::ui::IView.
Definition at line 119 of file PluginListView.cpp.
References cdc::plugin_manager::s_active.
|
overridevirtual |
Handle key press
| key | Key character ('0'-'9', 'Y', 'N', etc.) |
Implements cdc::ui::IView.
Definition at line 142 of file PluginListView.cpp.
|
overridevirtual |
Called when view becomes visible again (child popped)
Implements cdc::ui::IView.
Definition at line 124 of file PluginListView.cpp.
References cdc::plugin_manager::PluginManager::instance(), cdc::plugin_manager::PluginManager::requestStopActivePlugin(), cdc::plugin_manager::s_active, cdc::ui::showToastInfo(), and cdc::ui::tr().
| void cdc::plugin_manager::PluginListView::refresh | ( | ) |
Rebuild the item list from installed plugins and request a redraw. Called after a context-menu Stop changes a plugin's running state.
Definition at line 152 of file PluginListView.cpp.
|
overridevirtual |
Render view content to display buffer
| partial | True for partial update, false for full refresh |
Implements cdc::ui::IView.
Definition at line 137 of file PluginListView.cpp.