Graphics::TextBuilder Class Reference
Simplifies construction of TextObject instances. More...
#include <TextBuilder.h>
Inheritance diagram for Graphics::TextBuilder:
Collaboration diagram for Graphics::TextBuilder:
Public Member Functions | |
| TextBuilder (AssetList &assets, const Rect &bounds) | |
| TextBuilder (SceneObject &scene) | |
| size_t | write (uint8_t c) override |
| Writes a single character to output stream. More... | |
| size_t | write (const uint8_t *buffer, size_t size) override |
| Writes characters from a buffer to output stream. More... | |
| virtual size_t | write (uint8_t c)=0 |
| Writes a single character to output stream. More... | |
| size_t | write (const char *str) |
| Writes a c-string to output stream. More... | |
| virtual size_t | write (const uint8_t *buffer, size_t size) |
| Writes characters from a buffer to output stream. More... | |
| size_t | write (const char *buffer, size_t size) |
| Writes characters from a buffer to output stream. More... | |
Public Member Functions inherited from Graphics::TextParser | |
| TextParser (const Rect &bounds) | |
| const Rect & | getBounds () const |
| TextObject * | release () |
| TextObject * | commit (SceneObject &scene) |
| void | setFont (const Font *font) |
| void | setFont (const Font &font) |
| const Font & | getFont () const |
| const TypeFace & | getTypeFace () const |
| void | setScale (Scale scale) |
| void | setScale (uint8_t sx, uint8_t sy) |
| void | setScale (uint8_t size) |
| uint16_t | getTextHeight () const |
| const TextOptions & | getOptions () const |
| void | setStyle (FontStyles style) |
| void | addStyle (FontStyles style) |
| void | removeStyle (FontStyles style) |
| void | setTextAlign (Align align) |
| Align | getTextAlign () const |
| void | setLineAlign (Align align) |
| Align | getLineAlign () const |
| Point | getCursor () const |
| void | setCursor (Point pt) |
| Set location to start new text segment. More... | |
| void | setCursor (int16_t x, int16_t y) |
| void | moveCursor (Point offset) |
| void | moveCursor (int16_t x, int16_t y) |
| void | setColor (const Brush &fore, const Brush &back={}) |
| void | setForeColor (const Brush &color) |
| void | setBackColor (const Brush &color) |
| void | setClip (const Rect &r) |
| const Rect & | getClip () const |
| void | resetClip () |
| void | setWrap (bool wrap) |
| void | parse (const TextAsset &asset, uint32_t start, size_t size) |
Public Member Functions inherited from Print | |
| virtual | ~Print () |
| int | getWriteError () |
| Gets last error. More... | |
| void | clearWriteError () |
| Clears the last write error. More... | |
| size_t | write (const char *str) |
| Writes a c-string to output stream. More... | |
| size_t | write (const char *buffer, size_t size) |
| Writes characters from a buffer to output stream. More... | |
| size_t | print (char c) |
| Prints a single character to output stream. More... | |
| size_t | print (const char str[]) |
| Prints a c-string to output stream. More... | |
| size_t | print (double num, int digits=2) |
| Print a floating-point number to output stream. More... | |
| template<typename T > | |
| std::enable_if< has_printTo< T >::value, size_t >::type | print (const T &obj) |
| Prints a Printable object to output stream. More... | |
| size_t | print (const String &s) |
| Prints a String to output stream. More... | |
| template<typename E > | |
| std::enable_if< std::is_enum< E >::value &&!std::is_convertible< E, int >::value, size_t >::type | print (E value) |
enums can be printed as strings provided they have a toString(E) implementation. More... | |
| size_t | println () |
| Prints a newline to output stream. More... | |
| template<typename... Args> | |
| size_t | println (const Args &... args) |
| Print value plus newline to output stream. More... | |
| size_t | printf (const char *fmt,...) |
| Prints a formatted c-string to output stream. More... | |
| size_t | print (unsigned long num, uint8_t base=DEC) |
| template<typename... Args> | |
| size_t | print (unsigned long num, Args... args) |
| template<typename... Args> | |
| size_t | print (const unsigned long long &num, Args... args) |
| size_t | print (long num, uint8_t base=DEC) |
| template<typename... Args> | |
| size_t | print (long num, Args... args) |
| template<typename... Args> | |
| size_t | print (const long long &num, Args... args) |
| template<typename... Args> | |
| size_t | print (unsigned int num, Args... args) |
| template<typename... Args> | |
| size_t | print (unsigned char num, Args... args) |
| template<typename... Args> | |
| size_t | print (int num, Args... args) |
Additional Inherited Members | |
Static Public Member Functions inherited from Graphics::TextParser | |
| static void | setDefaultFont (Font *font) |
Protected Member Functions inherited from Print | |
| void | setWriteError (int err=1) |
Detailed Description
Simplifies construction of TextObject instances.
Constructor & Destructor Documentation
◆ TextBuilder() [1/2]
◆ TextBuilder() [2/2]
|
inline |
Member Function Documentation
◆ write() [1/6]
|
inline |
Writes characters from a buffer to output stream.
- Parameters
-
buffer Pointer to character buffer size Quantity of characters to write
- Return values
-
size_t Quantity of characters written to stream
◆ write() [2/6]
|
inline |
Writes a c-string to output stream.
- Parameters
-
str Pointer to c-string
- Return values
-
size_t Quantity of characters written to stream
◆ write() [3/6]
| virtual size_t Print::write |
Writes characters from a buffer to output stream.
- Parameters
-
buffer Pointer to character buffer size Quantity of characters to write
- Return values
-
size_t Quantity of characters written to stream
◆ write() [4/6]
Writes characters from a buffer to output stream.
- Parameters
-
buffer Pointer to character buffer size Quantity of characters to write
- Return values
-
size_t Quantity of characters written to stream
Reimplemented from Print.
◆ write() [5/6]
Writes a single character to output stream.
- Parameters
-
c Character to write to output stream
- Return values
-
size_t Quantity of characters written to output stream
Implements Print.
◆ write() [6/6]
| virtual size_t Print::write |
Writes a single character to output stream.
- Parameters
-
c Character to write to output stream
- Return values
-
size_t Quantity of characters written to output stream
The documentation for this class was generated from the following file:
Public Member Functions inherited from
1.8.17