@class TextArea TextArea.hpp touchgfx/widgets/TextArea.hpp This widget is capable of showing a text area on the screen. This widget is capable of showing a text area on the screen. A TextArea can display a TypedText. Optional configuration include text color. Example text_example shows how to use a TextArea. @see TypedText for information about text @see TextAreaWithOneWildcard, @see TextAreaWithTwoWildcards for displaying texts containing wildcards.
getSolidRect() const
@fn virtual Rect TextArea::getSolidRect() const Gets solid rectangle. Gets solid rectangle.
Read more...
setColor()
@fn inline void TextArea::setColor(colortype color) Sets the color of the text. Sets the color of the text.
Read more...
getColor() const
@fn inline colortype TextArea::getColor() const Gets the color of the text. Gets the color of the text.
Read more...
setAlpha()
@fn void TextArea::setAlpha(uint8_t alpha) Sets the alpha value of the text. Sets the alpha value of the text.
Read more...
getAlpha() const
@fn uint8_t TextArea::getAlpha() const Gets the alpha value of the text. Gets the alpha value of the text.
Read more...
setBaselineY()
@fn virtual void TextArea::setBaselineY(int16_t baselineY) Adjusts the TextArea y coordinate to place the text at the specified baseline. Adjusts the text areas y coordinate so the text will have its baseline at the specified value. The placements is relative to the specified TypedText so if this changes you have to set the baseline again. Note that setTypedText must be called prior to setting the baseline.
Read more...
setXBaselineY()
@fn virtual void TextArea::setXBaselineY(int16_t x, int16_t baselineY) Adjusts the TextArea y coordinate to place the text at the specified baseline. Adjusts the text areas y coordinate so the text will have its baseline at the specified value. The placements is relative to the specified TypedText so if this changes you have to set the baseline again. Note that setTypedText must be called prior to setting the baseline. The specified x coordinate will be used as the x coordinate of the TextArea.
Read more...
setLinespacing()
@fn inline void TextArea::setLinespacing(uint16_t space) Sets the line spacing of the TextArea. Sets the line spacing of the TextArea.
Read more...
getLinespacing() const
@fn inline uint16_t TextArea::getLinespacing() const Gets the line spacing of the TextArea. Gets the line spacing of the TextArea.
Read more...
setIndentation()
@fn inline void TextArea::setIndentation(uint8_t indent) Sets the indentation for the text. Sets the indentation for the text. This is very useful when a font is an italic font where letters such as "j" and "g" extend a lot to the left under the previous characters. if a line starts with a "j" or "g" this letter would either have to be pushed to the right to be able to see all of it, e.g. using spaces which would ruin a multi line text which is left aligned. This could be solved by changing a textarea.setPosition(50,50,100,100) to textarea.setPosition(45,50,110, 100) followed by a textarea.setIndentation(5). Characters that do not extend to the left under the previous characters will be drawn in the same position in either case, but "j" and "g" will be aligned with other lines. The function getMaxPixelsLeft() will give you the maximum number of pixels any glyph in the font extends to the left. @see getMaxPixelsLeft.
Read more...
getIndentation()
@fn inline uint8_t TextArea::getIndentation() Gets the indentation. Gets the indentation. @see setIndetation.
Read more...
getTextHeight()
@fn virtual int16_t TextArea::getTextHeight(); Gets the total height needed by the text. Gets the total height needed by the text, taking number of lines and line spacing into consideration.
Read more...
getTextWidth() const
@fn virtual uint16_t TextArea::getTextWidth() const; Gets the width in pixels of the current associated text in the current selected language. 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...
draw() const
@fn virtual void TextArea::draw(const Rect& area) const; Draws the text. Draws the text. Called automatically.
Read more...
setTypedText()
@fn void TextArea::setTypedText(TypedText t); Sets the TypedText of the text area. Sets the TypedText of the text area. If no prior size has been set the TextArea will be resized to fit the new TypedText.
Read more...
getTypedText() const
@fn TypedText TextArea::getTypedText() const Gets the TypedText of the text area Gets the TypedText of the text area.
Read more...
setRotation()
@fn void TextArea::setRotation(const TextRotation rotation = TEXT_ROTATE_0) Sets rotation of the text in the TextArea. Sets rotation of the text in the TextArea. The value TEXT_ROTATE_0 is the default for normal text. The value TEXT_ROTATE_90 will rotate the text clockwise, thus writing from the top of the display and down. Similarly TEXT_ROTATE_180 and TEXT_ROTATE_270 is further rotate 90 degrees clockwise.
Read more...
getRotation() const
@fn TextRotation TextArea::getRotation() const Gets rotation of the text in the TextArea. Gets rotation of the text in the TextArea.
Read more...
resizeToCurrentText()
@fn void TextArea::resizeToCurrentText(); Sets the dimensions of the TextArea. Sets the dimensions of the TextArea to match the width and height of the current associated text for the current selected language. Please note that if the current text rotation is either 90 or 270 degrees, the width of the text area will be set to the height of the text and vice versa, as the text is rotated. @see setRotation @see resizeHeightToCurrentText.
Read more...
resizeHeightToCurrentText()
@fn void TextArea::resizeHeightToCurrentText(); Sets the hight of the TextArea. Sets the height of the TextArea to match the height of the current associated text for the current selected language. This is espicially useful for texts with WordWrap enabled. Please note that if the current text rotation is either 90 or 270 degrees, the width of the text area will be set and not the height, as the text is rotated. @see resizeToCurrentText @see setWordWrap @see setRotation.
Read more...
setWideTextAction()
@fn void TextArea::setWideTextAction(WideTextAction action) Sets wide text action. Sets wide text action. Defines what to do if a line of text is wider than the text area. Default action is WIDE_TEXT_NONE which means that text lines are only broken if there is a newline in the text. If wrapping is enabled and the text would occupy more lines than the size of the TextArea, the last line will get an ellipsis to signal that some text is missing. The character used for ellipsis is taken from the text spreadsheet. @see WideTextAction @see getWideTextAction @see resizeHeightToCurrentText.
Read more...
getWideTextAction() const
@fn WideTextAction TextArea::getWideTextAction() const Gets wide text action. Gets wide text action preciously set using setWideTextAction. @see setWideTextAction.
Read more...
getType() const
@fn virtual uint16_t TextArea::getType() const For GUI testing only. For GUI testing only. Returns type of this drawable.
Read more...
getTextHeightInternal() const