Formatted code (#1007)

* Updated style

* Updated files

* fixed new line

* Updated spacing

* File fix WIP

* Updated to clang 13

* updated comment style

* Removed old comment code
This commit is contained in:
jLynx 2023-05-19 08:16:05 +12:00 committed by GitHub
parent 7aca7ce74d
commit 033c4e9a5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
599 changed files with 70746 additions and 66896 deletions

View file

@ -32,58 +32,53 @@
namespace ui {
class AlphanumView : public TextEntryView {
public:
AlphanumView(NavigationView& nav, std::string& str, size_t max_length);
AlphanumView(const AlphanumView&) = delete;
AlphanumView(AlphanumView&&) = delete;
AlphanumView& operator=(const AlphanumView&) = delete;
AlphanumView& operator=(AlphanumView&&) = delete;
public:
AlphanumView(NavigationView& nav, std::string& str, size_t max_length);
bool on_encoder(const EncoderEvent delta) override;
AlphanumView(const AlphanumView&) = delete;
AlphanumView(AlphanumView&&) = delete;
AlphanumView& operator=(const AlphanumView&) = delete;
AlphanumView& operator=(AlphanumView&&) = delete;
private:
const char * const keys_upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ' .<";
const char * const keys_lower = "abcdefghijklmnopqrstuvwxyz' .<";
const char * const keys_digit = "0123456789!\"#'()*+-/:;=>?@[\\]<";
const std::pair<std::string, const char *> key_sets[3] = {
{ "Upper", keys_upper },
{ "Lower", keys_lower },
{ "Digit", keys_digit }
};
int16_t focused_button = 0;
uint32_t mode = 0; // Uppercase
void set_mode(const uint32_t new_mode);
void on_button(Button& button);
bool on_encoder(const EncoderEvent delta) override;
std::array<Button, 30> buttons { };
private:
const char* const keys_upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ' .<";
const char* const keys_lower = "abcdefghijklmnopqrstuvwxyz' .<";
const char* const keys_digit = "0123456789!\"#'()*+-/:;=>?@[\\]<";
Button button_mode {
{ 21 * 8, 33 * 8, 8 * 8, 32 },
""
};
Text text_raw {
{ 1 * 8, 33 * 8, 4 * 8, 16 },
"Raw:"
};
NumberField field_raw {
{ 5 * 8, 33 * 8 },
3,
{ 1, 255 },
1,
'0'
};
const std::pair<std::string, const char*> key_sets[3] = {
{"Upper", keys_upper},
{"Lower", keys_lower},
{"Digit", keys_digit}};
Button button_ok {
{ 10 * 8, 33 * 8, 9 * 8, 32 },
"OK"
};
int16_t focused_button = 0;
uint32_t mode = 0; // Uppercase
void set_mode(const uint32_t new_mode);
void on_button(Button& button);
std::array<Button, 30> buttons{};
Button button_mode{
{21 * 8, 33 * 8, 8 * 8, 32},
""};
Text text_raw{
{1 * 8, 33 * 8, 4 * 8, 16},
"Raw:"};
NumberField field_raw{
{5 * 8, 33 * 8},
3,
{1, 255},
1,
'0'};
Button button_ok{
{10 * 8, 33 * 8, 9 * 8, 32},
"OK"};
};
} /* namespace ui */
#endif/*__ALPHANUM_H__*/
#endif /*__ALPHANUM_H__*/