Kleidos API Search

In development. It changes without notice.

Topic

Popups & Modals

Toasts, spinners, confirmations and alerts, drawn over any screen.

Up to three toasts wait in line, and a fourth takes the place of the oldest. A confirmation or an alert runs its own loop until it is answered; the others are drawn by the tick of the screen below. What is shown and when is kept apart from how it is drawn, and tested on a computer.

See also
Notifications

Files

file src/ui/popup/lock_request.h
Lock requests seen by the loops that park the main loop.
file src/ui/popup/popup_queue.h
Pure popup-state logic: toast FIFO, modal shell, spinner, transition.
file src/ui/popup/popup_state.h
What the sources of the popup system share: its state and the helpers more than one kind of popup draws with.
file src/ui/popup/popup_system.h
The popup kinds: decisions, choices, acknowledgements, progress and notices, drawn over whatever screen is up.
file src/ui/popup/popup_system_card.cpp
The modal card of the popup system: the confirmation card, the fullscreen hold layout, the two- and three-cell pickers, the notices drawn at once, and alert() (part of popup_system.h).
file src/ui/popup/popup_system_choice.cpp
The choice list of the popup system: the card of N selectable rows and choiceList() (part of popup_system.h).
file src/ui/popup/popup_system_compositor.cpp
The compositor pass of the popup system: tick(), clearAll(), markDirty() and the keys a dialog reads (part of popup_system.h).
file src/ui/popup/popup_system_hold.cpp
Hold to confirm: the fill a held key charges, the gesture, and the blocking confirm() that offers it (part of popup_system.h).
file src/ui/popup/popup_system_pointer.cpp
Pointer input of the popup modals: tap qualification and the hit tests of the cells, the list rows and the non-blocking layer (part of popup_system.h).
file src/ui/popup/popup_system_progress.cpp
The progress card of the popup system, and the spinner it stands in for (part of popup_system.h).
file src/ui/popup/popup_system_scrim.cpp
The dim scrim every popup card frame opens with (part of popup_system.h).
file src/ui/popup/popup_system_status.cpp
The status overlays of the popup system: the transition notice and the banner strip (part of popup_system.h).
file src/ui/popup/popup_system_toast.cpp
The toast of the popup system: the bottom notice and the footprint it hands back (part of popup_system.h).
file src/ui/popup/write_report.h
What an on-device vault write tells the owner it did.

Classes

struct kleidos::ui::popup::ModalLabels
Action-button labels for a modal (unused slots pass nullptr). More about kleidos::ui::popup::ModalLabels
struct kleidos::ui::popup::ToastSlot
One active toast entry. More about kleidos::ui::popup::ToastSlot
struct kleidos::ui::popup::ModalSlot
One modal shell slot (0/1/2/3 actions). More about kleidos::ui::popup::ModalSlot
struct kleidos::ui::popup::SpinnerSlot
One spinner overlay slot. More about kleidos::ui::popup::SpinnerSlot
struct kleidos::ui::popup::TransitionSlot
One transition overlay slot. More about kleidos::ui::popup::TransitionSlot
struct kleidos::ui::popup::BannerSlot
One status-banner slot (full-width strip pinned to an edge). More about kleidos::ui::popup::BannerSlot
class kleidos::ui::popup::PopupQueue
PopupQueue — owns all popup state. Single-threaded; no locking. More about kleidos::ui::popup::PopupQueue
struct kleidos::ui::popup::ModalHints
Key-cap names for the modal captions of one input scheme. More about kleidos::ui::popup::ModalHints
class kleidos::ui::popup::TapQualifier
Qualifies raw pointer frames into taps a modal may answer. More about kleidos::ui::popup::TapQualifier
struct kleidos::ui::popup::ListNavEdges
One frame of input edges feeding choiceListNav. Slots not consumed by the active scheme are simply ignored (a caller may leave them false). More about kleidos::ui::popup::ListNavEdges
struct kleidos::ui::popup::ProgressOptions
How a progress card behaves while it is up. More about kleidos::ui::popup::ProgressOptions
struct kleidos::ui::popup::ConfirmOptions
Interaction options for the blocking confirm dialog. More about kleidos::ui::popup::ConfirmOptions
struct kleidos::ui::popup::DialInputs
The dial's three keys, which answer the modals on a dial board. More about kleidos::ui::popup::DialInputs
struct kleidos::ui::popup::ChoiceListOptions
Interaction options for the blocking choiceList modal. More about kleidos::ui::popup::ChoiceListOptions
struct kleidos::ui::popup::writereport::Report
One surface-independent report: what to say, how loudly, how long. More about kleidos::ui::popup::writereport::Report

Typedefs

usingkleidos::ui::popup::LockProbe
Reads the app's lock keys; true when one was pressed since the last read.

Enumerations

