|
CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
|
#include "cdc_views/ListView.h"#include "cdc_views/KeyCodes.h"#include "cdc_views/LayoutConstants.h"#include "cdc_views/RenderHelpers.h"#include "cdc_ui/ViewStack.h"#include "cdc_ui/I18n.h"#include "cdc_hal/IDisplay.h"#include "cdc_core/Raii.h"#include "cdc_log.h"#include <goodisplay/gdey029T94.h>Go to the source code of this file.
Namespaces | |
| namespace | cdc |
| namespace | cdc::ui |
| Centralized key-code constants for cdc_views. | |
Functions | |
| ListView * | cdc::ui::showListView (const char *title, const ListItem *items, uint16_t count, ListView::SelectCallback onSelect, const char *hint) |
| Shows a shared list view instance with selection callback. | |
Variables | |
| static const char * | TAG = "ListView" |
| static constexpr int | TITLE_Y = 5 |
| View-local layout constants for 296x128 panels. | |
| static constexpr int | LIST_START_Y = 30 |
| static constexpr int | ITEM_PADDING_X = 10 |
| static constexpr uint8_t | VISIBLE_ITEMS = 4 |
| Visible item count derived from available list area. | |
| static ListView | cdc::ui::s_sharedListView |
| Convenience factory/helper function. | |
| constexpr int | SCROLL_INDICATOR_WIDTH |
| Scroll indicator column width in pixels. | |
|
staticconstexpr |
Definition at line 29 of file ListView.cpp.
Referenced by cdc::ui::ListView::render().
|
staticconstexpr |
Definition at line 28 of file ListView.cpp.
Referenced by cdc::ui::ListView::render().
|
constexpr |
Scroll indicator column width in pixels.
Definition at line 26 of file LayoutConstants.h.
|
static |
ListView Implementation
Highly reusable scrollable selection menu. Display is 296x128, VISIBLE_ITEMS is fixed at 4.
Definition at line 19 of file ListView.cpp.
|
staticconstexpr |
View-local layout constants for 296x128 panels.
Shared SCROLL_INDICATOR_WIDTH comes from cdc::ui::layout in LayoutConstants.h.
Definition at line 27 of file ListView.cpp.
|
staticconstexpr |
Visible item count derived from available list area.
Available height: 128 - 30 (header) - 16 (footer) = 82px. With itemHeight_=18: 82 / 18 = 4 visible rows.
Definition at line 38 of file ListView.cpp.
Referenced by cdc::ui::ListView::init().