Solo Controller Documentation 1.0
Documentation for the Solo Controller
 
Loading...
Searching...
No Matches
FontList.h
Go to the documentation of this file.
1/******************************************************************************/
7
8#ifndef FONTLIST_DEFINED
9#define FONTLIST_DEFINED
10
11#include "GrFont.h"
12#include "Colors.h"
13
14/******************************************************************************/
15/*** ***/
16/*** Class Definition: Button ***/
17/*** ***/
18/******************************************************************************/
28class FontList
29{
30public:
43
44private:
45 GrFont *fonts[6] = {nullptr, nullptr, nullptr, nullptr, nullptr, nullptr};
46
47 // This is a singleton class. Constructor and destructor are private.
48 FontList() = default;
49 ~FontList() = delete;
50
51 // Instance of the singleton
52 static FontList *_instance;
53
54 // Method that instantiates all fonts. This method will automatically be
55 // called upon first use of this class.
56 void _begin();
57
58public:
64 static FontList *getInstance(void);
65
67 FontList(const FontList &) = delete;
68
70 FontList &operator=(const FontList &) = delete;
71
78 GrFont *get(FontID id) { return fonts[id]; };
79};
80
81#endif // FONTLIST_DEFINED
Defines the colors used by the application.
Defines the base class used by all Graphical Fonts.
GrFont * get(FontID id)
Returns a pointer to the requested graphical font.
Definition FontList.h:78
FontID
Enumeration listing available fonts.
Definition FontList.h:35
@ Red180
Red monospace font of size 180.
Definition FontList.h:36
@ White90
White monospace font of size 90.
Definition FontList.h:37
@ Blue64
Blue monospace font of size 64.
Definition FontList.h:39
@ White32
White monospace font of size 32.
Definition FontList.h:41
@ White64
White monospace font of size 64.
Definition FontList.h:40
@ Red64
Red monospace font of size 64.
Definition FontList.h:38
static FontList * getInstance(void)
Returns pointer to the single FontList object.
Definition FontList.cpp:43
Base class used by all Graphical Fonts.
Definition GrFont.h:46