enum class kleidos::ui::popup::Severity : uint8_t { kleidos::ui::popup::Severity::INFO, kleidos::ui::popup::Severity::SUCCESS, kleidos::ui::popup::Severity::CAUTION, kleidos::ui::popup::Severity::WARNING, kleidos::ui::popup::Severity::ADMIN }
Severity tone — drives accent color in the renderer. More about kleidos::ui::popup::Severity
enum class kleidos::ui::popup::ConfirmResult : uint8_t { kleidos::ui::popup::ConfirmResult::PENDING, kleidos::ui::popup::ConfirmResult::CONFIRM, kleidos::ui::popup::ConfirmResult::CANCEL, kleidos::ui::popup::ConfirmResult::EXTRA, kleidos::ui::popup::ConfirmResult::TIMEOUT, kleidos::ui::popup::ConfirmResult::WITHDRAWN }
Resolution of a blocking modal. More about kleidos::ui::popup::ConfirmResult
enum class kleidos::ui::popup::ModalKind : uint8_t { kleidos::ui::popup::ModalKind::NONE, kleidos::ui::popup::ModalKind::NOTICE, kleidos::ui::popup::ModalKind::ALERT, kleidos::ui::popup::ModalKind::CONFIRM, kleidos::ui::popup::ModalKind::CHOICE }
Kind of modal currently on top (NONE = no modal). More about kleidos::ui::popup::ModalKind
enum class kleidos::ui::popup::BannerEdge : uint8_t { kleidos::ui::popup::BannerEdge::TOP , kleidos::ui::popup::BannerEdge::BOTTOM }
Where a status banner attaches to the screen. More about kleidos::ui::popup::BannerEdge
enum class kleidos::ui::popup::InputScheme : uint8_t { kleidos::ui::popup::InputScheme::Buttons, kleidos::ui::popup::InputScheme::Keyboard, kleidos::ui::popup::InputScheme::Dial, kleidos::ui::popup::InputScheme::TouchZones, kleidos::ui::popup::InputScheme::FreeTouch }
Physical input scheme steering the modal binding + hint policy. More about kleidos::ui::popup::InputScheme
enum class kleidos::ui::popup::ListScheme : uint8_t { kleidos::ui::popup::ListScheme::Buttons, kleidos::ui::popup::ListScheme::Keyboard, kleidos::ui::popup::ListScheme::Dial, kleidos::ui::popup::ListScheme::TouchZones, kleidos::ui::popup::ListScheme::FreeTouch }
Physical input grammar a choice-list modal is driven by. More about kleidos::ui::popup::ListScheme
enum class kleidos::ui::popup::ListNavAction : uint8_t { kleidos::ui::popup::ListNavAction::None, kleidos::ui::popup::ListNavAction::Up, kleidos::ui::popup::ListNavAction::Down, kleidos::ui::popup::ListNavAction::Run, kleidos::ui::popup::ListNavAction::Cancel }
Semantic outcome of one input frame against the choice list. More about kleidos::ui::popup::ListNavAction
enum class kleidos::ui::popup::LockHold : uint8_t { kleidos::ui::popup::LockHold::None , kleidos::ui::popup::LockHold::Drop , kleidos::ui::popup::LockHold::AfterWork }
What becomes of a lock key read while blocking work holds the screen. More about kleidos::ui::popup::LockHold
enum class kleidos::ui::popup::writereport::SaveOutcome : uint8_t { kleidos::ui::popup::writereport::SaveOutcome::Saved , kleidos::ui::popup::writereport::SaveOutcome::VaultUnavailable , kleidos::ui::popup::writereport::SaveOutcome::VaultFull , kleidos::ui::popup::writereport::SaveOutcome::NotWritten }
What a finished attempt to store a record established. More about kleidos::ui::popup::writereport::SaveOutcome
enum class kleidos::ui::popup::writereport::DeleteOutcome : uint8_t { kleidos::ui::popup::writereport::DeleteOutcome::Deleted , kleidos::ui::popup::writereport::DeleteOutcome::VaultUnavailable , kleidos::ui::popup::writereport::DeleteOutcome::NotDeleted }
What a finished attempt to remove a record established. More about kleidos::ui::popup::writereport::DeleteOutcome

Functions

