197 const char* mSimpleText;
202 int16_t mTextMarginLeft;
203 int16_t mTextMarginRight;
204 int16_t mTextMarginTop;
205 int16_t mTextMarginBottom;
DsAlignment is a class representing both horizontal and vertical alignment type.
Definition ds_types.h:130
DsColor is a class that represents a 4 channel color (Alpha, Red, Green, Blue).
Definition ds_color.h:53
DsLabel is a class that represents a text label view.
Definition ds_label.h:21
DsLabel(DsView *parent, const ds_bitmap_font_t *font=nullptr, const char *text=nullptr, DsColor text_color=WHITE, const DsAlignment &text_alignment=DS_ALIGN_CENTER_LEFT)
Creates a DsLabel view which uses an externally allocated string containing the text to be rendered.
size_t setTextFormat(const char *format,...)
Sets the DsLabel text in printf() style format.
DsLabel * setTextMarginTop(int16_t margin)
Sets the top text margin.
DsSize fitContent(void) override
Runs the auto-fitment algorithm. Sets the size of the DsLabel to fit the size required to render the ...
void onPaint(DsRenderer &renderer)
This virtual method will be called when the view needs to repaint it's content.
DsLabel * setTextMarginRight(int16_t margin)
Sets the right text margin.
DsLabel(DsView *parent, const DsPoint &pos, const DsSize &size, const ds_bitmap_font_t *font=nullptr, size_t max_text_length=15, DsColor text_color=WHITE, const DsAlignment &text_alignment=DS_ALIGN_CENTER_LEFT)
Creates a DsLabel view which owns a DsString object containing the text to be rendered.
DsLabel * setTextColor(DsColor color)
Sets the text color.
DsLabel * setFont(const ds_bitmap_font_t *font)
Sets the font.
DsLabel * setTextAlignment(const DsAlignment &alignment)
Sets the alignment used for the text inside the view.
size_t setTextFormat(const char *format, va_list args)
Sets the DsLabel text in vprintf() style format.
DsLabel * setRowSpacing(float row_spacing)
Sets the text row spacing.
void setText(const char *text)
Sets the DsLabel text.
DsLabel * setAutoFit(bool enabled)
Enables or disables the auto-fitment feature.
DsLabel * setTextMarginLeft(int16_t margin)
Sets the left text margin.
DsLabel * setLineAlignment(const DsAlignment &alignment)
Sets the alignment used between each line of a multiline text.
DsLabel(DsView *parent, const DsPoint &pos, const DsSize &size, const ds_bitmap_font_t *font=nullptr, const char *text=nullptr, DsColor text_color=WHITE, const DsAlignment &text_alignment=DS_ALIGN_CENTER_LEFT)
Creates a DsLabel view which uses an externally allocated string containing the text to be rendered.
DsLabel * setTextMarginBottom(int16_t margin)
Sets the bottom text margin.
DsOrientation is a class representing the orientation (horizontal or vertical).
Definition ds_types.h:57
DsPoint is a class that represents the X and Y 2D coordinates of a point as integer numbers.
Definition ds_geometry.h:24
DsRenderer is a class that implements all the drawing operations.
Definition ds_renderer.h:42
DsSize is class that represents the 2D size of a graphic object (width, height) as integer values.
Definition ds_geometry.h:780
DsString is a class representing a character string.
Definition ds_string.h:26
DsView is a base class that represents any view on the screen.
Definition ds_view.h:40