MCPcopy Create free account
hub / github.com/BruceDevices/firmware / ScrollableTextArea

Method ScrollableTextArea

src/core/scrollableTextArea.cpp:3–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#include "scrollableTextArea.h"
2#define _scrollBuffer tft
3ScrollableTextArea::ScrollableTextArea(const String &title)
4 : firstVisibleLine{0}, _redraw{true}, _title(title), _fontSize(FP), _startX(BORDER_PAD_X),
5 _startY(BORDER_PAD_Y), _width(tftWidth - 2 * BORDER_PAD_X),
6 _height(tftHeight - BORDER_PAD_X - BORDER_PAD_Y) {
7 drawMainBorder();
8
9 if (!_title.isEmpty()) {
10 printTitle(_title);
11 _startY = tft.getCursorY();
12 _height -= (_startY - BORDER_PAD_Y);
13 }
14
15 setup();
16}
17
18ScrollableTextArea::ScrollableTextArea(
19 uint8_t fontSize, int16_t startX, int16_t startY, int32_t width, int32_t height, bool drawBorders,

Callers

nothing calls this directly

Calls 4

drawMainBorderFunction · 0.85
printTitleFunction · 0.85
setupFunction · 0.85
getCursorYMethod · 0.45

Tested by

no test coverage detected