voidkleidos::ui::popup::setLockProbe (LockProbe probe)
Install the probe popup::lockRequested polls.
voidkleidos::ui::popup::requestLock ()
Latch a lock request without a key press.
boolkleidos::ui::popup::lockRequested ()
Whether a blocking loop must stop because the device is locking.
voidkleidos::ui::popup::clearLockRequest ()
Drop the latch; the main loop calls it at the start of every tick.
constexpr uint8_tkleidos::ui::popup::modalActionCount (ModalKind kind)
Number of visible actions rendered for a modal kind.
voidkleidos::ui::popup::copyText (char *dst, std::size_t cap, const char *src)
Copy src into a popup's fixed text buffer.
InputSchemekleidos::ui::popup::activeInputScheme ()
The input grammar this board's modals speak.
ModalHintskleidos::ui::popup::hintsFor (InputScheme s)
Caption name table for s.
constexpr boolkleidos::ui::popup::dialAnswersModals (InputScheme s)
Whether the modals answer from the dial's own keys.
constexpr boolkleidos::ui::popup::swapConfirmCancel (InputScheme s, bool holdToConfirm, bool zoneShelf=false)
True when the (btnConfirm, btnCancel) pair the caller passed must swap roles for this scheme + resolution style.
boolkleidos::ui::popup::modalSwapsConfirmCancel (bool holdToConfirm)
Whether this board's modals swap the caller's pair (see swapConfirmCancel), resolved from the active scheme and profile.
constexpr ListNavActionkleidos::ui::popup::choiceListNav (ListScheme scheme, const ListNavEdges &edges)
Reduce one frame of input edges to a list-navigation action.
constexpr ConfirmResultkleidos::ui::popup::confirmKeyAnswer (const ListNavEdges &edges, bool holdToConfirm)
Reduce one frame of keyboard edges to a confirm-modal answer.
constexpr uint8_tkleidos::ui::popup::choiceListStep (ListScheme scheme, ListNavAction action, uint8_t sel, uint8_t count)
Apply a movement action to the selection index.
constexpr int8_tkleidos::ui::popup::choiceListJump (const char *const *labels, uint8_t count, uint8_t from, char letter)
The row a typed letter jumps to: the next row after from whose label starts with letter (either case), wrapping round.
constexpr int16_tkleidos::ui::popup::choiceListRowH (int16_t minTapPx, bool compact)
Row height for the choice list on the active profile.
voidkleidos::ui::popup::toast (const char *title, const char *detail=nullptr, Severity sev=Severity::INFO, uint32_t timeoutMs=2000)
Push a toast on top of whatever is currently rendered.
voidkleidos::ui::popup::transition (const char *title, const char *detail=nullptr, Severity sev=Severity::INFO, uint32_t timeoutMs=1200)
Show a notice between actions or screens: drawn as a toast, at the bottom above the key bar, and kept on top of the screen that follows.
voidkleidos::ui::popup::finalNotice (const char *title, const char *detail, Severity sev)
Draw a notice at once over the dimmed screen and leave it on the glass: the last word before a restart or a sleep, when no loop will turn again to composite one ("Restarting · to start the Wi-Fi setup").
voidkleidos::ui::popup::cardNow (const char *title, const char *message, const char *line, Severity sev)
Draw a card at once over the dimmed screen — the title bar, a wrapped message and an optional line in the tone's color — and leave it on the glass.
voidkleidos::ui::popup::banner (const char *message, Severity sev=Severity::INFO, bool bottom=false, uint32_t timeoutMs=0)
Show a full-width status banner pinned to the top or bottom edge.
voidkleidos::ui::popup::bannerHide ()
Hide the status banner. Repaints its footprint so the next redraw is clean.
voidkleidos::ui::popup::spinnerShow (const char *label)
Show a progress card with label as its title and no measure of how far the work is (progressShow at kProgressUnknown).
voidkleidos::ui::popup::spinnerHide ()
Take the card down (progressHide).
voidkleidos::ui::popup::progressShow (const char *title, uint8_t percent=kProgressUnknown, const char *detail=nullptr, const ProgressOptions &opts={})
Show a progress card over the dimmed screen.
voidkleidos::ui::popup::progressUpdate (uint8_t percent, const char *detail=nullptr)
Move the progress card on: a new percentage and, when given, a new detail line. Call it from inside the work as often as it can say how far it is; an unknown-progress card advances its segment each call.
voidkleidos::ui::popup::progressHide ()
Take the progress card down and repaint its footprint.
boolkleidos::ui::popup::progressActive ()
Whether a progress card is up.
kleidos::platform::WaitPumpStepkleidos::ui::popup::pumpBlockedProgress (void *ctx)
Move a blocking progress card's unknown-progress segment from inside a wait.
boolkleidos::ui::popup::coversRect (const ui::Rect &r)
Whether a popup lies over r on the glass.
constexpr LockHoldkleidos::ui::popup::lockHoldFor (bool blockingUp, bool lockWhenDone, bool droppingJustDown)
The lock-key rule for one read (the pure model behind progressLockHold).
LockHoldkleidos::ui::popup::progressLockHold ()
How the app must treat a lock key it reads now.
voidkleidos::ui::popup::notice (const char *title, const char *message, Severity sev=Severity::INFO, uint32_t timeoutMs=0)
Non-blocking notice shell with no actions.
constexpr uint32_tkleidos::ui::popup::blockingModalTimeout (uint32_t requested)
The time limit a blocking dialog waits.
ConfirmResultkleidos::ui::popup::confirm (const char *title, const char *message, const char *confirmLabel="OK", const char *cancelLabel="Cancel", Severity sev=Severity::WARNING, const ConfirmOptions &opts={})
Blocking confirm dialog.
voidkleidos::ui::popup::alert (const char *title, const char *message, Severity sev=Severity::INFO, ButtonInput *btnAck=nullptr, uint32_t timeoutMs=0)
Blocking alert — one button acknowledges.
voidkleidos::ui::popup::setBackKey (ButtonInput *key)
Install the board's dedicated back key for every blocking dialog.
voidkleidos::ui::popup::setDialKeys (const DialInputs &keys)
Install the dial's keys. Read only where dialAnswersModals.
int8_tkleidos::ui::popup::choiceList (const char *title, const char *const *labels, uint8_t count, Severity sev=Severity::INFO, const ChoiceListOptions &opts={})
Blocking modal presenting up to kChoiceListMaxRows actions as a selectable list of rows inside one card.
boolkleidos::ui::popup::tick ()
Advance timeouts and redraw dirty popup layers.
boolkleidos::ui::popup::consumeToastDismissed ()
True once after a toast or a transition notice was dismissed and its footprint was erased.
boolkleidos::ui::popup::consumeBackgroundRepaint ()
True once after a dismissed full-screen overlay needs the owner to repaint.
voidkleidos::ui::popup::clearAll ()
Remove every popup without animation.
voidkleidos::ui::popup::markDirty ()
Re-flag the active overlays for redraw after a repaint beneath them.
voidkleidos::ui::popup::recompositeLiveToast ()
Lay a toast on the glass back on top after the screen repainted under it.
ui::Rectkleidos::ui::popup::overlayReserve ()
Screen-space footprint of the active bottom overlay (a floating toast).
const PopupQueue &kleidos::ui::popup::queue ()
Read-only access to the shared popup queue.
constexpr boolkleidos::ui::popup::writereport::recordCommitted (SaveOutcome outcome)
Whether the record reached flash.
constexpr boolkleidos::ui::popup::writereport::recordRemoved (DeleteOutcome outcome)
Whether the record left the device.
constexpr boolkleidos::ui::popup::writereport::secretMayLeaveScreen (SaveOutcome outcome)
Whether the surface may clear a secret it is showing.
constexpr boolkleidos::ui::popup::writereport::listChanged (SaveOutcome outcome)
Whether a cached credential list must be re-read.
constexpr boolkleidos::ui::popup::writereport::listChanged (DeleteOutcome outcome)
Whether a cached credential list must be re-read.
constexpr Reportkleidos::ui::popup::writereport::reportFor (SaveOutcome outcome)
The report for a finished save of an ordinary record.
constexpr Reportkleidos::ui::popup::writereport::secretReportFor (SaveOutcome outcome)
The report for a finished save of a secret the owner is about to use.
constexpr Reportkleidos::ui::popup::writereport::reportFor (DeleteOutcome outcome)
What the owner is told once a delete has run, by its outcome.

Variables

constexpr std::size_tkleidos::ui::popup::kTitleRowsMax
constexpr std::size_tkleidos::ui::popup::kTitleRowBytes
constexpr std::size_tkleidos::ui::popup::kTitleCap
constexpr uint8_tkleidos::ui::popup::kMaxToasts
Maximum simultaneous toasts.
constexpr std::size_tkleidos::ui::popup::kToastTitleMax
constexpr std::size_tkleidos::ui::popup::kToastDetailMax
constexpr std::size_tkleidos::ui::popup::kModalTitleMax
Max modal title length (excl. NUL).
constexpr std::size_tkleidos::ui::popup::kModalMessageMax
Max modal message length (excl. NUL).
constexpr std::size_tkleidos::ui::popup::kModalLabelMax
Max modal action label length (excl. NUL).
constexpr std::size_tkleidos::ui::popup::kSpinnerLabelMax
Max spinner label length (excl. NUL).
constexpr std::size_tkleidos::ui::popup::kTransitionTitleMax
constexpr std::size_tkleidos::ui::popup::kTransitionDetailMax
Max transition detail length (excl. NUL); a transition draws as a toast card.
constexpr std::size_tkleidos::ui::popup::kBannerMessageMax
Max banner message length (excl. NUL).
constexpr uint8_tkleidos::ui::popup::kChoiceListMaxRows
Maximum rows a choice-list modal presents (statically allocated).
constexpr uint8_tkleidos::ui::popup::kProgressUnknown
constexpr uint32_tkleidos::ui::popup::kBlockingModalTimeoutMs
constexpr uint32_tkleidos::ui::popup::writereport::kSuccessHoldMs
How long a successful report stays on the glass.
constexpr uint32_tkleidos::ui::popup::writereport::kFailureHoldMs
How long a failure report stays on the glass (longer: it needs reading).
constexpr uint32_tkleidos::ui::popup::writereport::kSecretFailureHoldMs
How long a failure report about a secret still on screen is held.

Back to the top

Enumeration Type Documentation

BannerEdge #

enum class kleidos::ui::popup::BannerEdge : uint8_t

Where a status banner attaches to the screen.

Enumerator
TOP 

Pinned to the top edge (admin / connectivity banners).

BOTTOM 

Pinned to the bottom edge.

ConfirmResult #

