CheeseBoard
A library for use with the CheeseBoard Cheddar platform
src
GfxTextBox2.h
1
#pragma once
2
3
#include <Arduino.h>
4
#include <stdint.h>
5
#include "GfxItem.h"
6
#include "GfxFont.h"
7
8
class
GfxTextBox2
:
public
GfxItem
{
9
public
:
20
GfxTextBox2
(String initialText,
GfxFont
& font=GfxDefaultFont,
bool
border=
true
, uint8_t padding=1,
char
justify=
'C'
, uint16_t
width
=0, uint16_t
height
=0);
21
26
void
draw
(uint16_t xOffset=0, uint16_t yOffset=0);
27
30
uint16_t
width
();
31
34
uint16_t
height
();
35
38
const
String&
text
();
39
42
void
setText
(
const
String& newText);
43
44
protected
:
45
String _text;
46
GfxFont
& _font;
47
bool
_border;
48
uint8_t _padding;
49
bool
_justify;
50
uint16_t _width;
51
uint16_t _height;
52
53
};
54
GfxTextBox2::draw
void draw(uint16_t xOffset=0, uint16_t yOffset=0)
Definition:
GfxTextBox2.cpp:28
GfxTextBox2::text
const String & text()
Definition:
GfxTextBox2.cpp:60
GfxItem
Definition:
GfxItem.h:5
GfxTextBox2::width
uint16_t width()
Definition:
GfxTextBox2.cpp:51
GfxFont
Definition:
GfxFont.h:8
GfxTextBox2
Definition:
GfxTextBox2.h:8
GfxTextBox2::GfxTextBox2
GfxTextBox2(String initialText, GfxFont &font=GfxDefaultFont, bool border=true, uint8_t padding=1, char justify='C', uint16_t width=0, uint16_t height=0)
Definition:
GfxTextBox2.cpp:5
GfxTextBox2::height
uint16_t height()
Definition:
GfxTextBox2.cpp:56
GfxTextBox2::setText
void setText(const String &newText)
Definition:
GfxTextBox2.cpp:65
Generated by
1.8.13