Ocky Kristanto / NextionSerial
Revision:
0:87b7b2ae63c3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/NextionUI.h	Wed Mar 03 09:01:07 2021 +0100
@@ -0,0 +1,30 @@
+#pragma once
+
+#include <cstdint>
+#include <string>
+
+class NextionSerial;
+
+enum class TEventType 
+{
+    EPress,
+    ERelease
+};
+
+class NextionUI
+{
+public:
+  explicit NextionUI(uint32_t aPage, uint32_t aId, const std::string& aObjectName, NextionSerial& aSerialHandler);
+  virtual ~NextionUI() = default;
+
+  uint32_t GetPage() const;
+  uint32_t GetId() const;
+
+  virtual void PressReleaseTriggered(TEventType aEventType);
+
+protected:
+  uint32_t iPage;
+  uint32_t iId;
+  std::string iObjectName;
+  NextionSerial& iNextionSerial;
+};
\ No newline at end of file