diff options
author | Mike Fiore <mfiore@multitech.com> | 2015-11-11 10:59:52 -0600 |
---|---|---|
committer | Mike Fiore <mfiore@multitech.com> | 2015-11-11 10:59:52 -0600 |
commit | 1a7194aced3b2c914257b8582dec4bb80cb97f5e (patch) | |
tree | dc1465e98180fd23a46988d6ce085af121c466cc /Layout/Layout.h | |
parent | 43af6ab4573b90d2cfde09333c68bec8e501ec23 (diff) | |
download | mtdot-box-evb-factory-firmware-1a7194aced3b2c914257b8582dec4bb80cb97f5e.tar.gz mtdot-box-evb-factory-firmware-1a7194aced3b2c914257b8582dec4bb80cb97f5e.tar.bz2 mtdot-box-evb-factory-firmware-1a7194aced3b2c914257b8582dec4bb80cb97f5e.zip |
rename DisplayManager to Layout
Diffstat (limited to 'Layout/Layout.h')
-rw-r--r-- | Layout/Layout.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Layout/Layout.h b/Layout/Layout.h new file mode 100644 index 0000000..c8dc4f3 --- /dev/null +++ b/Layout/Layout.h @@ -0,0 +1,48 @@ +#ifndef __DISPLAYMANAGER_H__ +#define __DISPLAYMANAGER_H__ + +#include "DOGS102.h" + +#include <string> +#include <vector> + +typedef struct field { + int32_t id; + uint8_t column; + uint8_t page; + uint8_t maxSize; +} Field; + +typedef struct label { + uint8_t column; + uint8_t page; + const char* value; + uint8_t size; +} Label; + +typedef std::vector<Field> Fields; +typedef std::vector<Label> Labels; +typedef std::pair<Labels, Fields> Layout; + +class DisplayManager { + public: + DisplayManager(DOGS102* lcd); + DisplayManager(DOGS102* lcd, const Layout layout); + ~DisplayManager(); + + void displaySplashScreen(); + + bool addLayout(const Layout layout); + + bool updateField(const int32_t& id, const char* field, const uint32_t& fieldSize); + bool updateField(const int32_t& id, const std::string& field); + + private: + Layout _layout; + DOGS102* _lcd; + static std::string _product_name; + static std::string _program_name; + static std::string _program_version; +}; + +#endif |