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

touchgfx::TextAreaWithOneWildcard class

@class TextAreaWithOneWildcard TextAreaWithWildcard.hpp touchgfx/widgets/TextAreaWithWildcard.hpp TextArea with one wildcard. TextArea with one wildcard. The format string (i.e. the text pointer set in TextArea::setText) is expected to contain a wildcard %s. @see TextAreaWithWildcardBase

Syntax

class TextAreaWithOneWildcard : public TextAreaWithWildcardBase { public:     TextAreaWithOneWildcard() : TextAreaWithWildcardBase(), wildcard(0)     {     }     virtual int16_t getTextHeight()     {         return typedText.hasValidId() ? calculateTextHeight(typedText.getText(), wildcard) : 0;     }     virtual void draw(const Rect& area) const     {         if (typedText.hasValidId())         {             const Font* fontToDraw = typedText.getFont();             if (fontToDraw != 0)             {                 LCD::StringVisuals visuals(fontToDraw, color, alpha, typedText.getAlignment(), linespace, rotation, typedText.getTextDirection(), indentation, wideTextAction);                 HAL::lcd().drawString(getAbsoluteRect(), area, visuals, typedText.getText(), wildcard);             }         }     }     void setWildcard(const Unicode::UnicodeChar* value)     {         wildcard = value;     }     const Unicode::UnicodeChar* getWildcard() const     {         return wildcard;     }     virtual uint16_t getTextWidth() const     {         return typedText.hasValidId() ? typedText.getFont()->getStringWidth(typedText.getTextDirection(), typedText.getText(), wildcard) : 0;     }     virtual uint16_t getType() const     {         return (uint16_t)TYPE_TEXTAREAWITHONEWILDCARD;     } protected:     const Unicode::UnicodeChar* wildcard;  };

Fields

wildcard

No summary provided. Read more...

Methods

getTextHeight()

@fn virtual int16_t TextAreaWithOneWildcard::getTextHeight() Gets text height. Gets text height. Read more...

draw() const

@fn virtual void TextAreaWithOneWildcard::draw(const Rect& area) const Draws TextArea and its text. Draws TextArea and its text if a Font is set and the TypedText associated with the TextArea is valid. Read more...

setWildcard()

@fn void TextAreaWithOneWildcard::setWildcard(const Unicode::UnicodeChar* value) Sets the wildcard in the text. Sets the wildcard in the text.Must be a zero-terminated UnicodeChar array. Read more...

getWildcard() const

@fn const Unicode::UnicodeChar* TextAreaWithOneWildcard::getWildcard() const Gets the wildcard in the text. Gets the wildcard in the text. Read more...

getTextWidth() const

@fn virtual uint16_t TextAreaWithOneWildcard::getTextWidth() const Gets the width in pixels of the current associated text. Gets the width in pixels of the current associated text in the current selected language. In case of multi-lined text the width of the widest line is returned. Read more...

getType() const

@fn virtual uint16_t TextAreaWithOneWildcard::getType() const For GUI testing only. For GUI testing only. Returns type of this drawable. Read more...

Examples

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

References

LocationText
TextAreaWithWildcard.hpp:75
class TextAreaWithOneWildcard : public TextAreaWithWildcardBase

Class Tree

Child classes
touchgfx::TextAreaWithOneWildcard