CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
PasswordT9View.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace cdc::ui {
6
23public:
27 void setMaskChar(char mask) { maskChar_ = mask; }
28
32 void setRevealed(bool revealed) { revealed_ = revealed; markDirty(); }
33
34 bool isRevealed() const { return revealed_; }
35
36 // IView overrides
37 void render(bool partial) override;
38 InputResult onLongPress(char key) override;
39 const char* getName() const override { return "PasswordT9View"; }
40 const char* getFooterHint() const override;
41
42private:
43 char maskChar_ = '*';
44 bool revealed_ = false;
45};
46
47} // namespace cdc::ui
T9 input variant for secrets: displays asterisks instead of letters and offers a long-press reveal to...
const char * getFooterHint() const override
void setRevealed(bool revealed)
Forces the reveal state. Defaults to false after each init().
const char * getName() const override
void setMaskChar(char mask)
Sets the mask character. Default '*'.
InputResult onLongPress(char key) override
Long-press on Y toggles the reveal state. Other keys delegate to T9.
void markDirty() override
Definition IView.h:186
Centralized key-code constants for cdc_views.
Definition IModule.h:8
InputResult
Definition IView.h:10