CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
cdc::plugin_manager::PluginListView Class Reference

#include <PluginListView.h>

Inheritance diagram for cdc::plugin_manager::PluginListView:
cdc::ui::ViewBase cdc::ui::IView

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 PluginListViewactive () 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

Detailed Description

Definition at line 24 of file PluginListView.h.

Constructor & Destructor Documentation

◆ PluginListView()

cdc::plugin_manager::PluginListView::PluginListView ( )
default

Referenced by active().

Member Function Documentation

◆ active()

PluginListView * cdc::plugin_manager::PluginListView::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.

◆ clearDirty()

void cdc::plugin_manager::PluginListView::clearDirty ( )
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.

◆ getFooterHint()

const char * cdc::plugin_manager::PluginListView::getFooterHint ( ) const
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().

◆ getName()

const char * cdc::plugin_manager::PluginListView::getName ( ) const
inlineoverridevirtual

Get view name for debugging

Implements cdc::ui::IView.

Definition at line 36 of file PluginListView.h.

◆ markDirty()

void cdc::plugin_manager::PluginListView::markDirty ( )
inlineoverridevirtual

Mark view as needing re-render

Implements cdc::ui::IView.

Definition at line 33 of file PluginListView.h.

◆ needsRender()

bool cdc::plugin_manager::PluginListView::needsRender ( ) const
inlineoverridevirtual

Check if view needs re-rendering

Implements cdc::ui::IView.

Definition at line 32 of file PluginListView.h.

◆ onEnter()

void cdc::plugin_manager::PluginListView::onEnter ( void * context = nullptr)
overridevirtual

Called when view becomes active (pushed or becomes top)

Parameters
contextOptional context data from parent

Implements cdc::ui::IView.

Definition at line 111 of file PluginListView.cpp.

References cdc::plugin_manager::s_active.

◆ onExit()

void cdc::plugin_manager::PluginListView::onExit ( )
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.

◆ onKey()

cdc::ui::InputResult cdc::plugin_manager::PluginListView::onKey ( char key)
overridevirtual

Handle key press

Parameters
keyKey character ('0'-'9', 'Y', 'N', etc.)
Returns
Input result

Implements cdc::ui::IView.

Definition at line 142 of file PluginListView.cpp.

◆ onResume()

void cdc::plugin_manager::PluginListView::onResume ( )
overridevirtual

◆ refresh()

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.

◆ render()

void cdc::plugin_manager::PluginListView::render ( bool partial)
overridevirtual

Render view content to display buffer

Parameters
partialTrue for partial update, false for full refresh

Implements cdc::ui::IView.

Definition at line 137 of file PluginListView.cpp.


The documentation for this class was generated from the following files: