TouchGFX + 0/4 examples
CodeScope will show references to touchgfx::TypedText from the following samples and libraries:
Examples
STM32469I-Discovery
Demonstrations
STM32469I_EVAL
Demonstrations
STM324x9I_EVAL
Demonstrations
STM32F429I-Discovery
Demonstrations
 
Symbols
loading...
Files
loading...

touchgfx::TypedText class

@class TypedText TypedText.hpp touchgfx/TypedText.hpp TypedText represents text (as in characters) and typography (as in font and alignment). TypedText represents text (as in characters) and typography (as in font and alignment). TypedText provides methods for interacting with the text, font and alignment. Example text_example shows how to use TypedText. @see TextArea

Syntax

class TypedText { public:     struct TypedTextData     {         const unsigned char fontIdx;                const Alignment     alignment : 2;          const TextDirection direction : 2;      };     explicit TypedText(const TypedTextId id = TYPED_TEXT_INVALID) : typedTextId(id)     {     }     TypedTextId getId() const     {         return typedTextId;     }     bool hasValidId() const     {         return typedTextId != TYPED_TEXT_INVALID;     }     const Unicode::UnicodeChar* getText() const     {         assertValid();         return texts->getText(typedTextId);     }     const Font* getFont() const     {         assertValid();         return fonts[typedTexts[typedTextId].fontIdx];     }     Alignment getAlignment() const     {         assertValid();         return typedTexts[typedTextId].alignment;     }     TextDirection getTextDirection() const     {         assertValid();         return typedTexts[typedTextId].direction;     }     static void registerTypedTextDatabase(const TypedTextData* data, const Font* const* f, const uint16_t n)     {         typedTexts = data;         fonts = f;         numberOfTypedTexts = n;     }     static void registerTexts(const Texts* t)     {         texts = t;     } private:     void assertValid() const     {         assert(typedTexts != 0 && "TypedText database has not been initialized.");         assert(typedTextId < numberOfTypedTexts && "typedTextId larger than numberOfTypedTexts.");     }     TypedTextId typedTextId;     static const TypedTextData* typedTexts;     static const Texts* texts;     static const Font* const* fonts;     static uint16_t numberOfTypedTexts; };

Fields

typedTextId

No summary provided. Read more...

typedTexts

No summary provided. Read more...

texts

No summary provided. Read more...

fonts

No summary provided. Read more...

numberOfTypedTexts

No summary provided. Read more...

Methods

registerTypedTextDatabase()

@fn static void TypedText::registerTypedTextDatabase(const TypedTextData* data, const Font* const* f, const uint16_t n) Registers an array of typed texts. Registers an array of typed texts. All typed text instances are bound to this database. Read more...

registerTexts()

@fn static void TypedText::registerTexts(const Texts* t) Registers an array of texts. Registers an array of texts. Read more...

assertValid() const

No summary provided. Read more...

getId() const

@fn TypedTextId TypedText::getId() const Gets the id of the typed text. Gets the id of the typed text. Read more...

hasValidId() const

@fn bool TypedText::hasValidId() const Has the TypedText been set to a proper value. Has the TypedText been set to a proper value. Read more...

getText() const

@fn const Unicode::UnicodeChar* TypedText::getText() const Gets the text associated with this TypedText. Gets the text associated with this TypedText. Read more...

getFont() const

@fn const Font* TypedText::getFont() const Gets the font associated with this TypedText. Gets the font associated with this TypedText. Read more...

getAlignment() const

@fn Alignment TypedText::getAlignment() const Gets the alignment associated with this TypedText. Gets the alignment associated with this TypedText. Read more...

getTextDirection() const

@fn TextDirection TypedText::getTextDirection() const Gets the text direction associated with this TypedText. Gets the text direction associated with this TypedText. Read more...

Examples

touchgfx::TypedText is referenced by 4 libraries and example projects.