From f5328ec9eb9d55423b4e511910721d839cacadd8 Mon Sep 17 00:00:00 2001 From: JF Date: Fri, 14 Aug 2020 09:46:37 +0200 Subject: Refactor ScreenList to make it more generic : it can now contain any Screen type. Integrate this new ScreenList in SystemInfo. Add ApplicationList, which is a ScreenList of Tile. This allows to display a menu of more than 6 applications. --- src/DisplayApp/Screens/ApplicationList.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/DisplayApp/Screens/ApplicationList.h (limited to 'src/DisplayApp/Screens/ApplicationList.h') diff --git a/src/DisplayApp/Screens/ApplicationList.h b/src/DisplayApp/Screens/ApplicationList.h new file mode 100644 index 00000000..372cbb7a --- /dev/null +++ b/src/DisplayApp/Screens/ApplicationList.h @@ -0,0 +1,32 @@ +#pragma once + +#include +#include +#include "Screen.h" +#include "Label.h" +#include "ScreenList.h" +#include "Gauge.h" +#include "Meter.h" +#include + +namespace Pinetime { + namespace Applications { + namespace Screens { + class ApplicationList : public Screen { + public: + explicit ApplicationList(DisplayApp* app); + ~ApplicationList() override; + bool Refresh() override; + bool OnButtonPushed() override; + bool OnTouchEvent(TouchEvents event) override; + private: + bool running = true; + + ScreenList<1> screens; + std::unique_ptr CreateScreen1(); + std::unique_ptr CreateScreen2(); + std::unique_ptr CreateScreen3(); + }; + } + } +} \ No newline at end of file -- cgit v1.2.3-70-g09d2