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

ListView for the BLE scan results that drives async name resolution while visible and cancels it when the view closes. More...

Inheritance diagram for cdc::ui::BleScanView:
cdc::ui::ListView cdc::ui::ViewBase cdc::ui::IView

Public Member Functions

void onEnter (void *context) override
void onResume () override
void onExit () override
void onTick (uint32_t nowMs) override
const char * getName () const override
Public Member Functions inherited from cdc::ui::ListView
void init (const char *title, const ListItem *items, uint16_t count)
 Initializes list data and selection state.
void setOnSelect (SelectCallback callback)
void setOnMenu (MenuCallback callback)
void setEditMutex (SemaphoreHandle_t mutex)
void setItemRenderer (ItemRenderCallback callback, void *userCtx=nullptr)
void setHint (const char *hint)
void setEmptyText (const char *text)
void setItemHeight (uint8_t height)
uint16_t getSelection () const
void setSelection (uint16_t index)
 Sets the selected item index.
uint16_t getItemCount () const
const ListItemgetSelectedItem () const
 Returns the currently selected item.
void updateItem (uint16_t index)
 Marks the list dirty after the caller updated a backing item.
void insertItem (uint16_t index)
 Reflects a caller-side insertion at index and marks dirty.
void removeItem (uint16_t index)
 Reflects a caller-side removal at index and marks dirty.
void repaintPartial ()
 Requests a redraw; the actual repaint happens once per render cycle.
void preservePosition ()
void render (bool partial) override
 Renders list rows, selection, scroll indicators, and footer.
InputResult onKey (char key) override
 Handles key input for list navigation and actions.
InputResult onLongPress (char key) override
const char * getName () const override
const char * getFooterHint () const override
 Returns footer hint text for this list.
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

Additional Inherited Members

Public Types inherited from cdc::ui::ListView
using SelectCallback = void(*)(uint16_t index, void* userData)
using MenuCallback = void(*)(uint16_t index, void* userData)
using ItemRenderCallback
Static Public Attributes inherited from cdc::ui::ListView
static constexpr uint16_t MAX_ITEMS = 2048
static constexpr uint8_t DEFAULT_ITEM_HEIGHT = 18
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

ListView for the BLE scan results that drives async name resolution while visible and cancels it when the view closes.

Definition at line 596 of file BluetoothMenuUi.cpp.

Member Function Documentation

◆ getName()

const char * cdc::ui::BleScanView::getName ( ) const
inlineoverridevirtual

Get view name for debugging

Implements cdc::ui::IView.

Definition at line 602 of file BluetoothMenuUi.cpp.

◆ onEnter()

void cdc::ui::BleScanView::onEnter ( void * context)
inlineoverridevirtual

Called when view becomes active (pushed or becomes top)

Parameters
contextOptional context data from parent

Implements cdc::ui::IView.

Definition at line 598 of file BluetoothMenuUi.cpp.

References cdc::ui::bleResolveStart(), and cdc::ui::IView::onEnter().

◆ onExit()

void cdc::ui::BleScanView::onExit ( )
inlineoverridevirtual

Called when view is being removed from stack

Implements cdc::ui::IView.

Definition at line 600 of file BluetoothMenuUi.cpp.

References cdc::ui::bleResolveStop(), and cdc::ui::IView::onExit().

◆ onResume()

void cdc::ui::BleScanView::onResume ( )
inlineoverridevirtual

Called when view becomes visible again (child popped)

Implements cdc::ui::IView.

Definition at line 599 of file BluetoothMenuUi.cpp.

References cdc::ui::bleResolveStart(), and cdc::ui::IView::onResume().

◆ onTick()

void cdc::ui::BleScanView::onTick ( uint32_t nowMs)
inlineoverridevirtual

Called periodically for animations/timers

Parameters
nowMsCurrent time in milliseconds

Reimplemented from cdc::ui::IView.

Definition at line 601 of file BluetoothMenuUi.cpp.

References cdc::ui::bleResolveTick().


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