Ocky Kristanto / NextionSerial
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers NextionUI.h Source File

NextionUI.h

00001 #pragma once
00002 
00003 #include <cstdint>
00004 #include <string>
00005 
00006 class NextionSerial;
00007 
00008 enum class TEventType 
00009 {
00010     EPress,
00011     ERelease
00012 };
00013 
00014 class NextionUI
00015 {
00016 public:
00017   explicit NextionUI(uint32_t aPage, uint32_t aId, const std::string& aObjectName, NextionSerial& aSerialHandler);
00018   virtual ~NextionUI() = default;
00019 
00020   uint32_t GetPage() const;
00021   uint32_t GetId() const;
00022 
00023   virtual void PressReleaseTriggered(TEventType aEventType);
00024 
00025 protected:
00026   uint32_t iPage;
00027   uint32_t iId;
00028   std::string iObjectName;
00029   NextionSerial& iNextionSerial;
00030 };