mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-29 09:07:17 -04:00
Freqman UI (#1255)
* FreqmanDB direct file * Clear UI for short lists * Final touches on freqlist UI. * Support vertical alignment in NewButton * New buttons in FreqMan * Wiring up UI to filewrapper actions * Work around empty file
This commit is contained in:
parent
0c599f7d3a
commit
29e495a17f
23 changed files with 979 additions and 660 deletions
|
@ -41,20 +41,25 @@ enum TimeFormat {
|
|||
|
||||
const char unit_prefix[7]{'n', 'u', 'm', 0, 'k', 'M', 'G'};
|
||||
|
||||
using StringFormatBuffer = std::array<char, 16>;
|
||||
using StringFormatBuffer = std::array<char, 24>;
|
||||
|
||||
/* uint32_t conversion without memory allocations. */
|
||||
char* to_string_dec_uint(const uint32_t n, StringFormatBuffer& buffer, size_t& length);
|
||||
/* uint conversion without memory allocations. */
|
||||
char* to_string_dec_uint(uint32_t n, StringFormatBuffer& buffer, size_t& length);
|
||||
char* to_string_dec_uint64(uint64_t n, StringFormatBuffer& buffer, size_t& length);
|
||||
|
||||
std::string to_string_dec_uint(uint32_t n);
|
||||
std::string to_string_dec_uint64(uint64_t n);
|
||||
|
||||
// TODO: Allow l=0 to not fill/justify? Already using this way in ui_spectrum.hpp...
|
||||
std::string to_string_bin(const uint32_t n, const uint8_t l = 0);
|
||||
std::string to_string_dec_uint(const uint32_t n, const int32_t l = 0, const char fill = ' ');
|
||||
std::string to_string_dec_uint(const uint32_t n, const int32_t l, const char fill = ' ');
|
||||
std::string to_string_dec_int(const int32_t n, const int32_t l = 0, const char fill = 0);
|
||||
std::string to_string_decimal(float decimal, int8_t precision);
|
||||
|
||||
std::string to_string_hex(const uint64_t n, const int32_t l = 0);
|
||||
std::string to_string_hex_array(uint8_t* const array, const int32_t l = 0);
|
||||
|
||||
// NB: These pad-left and don't work correctly for values less than 1M.
|
||||
std::string to_string_freq(const uint64_t f);
|
||||
std::string to_string_short_freq(const uint64_t f);
|
||||
std::string to_string_time_ms(const uint32_t ms);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue