|
libepaper 2.0.0
A C++23 library for controlling Waveshare e-paper displays on Raspberry Pi, featuring transparent sleep/wake management and a fluent builder API.
|
#include <builders.hpp>
Public Member Functions | |
| TextBuilder () noexcept | |
| Default constructor creates a builder with empty text. | |
| TextBuilder (std::string_view txt) noexcept | |
| Construct a text builder with string content. | |
| auto | text (std::string_view txt) noexcept -> TextBuilder & |
| Set the text content. | |
| auto | number (std::int32_t num) noexcept -> TextBuilder & |
| Set the content to an integer number. | |
| auto | decimal (double dec, std::uint8_t places) noexcept -> TextBuilder & |
| Set the content to a decimal number. | |
| auto | at (Point pt) noexcept -> TextBuilder & |
| Set the text position. | |
| auto | at (std::size_t x, std::size_t y) noexcept -> TextBuilder & |
| Set the text position using coordinates. | |
| auto | font (const Font *f) noexcept -> TextBuilder & |
| Set the font. | |
| auto | foreground (Color c) noexcept -> TextBuilder & |
| Set the foreground (text) color. | |
| auto | background (Color c) noexcept -> TextBuilder & |
| Set the background color. | |
| auto | with_style (const TextStyleSpec &text_style) noexcept -> TextBuilder & |
| Apply a reusable text style. | |
| auto | build () const -> TextCommand |
| Build the final TextCommand. | |
|
inlinenoexcept |
Default constructor creates a builder with empty text.
|
inlineexplicitnoexcept |
Construct a text builder with string content.
| txt | Text content |
|
inlinenoexcept |
Set the text position.
| pt | Position point |
|
inlinenoexcept |
Set the text position using coordinates.
| x | X coordinate |
| y | Y coordinate |
|
inlinenoexcept |
Set the background color.
| c | Background color |
|
inline |
Build the final TextCommand.
|
inlinenoexcept |
Set the content to a decimal number.
| dec | Decimal value |
| places | Number of decimal places |
|
inlinenoexcept |
|
inlinenoexcept |
Set the foreground (text) color.
| c | Foreground color |
|
inlinenoexcept |
Set the content to an integer number.
| num | Integer value |
|
inlinenoexcept |
Set the text content.
| txt | Text string |
|
inlinenoexcept |
Apply a reusable text style.
| text_style | Style specification to apply |