diff options
| author | JF <jf@codingfield.com> | 2020-08-14 07:46:37 (GMT) |
|---|---|---|
| committer | JF <jf@codingfield.com> | 2020-08-14 07:46:37 (GMT) |
| commit | f5328ec9eb9d55423b4e511910721d839cacadd8 (patch) | |
| tree | 8cbc6faf0c87dca43fb33e0dcdaa6ea1e64d0b05 /src/DisplayApp/Screens/ApplicationList.h | |
| parent | 27fa273d8315f972931dba7971a99b0fbba7360e (diff) | |
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.
Diffstat (limited to 'src/DisplayApp/Screens/ApplicationList.h')
| -rw-r--r-- | src/DisplayApp/Screens/ApplicationList.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/DisplayApp/Screens/ApplicationList.h b/src/DisplayApp/Screens/ApplicationList.h new file mode 100644 index 0000000..372cbb7 --- /dev/null +++ b/src/DisplayApp/Screens/ApplicationList.h @@ -0,0 +1,32 @@ +#pragma once + +#include <vector> +#include <Components/Ble/NimbleController.h> +#include "Screen.h" +#include "Label.h" +#include "ScreenList.h" +#include "Gauge.h" +#include "Meter.h" +#include <functional> + +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<Screen> CreateScreen1(); + std::unique_ptr<Screen> CreateScreen2(); + std::unique_ptr<Screen> CreateScreen3(); + }; + } + } +}
\ No newline at end of file |