enum class kleidos::ui::popup::ConfirmResult : uint8_t

Resolution of a blocking modal.

Enumerator
PENDING 

Modal is still on screen, no decision yet.

CONFIRM 

User confirmed the primary action.

CANCEL 

User dismissed / cancelled.

EXTRA 

User picked the third action (CHOICE modal only).

TIMEOUT 

Modal auto-resolved after the configured timeout.

WITHDRAWN 

What the modal asked about ended without it (answered elsewhere).

DeleteOutcome #

enum class kleidos::ui::popup::writereport::DeleteOutcome : uint8_t

What a finished attempt to remove a record established.

Enumerator
Deleted 

The record is off the device.

VaultUnavailable 

The vault would not open; nothing was attempted.

NotDeleted 

The removal was attempted and the record is still there.

InputScheme #

enum class kleidos::ui::popup::InputScheme : uint8_t

Physical input scheme steering the modal binding + hint policy.

Resolved on-device from the DeviceProfile (see popup_state.cpp); pure policy consumers (hints, the confirm/cancel swap, native tests) take it as a value.

Enumerator
Buttons 

Face buttons only (sticks, 3-button faces): A/B/C letters.

Keyboard 

Physical QWERTY (LILYGO T-Deck, M5Cardputer ADV): ENTER / ESC / SPACE.

Dial 

The CoreInk's directional dial: Up / OK (center press) / Dn.

TouchZones 

Fixed bottom zones (Core2 v1.3, CoreS3 SE): x-thirds.

FreeTouch 

Free-touch glass: the drawn cells are targets.

ListNavAction #

enum class kleidos::ui::popup::ListNavAction : uint8_t

Semantic outcome of one input frame against the choice list.

Enumerator
None 

No decision this frame.

Up 

Move the selection one row up.

Down 

Move the selection one row down.

Run 

Run the selected row.

Cancel 

Dismiss without running anything.

ListScheme #

enum class kleidos::ui::popup::ListScheme : uint8_t

Physical input grammar a choice-list modal is driven by.

Mirrors the device classes the popup renderer resolves at runtime; kept public and pure so native tests pin the per-profile mapping: the two-key Sticks navigate with A-down / B-up and act on holds, the CoreInk dial moves with its ends and runs on the center press, the fixed-zone touch boards keep their three band cells as move / select / cancel, free-touch glass taps rows directly, and keyboard boards use arrows + ENTER / ESC.

Enumerator
Buttons 

Two keys (the Sticks): A-short down, B-short up, holds act.

Keyboard 

Physical QWERTY: arrows move, ENTER runs, ESC cancels.

Dial 

CoreInk dial: ends move, OK (center) runs, the back key cancels.

TouchZones 

Touch-zone band cells: A move, B select, C cancel + row taps.

FreeTouch 

Free-touch glass: row taps; passed pair = silent aliases.

LockHold #

enum class kleidos::ui::popup::LockHold : uint8_t

What becomes of a lock key read while blocking work holds the screen.

Enumerator
None 

No blocking work: the key locks as it always does.

Drop 

The key is ignored (the default for blocking work).

AfterWork 

The key locks once the work has ended (lockWhenDone).

ModalKind #

enum class kleidos::ui::popup::ModalKind : uint8_t

Kind of modal currently on top (NONE = no modal).

Enumerator
NONE 

No modal active.

NOTICE 

Non-blocking shell with no actions.

ALERT 

Blocking one-button dialog.

CONFIRM 

Blocking two-button dialog (OK / Cancel).

CHOICE 

Blocking three-button dialog (left / middle / right).

SaveOutcome #

enum class kleidos::ui::popup::writereport::SaveOutcome : uint8_t

What a finished attempt to store a record established.

Four outcomes rather than a bool because the surface answers each one differently: only Saved may clear a secret and refresh a list, and VaultFull is the one failure the owner can act on immediately.

Enumerator
Saved 

The record is on flash.

VaultUnavailable 

The vault would not open; nothing was attempted.

VaultFull 

No free slot; nothing was written.

NotWritten 

The write was attempted and did not commit.

Severity #

enum class kleidos::ui::popup::Severity : uint8_t

Severity tone — drives accent color in the renderer.

Enumerator
INFO 

Informational / neutral accent (primary cyan).

SUCCESS 

Positive outcome accent (green).

CAUTION 

Soft warning accent (lockout yellow).

WARNING 

Destructive / error accent (red).

ADMIN 

Admin-mode banner accent (status.info, theme::kInfo).

Back to the top

Function Documentation

activeInputScheme() #

InputScheme kleidos::ui::popup::activeInputScheme()
nodiscard

The input grammar this board's modals speak.

Resolved from the device profile (dial / free touch / keyboard / touch zones / buttons). Callers use it to avoid offering a control the chassis lacks.

Returns
The active scheme.

alert() #

void kleidos::ui::popup::alert(const char * title, const char * message, Severity sev = Severity::INFO, ButtonInput * btnAck = nullptr, uint32_t timeoutMs = 0)

Blocking alert — one button acknowledges.

Parameters
NameDirectionMeaning
titleinAlert title.
messageinAlert message body.
sevinSeverity tone.
btnAckinButton input for acknowledgment.
timeoutMsinAuto-timeout in milliseconds (0 = kBlockingModalTimeoutMs).
Note
On free-touch glass any tap acknowledges: the single action's caption is drawn inside the dialog card, so the whole glass is the target. Qualified taps only — a contact must begin after the alert is drawn (the pointer is first observed idle under it) to acknowledge it.

banner() #

void kleidos::ui::popup::banner(const char * message, Severity sev = Severity::INFO, bool bottom = false, uint32_t timeoutMs = 0)

Show a full-width status banner pinned to the top or bottom edge.

Non-blocking. Auto-dismissed by tick() after timeoutMs (0 = sticky until bannerHide() / clearAll()). Caller string is copied. Used for ambient status (admin-mode active, connectivity) that should persist across screen redraws.

Parameters
NameDirectionMeaning
messageinBanner text.
sevinSeverity tone.
bottominTrue to pin the banner to the bottom edge (default top).
timeoutMsinAuto-dismiss timeout in milliseconds (0 = sticky).

blockingModalTimeout() #

uint32_t kleidos::ui::popup::blockingModalTimeout(uint32_t requested)
nodiscardconstexpr

The time limit a blocking dialog waits.

Parameters
NameDirectionMeaning
requestedinThe caller's limit in ms; 0 asks for the default.
Returns
requested, or kBlockingModalTimeoutMs when it is 0.

cardNow() #

void kleidos::ui::popup::cardNow(const char * title, const char * message, const char * line, Severity sev)

