init
This commit is contained in:
commit
2c2202e60d
2491 files changed
+1295990
No files matched your search
@@ -0,0 +1 @@
|
||||
{"remap":"yes","language":"GB","language_index":0,"copy_translations":"no","indices":[["11","T_PEDALBOARD"],["33","T_EQUALIZER"],["62","T_OCTAVER"],["70","T_OSCILLO"],["43","T_OVERDRIVE"],["22","T_SATURATION"],["118","T_ECHO"],["92","T_REVERB"],["85","T_BACK"],["30","T_ON"],["152","T_OFF"],["47","T_DRIVE"],["123","T_TONE"],["112","T_LEVEL"],["106","T_DELAY"],["53","T_FEEDBACK"],["148","T_MIX"],["99","T_ROOMSIZE"],["78","T_DAMPING"],["174","T_EQ_31"],["180","T_EQ_62"],["132","T_EQ_125"],["140","T_EQ_250"],["144","T_EQ_500"],["168","T_EQ_1K"],["171","T_EQ_2K"],["177","T_EQ_4K"],["183","T_EQ_8K"],["136","T_EQ_16K"],["165","T_OCT_M2"],["162","T_OCT_M1"],["130","T_OCT_0"],["156","T_OCT_P1"],["159","T_OCT_P2"],["128","T___SINGLEUSE_U5V0"],["0","T_TEXTAREAMAX"],["186","T___SINGLEUSE_2C9Q"]],"generate_binary_translations":"no"}
|
||||
@@ -0,0 +1 @@
|
||||
{"languages":["GB"],"textids":["T_PEDALBOARD","T_EQUALIZER","T_OCTAVER","T_OSCILLO","T_OVERDRIVE","T_SATURATION","T_ECHO","T_REVERB","T_BACK","T_ON","T_OFF","T_DRIVE","T_TONE","T_LEVEL","T_DELAY","T_FEEDBACK","T_MIX","T_ROOMSIZE","T_DAMPING","T_EQ_31","T_EQ_62","T_EQ_125","T_EQ_250","T_EQ_500","T_EQ_1K","T_EQ_2K","T_EQ_4K","T_EQ_8K","T_EQ_16K","T_OCT_M2","T_OCT_M1","T_OCT_0","T_OCT_P1","T_OCT_P2","T___SINGLEUSE_U5V0","T_TEXTAREAMAX","T___SINGLEUSE_2C9Q"]}
|
||||
@@ -0,0 +1 @@
|
||||
{"remap":"yes","languages":["Gb"],"characters":[77,97,120,32,58,32,2,32,72,122,0,80,69,68,65,76,66,79,65,82,68,0,83,65,84,85,82,65,84,73,79,78,0,69,81,85,65,76,73,90,69,82,0,79,86,69,82,68,82,73,86,69,0,70,69,69,68,66,65,67,75,0,79,67,84,65,86,69,82,0,79,83,67,73,76,76,79,0,65,77,79,82,84,73,0,82,69,84,79,85,82,0,82,69,86,69,82,66,0,84,65,73,76,76,69,0,68,69,76,65,73,0,76,69,86,69,76,0,69,67,72,79,0,84,79,78,69,0,49,48,48,0,49,50,53,0,49,54,75,0,50,53,48,0,53,48,48,0,77,73,88,0,79,70,70,0,43,49,0,43,50,0,45,49,0,45,50,0,49,75,0,50,75,0,51,49,0,52,75,0,54,50,0,56,75,0,2,0],"copy_translations_to_ram":"no","generate_binary_translations":"no"}
|
||||
@@ -0,0 +1 @@
|
||||
{"databases":{"DEFAULT":[[0,"CENTER","LTR"],[1,"CENTER","LTR"],[1,"CENTER","LTR"],[1,"CENTER","LTR"],[1,"CENTER","LTR"],[1,"CENTER","LTR"],[1,"CENTER","LTR"],[1,"CENTER","LTR"],[0,"CENTER","LTR"],[0,"CENTER","LTR"],[0,"CENTER","LTR"],[0,"CENTER","LTR"],[0,"CENTER","LTR"],[0,"CENTER","LTR"],[0,"CENTER","LTR"],[0,"CENTER","LTR"],[0,"CENTER","LTR"],[0,"CENTER","LTR"],[0,"CENTER","LTR"],[0,"CENTER","LTR"],[0,"CENTER","LTR"],[0,"CENTER","LTR"],[0,"CENTER","LTR"],[0,"CENTER","LTR"],[0,"CENTER","LTR"],[0,"CENTER","LTR"],[0,"CENTER","LTR"],[0,"CENTER","LTR"],[0,"CENTER","LTR"],[1,"CENTER","LTR"],[1,"CENTER","LTR"],[1,"CENTER","LTR"],[1,"CENTER","LTR"],[1,"CENTER","LTR"],[0,"LEFT","LTR"],[0,"LEFT","LTR"],[0,"LEFT","LTR"]]},"database_list":["DEFAULT"],"fonts":{"getFont_arial_20_4bpp":0,"getFont_arial_40_4bpp":1,"getFont_arial_10_4bpp":2},"generate_font_format":"0","generate_binary_translations":"no","copy_translations_to_ram":"no"}
|
||||
Whitespace-only changes.
@@ -0,0 +1 @@
|
||||
{"remap":"yes","autohint":"default","data_format":"A1A2A4A8","binary_translations":"no","binary_fonts":"no","font_format":"0","framebuffer_bpp":"BPP16","fusion_fonts":null}
|
||||
@@ -0,0 +1,55 @@
|
||||
/* DO NOT EDIT THIS FILE */
|
||||
/* This file is autogenerated by the text-database code generator */
|
||||
|
||||
#ifndef TOUCHGFX_TEXTKEYSANDLANGUAGES_HPP
|
||||
#define TOUCHGFX_TEXTKEYSANDLANGUAGES_HPP
|
||||
|
||||
enum LANGUAGES
|
||||
{
|
||||
GB,
|
||||
NUMBER_OF_LANGUAGES
|
||||
};
|
||||
|
||||
enum TEXTS
|
||||
{
|
||||
T_PEDALBOARD,
|
||||
T_EQUALIZER,
|
||||
T_OCTAVER,
|
||||
T_OSCILLO,
|
||||
T_OVERDRIVE,
|
||||
T_SATURATION,
|
||||
T_ECHO,
|
||||
T_REVERB,
|
||||
T_BACK,
|
||||
T_ON,
|
||||
T_OFF,
|
||||
T_DRIVE,
|
||||
T_TONE,
|
||||
T_LEVEL,
|
||||
T_DELAY,
|
||||
T_FEEDBACK,
|
||||
T_MIX,
|
||||
T_ROOMSIZE,
|
||||
T_DAMPING,
|
||||
T_EQ_31,
|
||||
T_EQ_62,
|
||||
T_EQ_125,
|
||||
T_EQ_250,
|
||||
T_EQ_500,
|
||||
T_EQ_1K,
|
||||
T_EQ_2K,
|
||||
T_EQ_4K,
|
||||
T_EQ_8K,
|
||||
T_EQ_16K,
|
||||
T_OCT_M2,
|
||||
T_OCT_M1,
|
||||
T_OCT_0,
|
||||
T_OCT_P1,
|
||||
T_OCT_P2,
|
||||
T___SINGLEUSE_U5V0,
|
||||
T_TEXTAREAMAX,
|
||||
T___SINGLEUSE_2C9Q,
|
||||
NUMBER_OF_TEXT_KEYS
|
||||
};
|
||||
|
||||
#endif // TOUCHGFX_TEXTKEYSANDLANGUAGES_HPP
|
||||
@@ -0,0 +1,21 @@
|
||||
/* DO NOT EDIT THIS FILE */
|
||||
/* This file is autogenerated by the text-database code generator */
|
||||
|
||||
#ifndef TOUCHGFX_TYPEDTEXTDATABASE_HPP
|
||||
#define TOUCHGFX_TYPEDTEXTDATABASE_HPP
|
||||
|
||||
#include <touchgfx/TypedText.hpp>
|
||||
#include <touchgfx/hal/Types.hpp>
|
||||
|
||||
namespace TypedTextDatabase
|
||||
{
|
||||
class TypedTextData;
|
||||
const touchgfx::TypedText::TypedTextData* getInstance(touchgfx::LanguageId id);
|
||||
const touchgfx::TypedText::TypedTextData* getInstance();
|
||||
const touchgfx::Font** getFonts();
|
||||
const touchgfx::Font* setFont(touchgfx::FontId fontId, const touchgfx::Font*);
|
||||
void resetFont(touchgfx::FontId fontId);
|
||||
uint16_t getInstanceSize();
|
||||
} // namespace TypedTextDatabase
|
||||
|
||||
#endif // TOUCHGFX_TYPEDTEXTDATABASE_HPP
|
||||
@@ -0,0 +1,50 @@
|
||||
/* DO NOT EDIT THIS FILE */
|
||||
/* This file is autogenerated by the text-database code generator */
|
||||
|
||||
#include <stdint.h>
|
||||
#include <touchgfx/Unicode.hpp>
|
||||
|
||||
TEXT_LOCATION_FLASH_PRAGMA
|
||||
KEEP extern const uint32_t indicesGb[] TEXT_LOCATION_FLASH_ATTRIBUTE;
|
||||
|
||||
// Remap all strings
|
||||
TEXT_LOCATION_FLASH_PRAGMA
|
||||
KEEP extern const uint32_t indicesGb[] TEXT_LOCATION_FLASH_ATTRIBUTE = {
|
||||
11, // T_PEDALBOARD: "PEDALBOARD"
|
||||
33, // T_EQUALIZER: "EQUALIZER"
|
||||
62, // T_OCTAVER: "OCTAVER"
|
||||
70, // T_OSCILLO: "OSCILLO"
|
||||
43, // T_OVERDRIVE: "OVERDRIVE"
|
||||
22, // T_SATURATION: "SATURATION"
|
||||
118, // T_ECHO: "ECHO"
|
||||
92, // T_REVERB: "REVERB"
|
||||
85, // T_BACK: "RETOUR"
|
||||
30, // T_ON: "ON"
|
||||
152, // T_OFF: "OFF"
|
||||
47, // T_DRIVE: "DRIVE"
|
||||
123, // T_TONE: "TONE"
|
||||
112, // T_LEVEL: "LEVEL"
|
||||
106, // T_DELAY: "DELAI"
|
||||
53, // T_FEEDBACK: "FEEDBACK"
|
||||
148, // T_MIX: "MIX"
|
||||
99, // T_ROOMSIZE: "TAILLE"
|
||||
78, // T_DAMPING: "AMORTI"
|
||||
174, // T_EQ_31: "31"
|
||||
180, // T_EQ_62: "62"
|
||||
132, // T_EQ_125: "125"
|
||||
140, // T_EQ_250: "250"
|
||||
144, // T_EQ_500: "500"
|
||||
168, // T_EQ_1K: "1K"
|
||||
171, // T_EQ_2K: "2K"
|
||||
177, // T_EQ_4K: "4K"
|
||||
183, // T_EQ_8K: "8K"
|
||||
136, // T_EQ_16K: "16K"
|
||||
165, // T_OCT_M2: "-2"
|
||||
162, // T_OCT_M1: "-1"
|
||||
130, // T_OCT_0: "0"
|
||||
156, // T_OCT_P1: "+1"
|
||||
159, // T_OCT_P2: "+2"
|
||||
128, // T___SINGLEUSE_U5V0: "100"
|
||||
0, // T_TEXTAREAMAX: "Max : <> Hz"
|
||||
186 // T___SINGLEUSE_2C9Q: "<>"
|
||||
};
|
||||
@@ -0,0 +1,158 @@
|
||||
/* DO NOT EDIT THIS FILE */
|
||||
/* This file is autogenerated by the text-database code generator */
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <touchgfx/TextProvider.hpp>
|
||||
#include <touchgfx/Texts.hpp>
|
||||
#include <touchgfx/TypedText.hpp>
|
||||
#include <touchgfx/Unicode.hpp>
|
||||
#include <touchgfx/hal/HAL.hpp>
|
||||
#include <touchgfx/lcd/LCD.hpp>
|
||||
#include <texts/TypedTextDatabase.hpp>
|
||||
|
||||
uint16_t touchgfx::Font::getStringWidth(const touchgfx::Unicode::UnicodeChar* text, ...) const
|
||||
{
|
||||
va_list pArg;
|
||||
va_start(pArg, text);
|
||||
uint16_t width = getStringWidthLTR(TEXT_DIRECTION_LTR, text, pArg);
|
||||
va_end(pArg);
|
||||
return width;
|
||||
}
|
||||
|
||||
uint16_t touchgfx::Font::getStringWidth(touchgfx::TextDirection textDirection, const touchgfx::Unicode::UnicodeChar* text, ...) const
|
||||
{
|
||||
va_list pArg;
|
||||
va_start(pArg, text);
|
||||
uint16_t width = getStringWidthLTR(textDirection, text, pArg);
|
||||
va_end(pArg);
|
||||
return width;
|
||||
}
|
||||
|
||||
touchgfx::Unicode::UnicodeChar touchgfx::TextProvider::getNextLigature(TextDirection direction)
|
||||
{
|
||||
if (fontGsubTable && nextCharacters.peekChar())
|
||||
{
|
||||
substituteGlyphs();
|
||||
if (nextCharacters.peekChar(1) == 0x093F) // Hindi I-matra
|
||||
{
|
||||
nextCharacters.replaceAt1(nextCharacters.peekChar());
|
||||
nextCharacters.replaceAt0(0x093F);
|
||||
}
|
||||
}
|
||||
return getNextChar();
|
||||
}
|
||||
|
||||
void touchgfx::TextProvider::initializeInternal()
|
||||
{
|
||||
fillInputBuffer();
|
||||
}
|
||||
|
||||
void touchgfx::LCD::drawString(touchgfx::Rect widgetArea, const touchgfx::Rect& invalidatedArea, const touchgfx::LCD::StringVisuals& stringVisuals, const touchgfx::Unicode::UnicodeChar* format, ...)
|
||||
{
|
||||
va_list pArg;
|
||||
va_start(pArg, format);
|
||||
drawStringLTR(widgetArea, invalidatedArea, stringVisuals, format, pArg);
|
||||
va_end(pArg);
|
||||
}
|
||||
|
||||
// Default TypedTextDatabase
|
||||
extern const touchgfx::TypedText::TypedTextData* const typedTextDatabaseArray[];
|
||||
|
||||
TEXT_LOCATION_FLASH_PRAGMA
|
||||
KEEP extern const touchgfx::Unicode::UnicodeChar texts_all_languages[] TEXT_LOCATION_FLASH_ATTRIBUTE = {
|
||||
0x4d, 0x61, 0x78, 0x20, 0x3a, 0x20, 0x2, 0x20, 0x48, 0x7a, 0x0, // @0 "Max : <> Hz"
|
||||
0x50, 0x45, 0x44, 0x41, 0x4c, 0x42, 0x4f, 0x41, 0x52, 0x44, 0x0, // @11 "PEDALBOARD"
|
||||
0x53, 0x41, 0x54, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x0, // @22 "SATURATION"
|
||||
0x45, 0x51, 0x55, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x52, 0x0, // @33 "EQUALIZER"
|
||||
0x4f, 0x56, 0x45, 0x52, 0x44, 0x52, 0x49, 0x56, 0x45, 0x0, // @43 "OVERDRIVE"
|
||||
0x46, 0x45, 0x45, 0x44, 0x42, 0x41, 0x43, 0x4b, 0x0, // @53 "FEEDBACK"
|
||||
0x4f, 0x43, 0x54, 0x41, 0x56, 0x45, 0x52, 0x0, // @62 "OCTAVER"
|
||||
0x4f, 0x53, 0x43, 0x49, 0x4c, 0x4c, 0x4f, 0x0, // @70 "OSCILLO"
|
||||
0x41, 0x4d, 0x4f, 0x52, 0x54, 0x49, 0x0, // @78 "AMORTI"
|
||||
0x52, 0x45, 0x54, 0x4f, 0x55, 0x52, 0x0, // @85 "RETOUR"
|
||||
0x52, 0x45, 0x56, 0x45, 0x52, 0x42, 0x0, // @92 "REVERB"
|
||||
0x54, 0x41, 0x49, 0x4c, 0x4c, 0x45, 0x0, // @99 "TAILLE"
|
||||
0x44, 0x45, 0x4c, 0x41, 0x49, 0x0, // @106 "DELAI"
|
||||
0x4c, 0x45, 0x56, 0x45, 0x4c, 0x0, // @112 "LEVEL"
|
||||
0x45, 0x43, 0x48, 0x4f, 0x0, // @118 "ECHO"
|
||||
0x54, 0x4f, 0x4e, 0x45, 0x0, // @123 "TONE"
|
||||
0x31, 0x30, 0x30, 0x0, // @128 "100"
|
||||
0x31, 0x32, 0x35, 0x0, // @132 "125"
|
||||
0x31, 0x36, 0x4b, 0x0, // @136 "16K"
|
||||
0x32, 0x35, 0x30, 0x0, // @140 "250"
|
||||
0x35, 0x30, 0x30, 0x0, // @144 "500"
|
||||
0x4d, 0x49, 0x58, 0x0, // @148 "MIX"
|
||||
0x4f, 0x46, 0x46, 0x0, // @152 "OFF"
|
||||
0x2b, 0x31, 0x0, // @156 "+1"
|
||||
0x2b, 0x32, 0x0, // @159 "+2"
|
||||
0x2d, 0x31, 0x0, // @162 "-1"
|
||||
0x2d, 0x32, 0x0, // @165 "-2"
|
||||
0x31, 0x4b, 0x0, // @168 "1K"
|
||||
0x32, 0x4b, 0x0, // @171 "2K"
|
||||
0x33, 0x31, 0x0, // @174 "31"
|
||||
0x34, 0x4b, 0x0, // @177 "4K"
|
||||
0x36, 0x32, 0x0, // @180 "62"
|
||||
0x38, 0x4b, 0x0, // @183 "8K"
|
||||
0x2, 0x0 // @186 "<>"
|
||||
};
|
||||
|
||||
TEXT_LOCATION_FLASH_PRAGMA
|
||||
KEEP extern const uint32_t indicesGb[] TEXT_LOCATION_FLASH_ATTRIBUTE;
|
||||
|
||||
// Array holding dynamically installed languages
|
||||
struct TranslationHeader
|
||||
{
|
||||
uint32_t offset_to_texts;
|
||||
uint32_t offset_to_indices;
|
||||
uint32_t offset_to_typedtext;
|
||||
};
|
||||
static const TranslationHeader* languagesArray[1] = { 0 };
|
||||
|
||||
// Compiled and linked in languages
|
||||
static const uint32_t* const staticLanguageIndices[] = {
|
||||
indicesGb
|
||||
};
|
||||
|
||||
touchgfx::LanguageId touchgfx::Texts::currentLanguage = static_cast<touchgfx::LanguageId>(0);
|
||||
static const touchgfx::Unicode::UnicodeChar* currentLanguagePtr = 0;
|
||||
static const uint32_t* currentLanguageIndices = 0;
|
||||
|
||||
void touchgfx::Texts::setLanguage(touchgfx::LanguageId id)
|
||||
{
|
||||
const touchgfx::TypedText::TypedTextData* currentLanguageTypedText = 0;
|
||||
if (id < 1)
|
||||
{
|
||||
if (languagesArray[id] != 0)
|
||||
{
|
||||
// Dynamic translation is added
|
||||
const TranslationHeader* translation = languagesArray[id];
|
||||
currentLanguagePtr = (const touchgfx::Unicode::UnicodeChar*)(((const uint8_t*)translation) + translation->offset_to_texts);
|
||||
currentLanguageIndices = (const uint32_t*)(((const uint8_t*)translation) + translation->offset_to_indices);
|
||||
currentLanguageTypedText = (const touchgfx::TypedText::TypedTextData*)(((const uint8_t*)translation) + translation->offset_to_typedtext);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Compiled and linked in languages
|
||||
currentLanguagePtr = texts_all_languages;
|
||||
currentLanguageIndices = staticLanguageIndices[id];
|
||||
currentLanguageTypedText = typedTextDatabaseArray[id];
|
||||
}
|
||||
}
|
||||
|
||||
if (currentLanguageTypedText)
|
||||
{
|
||||
currentLanguage = id;
|
||||
touchgfx::TypedText::registerTypedTextDatabase(currentLanguageTypedText,
|
||||
TypedTextDatabase::getFonts(), TypedTextDatabase::getInstanceSize());
|
||||
}
|
||||
}
|
||||
|
||||
void touchgfx::Texts::setTranslation(touchgfx::LanguageId id, const void* translation)
|
||||
{
|
||||
languagesArray[id] = (const TranslationHeader*)translation;
|
||||
}
|
||||
|
||||
const touchgfx::Unicode::UnicodeChar* touchgfx::Texts::getText(TypedTextId id) const
|
||||
{
|
||||
return ¤tLanguagePtr[currentLanguageIndices[id]];
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
/* DO NOT EDIT THIS FILE */
|
||||
/* This file is autogenerated by the text-database code generator */
|
||||
|
||||
#include <touchgfx/TypedText.hpp>
|
||||
#include <fonts/GeneratedFont.hpp>
|
||||
#include <texts/TypedTextDatabase.hpp>
|
||||
|
||||
extern touchgfx::GeneratedFont& getFont_arial_20_4bpp();
|
||||
extern touchgfx::GeneratedFont& getFont_arial_40_4bpp();
|
||||
extern touchgfx::GeneratedFont& getFont_arial_10_4bpp();
|
||||
|
||||
const touchgfx::Font* touchgfx_fonts[] = {
|
||||
&(getFont_arial_20_4bpp()),
|
||||
&(getFont_arial_40_4bpp()),
|
||||
&(getFont_arial_10_4bpp())
|
||||
};
|
||||
|
||||
extern const touchgfx::TypedText::TypedTextData typedText_database_DEFAULT[];
|
||||
extern const touchgfx::TypedText::TypedTextData* const typedTextDatabaseArray[];
|
||||
|
||||
TEXT_LOCATION_FLASH_PRAGMA
|
||||
const touchgfx::TypedText::TypedTextData typedText_database_DEFAULT[] TEXT_LOCATION_FLASH_ATTRIBUTE = {
|
||||
{ 0, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 1, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 1, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 1, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 1, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 1, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 1, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 1, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 0, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 0, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 0, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 0, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 0, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 0, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 0, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 0, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 0, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 0, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 0, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 0, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 0, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 0, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 0, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 0, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 0, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 0, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 0, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 0, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 0, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 1, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 1, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 1, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 1, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 1, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 0, touchgfx::LEFT, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 0, touchgfx::LEFT, touchgfx::TEXT_DIRECTION_LTR },
|
||||
{ 0, touchgfx::LEFT, touchgfx::TEXT_DIRECTION_LTR }
|
||||
};
|
||||
|
||||
const touchgfx::TypedText::TypedTextData* const typedTextDatabaseArray[] = {
|
||||
typedText_database_DEFAULT
|
||||
};
|
||||
|
||||
namespace TypedTextDatabase
|
||||
{
|
||||
const touchgfx::TypedText::TypedTextData* getInstance(touchgfx::LanguageId id)
|
||||
{
|
||||
return typedTextDatabaseArray[id];
|
||||
}
|
||||
|
||||
uint16_t getInstanceSize()
|
||||
{
|
||||
return sizeof(typedText_database_DEFAULT) / sizeof(touchgfx::TypedText::TypedTextData);
|
||||
}
|
||||
|
||||
const touchgfx::Font** getFonts()
|
||||
{
|
||||
return touchgfx_fonts;
|
||||
}
|
||||
|
||||
const touchgfx::Font* setFont(touchgfx::FontId fontId, const touchgfx::Font* font)
|
||||
{
|
||||
const touchgfx::Font* old = touchgfx_fonts[fontId];
|
||||
touchgfx_fonts[fontId] = font;
|
||||
return old;
|
||||
}
|
||||
|
||||
void resetFont(touchgfx::FontId fontId)
|
||||
{
|
||||
switch (fontId)
|
||||
{
|
||||
case 0:
|
||||
touchgfx_fonts[0] = &(getFont_arial_20_4bpp());
|
||||
break;
|
||||
case 1:
|
||||
touchgfx_fonts[1] = &(getFont_arial_40_4bpp());
|
||||
break;
|
||||
case 2:
|
||||
touchgfx_fonts[2] = &(getFont_arial_10_4bpp());
|
||||
break;
|
||||
}
|
||||
}
|
||||
} // namespace TypedTextDatabase
|
||||
Reference in new issue
Block a user