|
CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
|
#include "cdc_views/ContextMenuView.h"#include "cdc_views/KeyCodes.h"#include "cdc_views/RenderHelpers.h"#include "cdc_ui/ViewStack.h"#include "cdc_hal/IDisplay.h"#include "cdc_log.h"#include <goodisplay/gdey029T94.h>#include <cstring>#include <algorithm>Go to the source code of this file.
Namespaces | |
| namespace | cdc |
| namespace | cdc::ui |
| Centralized key-code constants for cdc_views. | |
Functions | |
| ContextMenuView * | cdc::ui::showContextMenu (const char *title, const ContextMenuItem *items, uint8_t count) |
| Shows the shared context menu instance as modal. | |
| void | cdc::ui::hideContextMenu () |
| Hides the active context menu modal. | |
Variables | |
| static const char * | TAG = "ContextMenuView" |
| static constexpr int | BOX_PADDING = 8 |
| Layout constants. | |
| static constexpr int | TITLE_HEIGHT = 18 |
| static constexpr int | ITEM_HEIGHT = 16 |
| static constexpr int | MIN_BOX_WIDTH = 120 |
| static constexpr int | MAX_BOX_WIDTH = 200 |
| static constexpr uint32_t | kMenuTimeoutMs = 60000 |
| Auto-dismiss timeout after the last interaction (ms). | |
| static ContextMenuView | cdc::ui::s_sharedContextMenu |
| Convenience helper functions. | |
|
staticconstexpr |
Layout constants.
Definition at line 22 of file ContextMenuView.cpp.
Referenced by cdc::ui::ContextMenuView::render(), and cdc::ui::MessageBox::render().
|
staticconstexpr |
Definition at line 24 of file ContextMenuView.cpp.
Referenced by cdc::ui::ContextMenuView::render().
|
staticconstexpr |
Auto-dismiss timeout after the last interaction (ms).
Definition at line 29 of file ContextMenuView.cpp.
Referenced by cdc::ui::ContextMenuView::onTick().
|
staticconstexpr |
Definition at line 26 of file ContextMenuView.cpp.
Referenced by cdc::ui::ContextMenuView::render(), and cdc::ui::MessageBox::render().
|
staticconstexpr |
Definition at line 25 of file ContextMenuView.cpp.
Referenced by cdc::ui::ContextMenuView::render(), and cdc::ui::MessageBox::render().
|
static |
ContextMenuView Implementation
Quick popup menu displayed as modal overlay.
Definition at line 17 of file ContextMenuView.cpp.
|
staticconstexpr |
Definition at line 23 of file ContextMenuView.cpp.
Referenced by cdc::ui::ContextMenuView::render().