Draw a card at once over the dimmed screen — the title bar, a wrapped message and an optional line in the tone's color — and leave it on the glass.

For a question asked before the keys the dialogs read exist (the update from the card at boot): the caller reads its own answer and draws what follows. Nothing is queued.

Parameters
NameDirectionMeaning
titleinCard title.
messageinWrapped body; may be null.
lineinSmall line under the body (what the keys do); may be null.
sevinSeverity tone.

choiceList() #

int8_t kleidos::ui::popup::choiceList(const char * title, const char *const * labels, uint8_t count, Severity sev = Severity::INFO, const ChoiceListOptions & opts = {})

Blocking modal presenting up to kChoiceListMaxRows actions as a selectable list of rows inside one card.

Replaces the 3-cell band anatomy where a flow offers more actions than the band holds. Rows respect the touch tap floor (LayoutContext::minTapPx()); on the fixed-zone boards the bottom band keeps three live cells ([move] [select] [cancel]) as the no-reach path while the drawn rows are ALSO direct tap targets, and on free-touch glass rows resolve by qualified tap with a scrim tap as light dismiss. Cancel is never a row: it lives on the per-scheme cancel control (hold-B / ESC / back key / C cell / scrim).

Parameters
NameDirectionMeaning
titleinCard title (typically the credential name; drawn fitted).
labelsinRow labels; count entries, each non-null.
countinNumber of rows (clamped to kChoiceListMaxRows).
sevinSeverity tone for the card accent.
optsinInput / timeout options.
Returns
The selected row index, or -1 on cancel / timeout.
Note
Runs on the calling task; blocks until resolution and drains the resolving input edge so it does not leak into the caller's screen.

choiceListJump() #

int8_t kleidos::ui::popup::choiceListJump(const char *const * labels, uint8_t count, uint8_t from, char letter)
nodiscardconstexpr

The row a typed letter jumps to: the next row after from whose label starts with letter (either case), wrapping round.

Parameters
NameDirectionMeaning
labelsinRow labels, count entries (a null entry never matches).
countinRow count.
frominThe focused row; the search starts after it.
letterinThe typed letter.
Returns
The row to focus, or -1 when no label starts with the letter.

choiceListNav() #

ListNavAction kleidos::ui::popup::choiceListNav(ListScheme scheme, const ListNavEdges & edges)
nodiscardconstexpr

Reduce one frame of input edges to a list-navigation action.

The per-scheme mapping: 2-button sticks A-short = down, B-short = up, hold-A = run, hold-B = cancel (the canonical two-button grammar); the dial moves with its ends and runs on OK (tap or hold), the back key cancels; fixed zones move on A, run on B, cancel on C (row taps are resolved by the pointer path, not here); free-touch resolves rows by tap and keeps the passed pair as silent run / cancel aliases; keyboards use arrows + ENTER + ESC. Decisive edges outrank movement so a hold release can never both run and scroll.

Parameters
NameDirectionMeaning
schemeinActive input grammar.
edgesinInput edges observed this frame.
Returns
The reduced action (None when nothing decisive happened).

choiceListRowH() #

int16_t kleidos::ui::popup::choiceListRowH(int16_t minTapPx, bool compact)
nodiscardconstexpr

Row height for the choice list on the active profile.

