8 #include "../fonts/font1.hpp" 9 #include "../fonts/font2.hpp" 10 #include "../fonts/font3.hpp" 11 #include "../fonts/font4.hpp" 32 static const string RED;
55 void tickTimerSetup(
string to_print);
57 void tickAlarmSetup(
string to_print,
bool isAM);
63 void tickTimer(
Timer &timer);
75 void tickAlarm(
Alarm &alarm);
84 void stageTimerDisplay(
int hours,
int minutes,
int seconds,
int tenths);
86 void stageAlarmDisplay(
string time);
91 void stageArt(vector<string> art);
97 void stageTimerBar(
double percentage);
99 void stageAlarmBar(
double percentage);
108 void stageStopwatchDisplay(
int hours,
int minutes,
int seconds,
int hundredths);
113 void stageStopwatchSplits(vector<int> splits);
118 void stageAlarmDisplay();
124 void setSplash(
string str);
135 void printSplash(
int splashIndex,
string formatting);
141 void printAscii(
int asciiIndex,
string formatting);
147 void printArt(
int controlIndex,
string formatting);
153 void printBar(
int barIndex,
string formatting);
158 void printSplits(
int splitsIndex,
string formatting);
169 void setFormat(
const string& code);
181 void setCursor(
int x,
int y);
187 void clearLine(
int lineIndex);
193 void setFont(
int num);
201 template <
typename char_type>
202 static auto fast_print(
const basic_string<char_type> &sss) -> void;
229 vector<string> _timerSetupControls = {
230 " _ ___ _ _ ___ ___ _ _ _ __ ___ ",
231 " |_ |\\ | | |_ |_) | | |\\/| |_ |_) | |_ |\\ | /__ | |_| o ",
232 " |_ | \\| | |_ | \\ | _|_ | | |_ | \\ |_ |_ | \\| \\_| | | | o ",
235 vector<string> _alarmSetupControls = {
236 " _ ___ _ _ _ ___ ___ _ ",
237 "|_ |\\ | | |_ |_) /\\ | /\\ |_) |\\/| | | |\\/| |_ o ",
238 "|_ | \\| | |_ | \\ /--\\ |_ /--\\ | \\ | | | _|_ | | |_ o ",
241 vector<string> _alarmSetupAM = {
249 vector<string> _alarmSetupPM = {
256 vector<string> _alarmControls = {
258 "A: New Alarm | Q: Main Menu",
262 vector<string> _timerControls = {
264 "S: Start/Stop | R: Reset | A: New Timer | Q: Main Menu",
268 vector<string> _stopwatchControls = {
270 "S: Start/Stop | R: Reset | A: Add Split | Q: Main Menu",
276 #endif // DISPLAY_HPP
A class to manage alarms with time-based triggers.
string _oldAscii
Previous ASCII art for comparison.
The Timer class provides a countdown timer with start, pause, resume, reset, and time adjustment func...
The Stopwatch class provides a simple timer with start, pause, resume, and reset functionalities.
int _asciiWidth
Width of the ASCII art.
static const string BOLD_YELLOW
static const string BLACK
string _splitBuffer
Buffer for the splits block.
string _asciiBuffer
Buffer for ASCII art.
static const string BOLD_WHITE
string _splash
String for splash screen.
string _oldSplits
Previous splits for comparison.
static const string BOLD_BLACK
static const string SELECTED
static const string BOLD_RED
static const string WHITE
static const string YELLOW
vector< int > _fontHeights
List of font heights.
string _barBuffer
Buffer for progress bar.
static const string BOLD_GREEN
vector< vector< string > > _currFont
current font ascii
string _oldSplash
Previous splash screen for comparison.
vector< vector< vector< string > > > _fonts
List of font ascii.
static const string MAGENTA
static const string BOLD_CYAN
static const string BOLD_BLUE
string _oldBar
Previous progress bar for comparison.
string _oldControls
Previous controls for comparison.
string _controlBuffer
Buffer for controls.
static const string BOLD_MAGENTA
static const string GREEN
The Display class manages the visual representation and interaction logic for timers, stopwatches, and alarms.