Touch-primary profiles floor every row at the tap-target minimum (LayoutContext::minTapPx(): 5 mm at the panel's PPI, 40 px on the Core2 v1.3 and the CoreS3 SE, 32 px on the LILYGO T-Deck); button / dial / keyboard boards keep density-native heights.

Parameters
NameDirectionMeaning
minTapPxinTap floor from LayoutContext::minTapPx() (0 = none).
compactinTrue on compact-density panels.
Returns
Row height in pixels.

choiceListStep() #

uint8_t kleidos::ui::popup::choiceListStep(ListScheme scheme, ListNavAction action, uint8_t sel, uint8_t count)
nodiscardconstexpr

Apply a movement action to the selection index.

Wrapping on the two-key convention (every list of the Sticks is cyclic, so the far end is one press away), on the fixed-zone band (one MOVE cell must reach every row) and on the dial (its menus wrap); clamped at the list ends on keyboards and free touch.

Parameters
NameDirectionMeaning
schemeinActive input grammar (selects clamp vs wrap).
actioninMovement action (Up / Down; others return sel).
selinCurrent selection index.
countinRow count (0 returns 0).
Returns
The new selection index.

clearAll() #

void kleidos::ui::popup::clearAll()

Remove every popup without animation.

Use on state transitions into deep sleep so no stale overlay leaks across sessions.

confirm() #

ConfirmResult kleidos::ui::popup::confirm(const char * title, const char * message, const char * confirmLabel = "OK", const char * cancelLabel = "Cancel", Severity sev = Severity::WARNING, const ConfirmOptions & opts = {})

Blocking confirm dialog.

Returns only when the user resolves or the timeout expires.

Parameters
NameDirectionMeaning
titleinDialog title.
messageinDialog message body.
confirmLabelinConfirm button label.
cancelLabelinCancel button label.
sevinSeverity tone.
optsinInput/timeout/hold interaction options.
Return values
ValueMeaning
ConfirmResult::CONFIRMUser confirmed (or held long enough when opts.holdToConfirm is true).
ConfirmResult::CANCELUser dismissed with cancel button.
ConfirmResult::TIMEOUTAuto-timeout fired before either button.
ConfirmResult::WITHDRAWNopts.stillAsked read false: what the dialog asked about ended without it.
ConfirmResult::EXTRAResolved as third action (CHOICE modal only).
Note
Runs on the calling task; blocks until resolution. Drains the input edge so a release after return does not leak to the caller state.

confirmKeyAnswer() #

ConfirmResult kleidos::ui::popup::confirmKeyAnswer(const ListNavEdges & edges, bool holdToConfirm)
nodiscardconstexpr

Reduce one frame of keyboard edges to a confirm-modal answer.

The keyboard grammar draws ESC under the cancel cell and ENTER under the confirm cell (see hintsFor), so those are the keys that answer. The caller folds Backspace into keyEscape: it is the key the board binds to its B slot, the cancel control on every other surface. ENTER is a tap — a character stream carries no key-up — so a hold-to-confirm modal leaves it unanswered and the held control confirms there.

Parameters
NameDirectionMeaning
edgesinKeyboard edges observed this frame; only keyEnter and keyEscape are read.
holdToConfirminWhether the modal requires a sustained hold.
Return values
ValueMeaning
ConfirmResult::CANCELESC (or the folded Backspace) was pressed.
ConfirmResult::CONFIRMENTER was pressed on a tap-to-confirm modal.
ConfirmResult::PENDINGNothing this frame answers the modal.

consumeBackgroundRepaint() #

bool kleidos::ui::popup::consumeBackgroundRepaint()

True once after a dismissed full-screen overlay needs the owner to repaint.

Edge-triggered: clears itself after a single read. Set when a covering overlay (a dismissed modal) is torn down. The FSM dispatcher reads this after the compositor pass and drives one bracketed full repaint of the active state, so the modal footprint is replaced by real content in a single frame instead of a background fill flashing as a blank frame.

While the panel sleeps (display::isAsleep) the request is kept and not handed out (ui/core/sleeping_panel.h): a non-blocking modal that lapses in the dark asks for its repaint on the first tick after the panel wakes, instead of a full repaint of a screen nobody sees (on e-paper, a woken controller).

Return values
ValueMeaning
trueA full-screen overlay was dismissed and the screen needs a repaint.
falseNo pending repaint, or the panel sleeps.

consumeToastDismissed() #

bool kleidos::ui::popup::consumeToastDismissed()

True once after a toast or a transition notice was dismissed and its footprint was erased.

Edge-triggered: clears itself after a single read.

Return values
ValueMeaning
trueA notice was dismissed on the most recent frame.
falseNo dismissal edge.

copyText() #

void kleidos::ui::popup::copyText(char * dst, std::size_t cap, const char * src)

Copy src into a popup's fixed text buffer.

The one copy every queued popup text takes. A text that fits is copied whole. One that does not is cut on a whole UTF-8 code point — never inside one, so a translated label is never left ending in a stray lead byte — and ends in "…", so a text cut before its wrapper or fitter sees it still reads as cut. A buffer too small for the mark gets the bare cut.

Parameters
NameDirectionMeaning
dstoutDestination buffer, always NUL-terminated (when cap > 0).
capinSize of dst in bytes, NUL included.
srcinNUL-terminated UTF-8 source (nullptr copies "").

coversRect() #

bool kleidos::ui::popup::coversRect(const ui::Rect & r)

Whether a popup lies over r on the glass.

What a screen that paints from inside a wait asks before it draws there: a modal, a progress card or a transition notice owns the whole glass, and a banner or a toast covers its own footprint while it is on the glass. One flagged dirty (painted over by the screen under it, or not composed yet) covers nothing until the next tick lays it back.

The dirty flag cannot tell those cases from a toast still on the glass: a newer toast pushed over a shown one, or markDirty after a repaint that did not reach the toast's footprint, flags it too. Such a toast does not count either, so a wait ring under it may paint across it until the next tick lays the toast back; a wait never stalls under a toast it cannot see. Telling them apart would need markDirty to know what was painted.

Parameters
NameDirectionMeaning
rinScreen rectangle about to be painted.
Returns
True when painting r would draw over a popup.

dialAnswersModals() #

bool kleidos::ui::popup::dialAnswersModals(InputScheme s)
nodiscardconstexpr

Whether the modals answer from the dial's own keys.

On the dial, OK confirms or acknowledges, the side key cancels, and ▲ / ▼ answer nothing: the caller's (btnConfirm, btnCancel) pair is not read.

Parameters
NameDirectionMeaning
sinActive input scheme.
Returns
True for InputScheme::Dial.

finalNotice() #

void kleidos::ui::popup::finalNotice(const char * title, const char * detail, Severity sev)

Draw a notice at once over the dimmed screen and leave it on the glass: the last word before a restart or a sleep, when no loop will turn again to composite one ("Restarting · to start the Wi-Fi setup").

Nothing is queued: the card is not erased or redrawn by tick.

Parameters
NameDirectionMeaning
titleinNotice title.
detailinOptional line under it; may be null.
sevinSeverity tone.

hintsFor() #

ModalHints kleidos::ui::popup::hintsFor(InputScheme s)
inlinenodiscard

Caption name table for s.

Dial names are the spoken ones the action bar already trains ("OK" = the dial-center press). On the dial OK confirms or acknowledges and the side key cancels (drawn as its ‹ mark); ▲ and ▼ answer nothing. Free-touch names the GESTURE ("Tap" / "Hold"), because each drawn cell is its own target and a key-cap caption would promise a hit test that does not exist.

Parameters
NameDirectionMeaning
sinActive input scheme.
Returns
The scheme's caption names (static storage).

listChanged() [1/2] #

bool kleidos::ui::popup::writereport::listChanged(DeleteOutcome outcome)
constexpr

Whether a cached credential list must be re-read.

Parameters
NameDirectionMeaning
outcomeinOutcome of a finished delete.
Return values
ValueMeaning
trueThe vault changed, so the cached list is stale.

listChanged() [2/2] #

bool kleidos::ui::popup::writereport::listChanged(SaveOutcome outcome)
constexpr

Whether a cached credential list must be re-read.

Parameters
NameDirectionMeaning
outcomeinOutcome of a finished save.
Return values
ValueMeaning
trueThe vault changed, so the cached list is stale.

lockHoldFor() #

LockHold kleidos::ui::popup::lockHoldFor(bool blockingUp, bool lockWhenDone, bool droppingJustDown)
nodiscardconstexpr

The lock-key rule for one read (the pure model behind progressLockHold).

Parameters
NameDirectionMeaning
blockingUpinA blocking progress card is up.
lockWhenDoneinThat card lets a lock wait for the work's end.
droppingJustDowninA dropping card came down and no read followed.
Returns
The rule for this read.

lockRequested() #

bool kleidos::ui::popup::lockRequested()
nodiscard

Whether a blocking loop must stop because the device is locking.

Returns
True once the probe reported a lock key or popup::requestLock ran, until popup::clearLockRequest.

markDirty() #

void kleidos::ui::popup::markDirty()

Re-flag the active overlays for redraw after a repaint beneath them.

Call after a screen repaints content under a live overlay (the repaint fills the overlay footprint with background): the next tick re-composites the overlay on top in the same frame, so a list-only redraw that clips its selection rule does not leave the toast, banner or transition notice erased. A live non-blocking card modal is re-flagged too — its compose re-applies the backdrop dim scrim over the fresh content and re-draws the card, so the modal anatomy survives every redraw path. No-op when nothing is active.

modalActionCount() #

uint8_t kleidos::ui::popup::modalActionCount(ModalKind kind)
constexpr

Number of visible actions rendered for a modal kind.

Parameters
NameDirectionMeaning
kindinModal kind to query.
Returns
0 for NONE/NOTICE, 1 for ALERT, 2 for CONFIRM, 3 for CHOICE.

modalSwapsConfirmCancel() #

bool kleidos::ui::popup::modalSwapsConfirmCancel(bool holdToConfirm)
nodiscard

Whether this board's modals swap the caller's pair (see swapConfirmCancel), resolved from the active scheme and profile.

Parameters
NameDirectionMeaning
holdToConfirminTrue for the destructive hold-to-confirm layout.
Returns
True when confirm/cancel pointers (and captions) swap.

notice() #

void kleidos::ui::popup::notice(const char * title, const char * message, Severity sev = Severity::INFO, uint32_t timeoutMs = 0)

Non-blocking notice shell with no actions.

Stays visible until clearAll() unless timeoutMs is non-zero.

Parameters
NameDirectionMeaning
titleinNotice title.
messageinNotice message body.
sevinSeverity tone.
timeoutMsinAuto-dismiss timeout (0 = no timeout).

overlayReserve() #

ui::Rect kleidos::ui::popup::overlayReserve()

Screen-space footprint of the active bottom overlay (a floating toast).

A list compositor passes this as MenuListProps::overlayReserve so the cyan selection rule is clipped away from under the overlay; otherwise the focused row's left rail and the toast card's accent bar stack into one element that reads as a single broken bar. Reflects the footprint composited on the previous frame; returns an empty rect when no bottom overlay is on screen.

Returns
Toast card rectangle in panel pixels, or an empty rect when idle.

progressActive() #

bool kleidos::ui::popup::progressActive()

Whether a progress card is up.

Returns
True between progressShow and progressHide.

progressLockHold() #

LockHold kleidos::ui::popup::progressLockHold()
nodiscard

How the app must treat a lock key it reads now.

Blocking work answers no key, the lock key included: a press is dropped, or kept for the end of the work where the use sets ProgressOptions::lockWhenDone. A press made while work ran on the loop itself is only read after progressHide, so the first read after a dropping card is still LockHold::Drop. Call it on every lock-key read, pressed or not.

Returns
The rule for this read.

progressShow() #

void kleidos::ui::popup::progressShow(const char * title, uint8_t percent = kProgressUnknown, const char * detail = nullptr, const ProgressOptions & opts = {})

Show a progress card over the dimmed screen.

The card has the action family's title bar (the title), the bar (percent filled, or a moving segment at kProgressUnknown) and a detail line with the percentage at its right when there is one. Replaces a card already up.

Parameters
NameDirectionMeaning
titleinWhat is running ("Re-encrypting").
percentin0..100, or kProgressUnknown.
detailinOptional line under the bar ("142 of 338"); may be null.
optsinBlocking, lock-when-done and the cancel key.

progressUpdate() #

void kleidos::ui::popup::progressUpdate(uint8_t percent, const char * detail = nullptr)

Move the progress card on: a new percentage and, when given, a new detail line. Call it from inside the work as often as it can say how far it is; an unknown-progress card advances its segment each call.

Parameters
NameDirectionMeaning
percentin0..100, or kProgressUnknown.
detailinNew detail line, or null to keep the current one.

pumpBlockedProgress() #

kleidos::platform::WaitPumpStep kleidos::ui::popup::pumpBlockedProgress(void * ctx)

Move a blocking progress card's unknown-progress segment from inside a wait.

A pump (kleidos::platform::WaitPumpFn): the code that blocks behind a card (a vault rewrap, a rotation's finish) installs it for the call (kleidos::platform::WaitPumpScope), and the segment then moves while the work runs on the vault worker, as it does on loop ticks. A determinate card (a percentage) and a 1-bit panel keep their card still.

Parameters
NameDirectionMeaning
ctxinUnused.
Returns
Whether the segment moved, and when it is next due.

queue() #

const PopupQueue & kleidos::ui::popup::queue()

Read-only access to the shared popup queue.

Returns
Const reference to the global PopupQueue.

recompositeLiveToast() #

void kleidos::ui::popup::recompositeLiveToast()

Lay a toast on the glass back on top after the screen repainted under it.

For a screen that repaints its whole body (a full redraw, an animation frame) and so fills the footprint of a toast composited on an earlier frame with background: re-flags the overlays through markDirty, so this frame's tick draws the toast back instead of leaving it erased after one frame. A no-op while no toast is on the glass (overlayReserve is empty), so a screen calls it after every such repaint.

recordCommitted() #

bool kleidos::ui::popup::writereport::recordCommitted(SaveOutcome outcome)
constexpr

Whether the record reached flash.

Parameters
NameDirectionMeaning
outcomeinOutcome of a finished save.
Return values
ValueMeaning
trueOnly for SaveOutcome::Saved.

recordRemoved() #

bool kleidos::ui::popup::writereport::recordRemoved(DeleteOutcome outcome)
constexpr

Whether the record left the device.

Parameters
NameDirectionMeaning
outcomeinOutcome of a finished delete.
Return values
ValueMeaning
trueOnly for DeleteOutcome::Deleted.

reportFor() [1/2] #

Report kleidos::ui::popup::writereport::reportFor(DeleteOutcome outcome)
constexpr

What the owner is told once a delete has run, by its outcome.

Parameters
NameDirectionMeaning
outcomeinOutcome of the delete.
Returns
What the surface tells the owner.

reportFor() [2/2] #

Report kleidos::ui::popup::writereport::reportFor(SaveOutcome outcome)
constexpr

The report for a finished save of an ordinary record.

Parameters
NameDirectionMeaning
outcomeinOutcome of the save.
Returns
What the surface tells the owner.

requestLock() #

void kleidos::ui::popup::requestLock()

Latch a lock request without a key press.

For a caller that has already relocked the session and needs any open blocking dialog to close.

secretMayLeaveScreen() #

bool kleidos::ui::popup::writereport::secretMayLeaveScreen(SaveOutcome outcome)
constexpr

Whether the surface may clear a secret it is showing.

A generated password is recoverable only while it is on the glass: the buffer is zeroized and the screen leaves one line later. Until the record is proven on flash the secret is the only copy in existence, so the surface must keep showing it and must not navigate away.

Where this applies on the keyboard boards: the credential detail carries the outcome forward as its unsaved flag, and BACK asks before wiping rather than leaving. The standalone generator screen consults this directly, on the arm that has a credential bound.

Parameters
NameDirectionMeaning
outcomeinOutcome of the save that was supposed to store the secret.
Return values
ValueMeaning
trueThe record is stored; the secret may be wiped and the screen may leave.
falseThe secret is the only copy; keep it on screen.

secretReportFor() #

Report kleidos::ui::popup::writereport::secretReportFor(SaveOutcome outcome)
constexpr

The report for a finished save of a secret the owner is about to use.

Same outcomes, louder and longer on failure, and the second line tells the owner what to do while the secret is still readable: copy it, or retry the save. Used wherever the device generated the password it is storing.

Parameters
NameDirectionMeaning
outcomeinOutcome of the save.
Returns
What the surface tells the owner.

setBackKey() #

void kleidos::ui::popup::setBackKey(ButtonInput * key)

Install the board's dedicated back key for every blocking dialog.

A click of it cancels a confirm, acknowledges an alert and cancels a choiceList whose options name no back key of their own. The dialogs read the release, so the press that closed one never reaches the screen under it.

Parameters
NameDirectionMeaning
keyinThe back key (CoreInk side key), or nullptr on boards without one.

setDialKeys() #

void kleidos::ui::popup::setDialKeys(const DialInputs & keys)

Install the dial's keys. Read only where dialAnswersModals.

Parameters
NameDirectionMeaning
keysinThe dial's keys (null members where a key is absent).

setLockProbe() #

void kleidos::ui::popup::setLockProbe(LockProbe probe)

Install the probe popup::lockRequested polls.

Parameters
NameDirectionMeaning
probeinThe app's lock-key reader, or nullptr for none.

spinnerShow() #

void kleidos::ui::popup::spinnerShow(const char * label)

Show a progress card with label as its title and no measure of how far the work is (progressShow at kProgressUnknown).

Must be paired with spinnerHide().

Parameters
NameDirectionMeaning
labelinWhat is running.

swapConfirmCancel() #

bool kleidos::ui::popup::swapConfirmCancel(InputScheme s, bool holdToConfirm, bool zoneShelf = false)
nodiscardconstexpr

True when the (btnConfirm, btnCancel) pair the caller passed must swap roles for this scheme + resolution style.

Callers wire btnConfirm=inputA and btnCancel=inputB on every board; the physically correct binding differs per device class: Buttons never swap (A acts, B cancels, in every dialog: a hold of A confirms, and a destructive one holds longer); the dial and the touch zones always swap (OK / the center zone confirms); Keyboard never swaps. Free touch swaps where the glass keeps its zone shelf (Core2 v1.3, CoreS3 SE): the card draws Cancel on the left, so the left zone A must cancel and the center zone B confirm, or the zone under "Cancel" would run the action (ui-patterns §2).

Parameters
NameDirectionMeaning
sinActive input scheme.
holdToConfirminTrue for the destructive hold-to-confirm layout.
zoneShelfinTrue when the board reads A/B/C from a zone shelf along the glass's bottom edge.
Returns
True when confirm/cancel pointers (and captions) swap.

tick() #

bool kleidos::ui::popup::tick()

Advance timeouts and redraw dirty popup layers.

Must be called from the FSM dispatcher (or directly from each state's update()) once per frame so the toast deadlines, spinner animation, and transition overlay get their per-frame bookkeeping tick.

While the panel sleeps (display::isAsleep) the deadlines still run but nothing is drawn or erased (ui/core/sleeping_panel.h): the layers stay dirty and the first tick after the panel wakes paints them, and a toast that lapsed in the dark reaches consumeToastDismissed on that tick, with its erase.

A screen that cleared the whole glass since the last pass (display::screenClears moved) covered every overlay on it: the pass lays them back on top (markDirty), whatever path repainted, so no full repaint can leave a live toast erased until it lapses.

Return values
ValueMeaning
trueAny popup is currently on top.
falsePopup layer is idle.
Note
Call from the UI task on Core 1 (APP_CPU); the call belongs to the FSM dispatcher's frame loop.
On free-touch glass this also answers taps against the non-blocking modal layer (notice / debug previews), so those cards dismiss by touch exactly like their blocking counterparts.

toast() #

void kleidos::ui::popup::toast(const char * title, const char * detail = nullptr, Severity sev = Severity::INFO, uint32_t timeoutMs = 2000)

Push a toast on top of whatever is currently rendered.

Auto-dismissed after timeoutMs. Caller strings are copied.

Parameters
NameDirectionMeaning
titleinToast title.
detailinOptional detail text.
sevinSeverity tone.
timeoutMsinAuto-dismiss timeout in milliseconds.

transition() #

void kleidos::ui::popup::transition(const char * title, const char * detail = nullptr, Severity sev = Severity::INFO, uint32_t timeoutMs = 1200)

Show a notice between actions or screens: drawn as a toast, at the bottom above the key bar, and kept on top of the screen that follows.

Auto-dismissed by tick().

Parameters
NameDirectionMeaning
titleinOverlay title.
detailinOptional detail text.
sevinSeverity tone.
timeoutMsinAuto-dismiss timeout in milliseconds.

Back to the top

Variable Documentation

kBlockingModalTimeoutMs #

uint32_t kleidos::ui::popup::kBlockingModalTimeoutMs
inlineconstexpr

Time limit of a blocking dialog that sets none (ms). A blocking dialog parks the loop, so auto-lock and idle sleep cannot run until it is answered.

kProgressUnknown #

uint8_t kleidos::ui::popup::kProgressUnknown
inlineconstexpr

Percent for work that cannot tell how far it is: the bar shows a segment moving along the track instead of a fill.

kTitleCap #

std::size_t kleidos::ui::popup::kTitleCap
constexpr

Bytes every popup title a card draws is stored in, NUL included: the rows a title wraps to on the widest card, more than the four rows a toast title fills on the narrowest frame. A longer title is cut by the copy with "…" (copyText), so a cut always shows.

kTitleRowBytes #

std::size_t kleidos::ui::popup::kTitleRowBytes
constexpr

Bytes one row of a popup title holds in practice: a title row of the widest card takes about 25 characters, and an accented letter takes two bytes in UTF-8.

kTitleRowsMax #

std::size_t kleidos::ui::popup::kTitleRowsMax
constexpr

Rows a popup title takes at most: the card's title bar, the choice card's and the fullscreen confirm's title.

kToastDetailMax #

std::size_t kleidos::ui::popup::kToastDetailMax
constexpr

Max toast detail length (excl. NUL). The toast card wraps its detail like its title, onto up to ui::kToastMaxLines rows, so it is stored like one.

kToastTitleMax #

std::size_t kleidos::ui::popup::kToastTitleMax
constexpr

Max toast title length (excl. NUL).

kTransitionTitleMax #

std::size_t kleidos::ui::popup::kTransitionTitleMax
constexpr

Max transition title (excl. NUL).

Back to the top