diff options
Diffstat (limited to 'src/displayapp/screens/Notifications.h')
-rw-r--r-- | src/displayapp/screens/Notifications.h | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/src/displayapp/screens/Notifications.h b/src/displayapp/screens/Notifications.h index b4d0beda..e6f20877 100644 --- a/src/displayapp/screens/Notifications.h +++ b/src/displayapp/screens/Notifications.h @@ -1,11 +1,11 @@ #pragma once -#include <cstdint> +#include <functional> +#include <vector> + #include "Screen.h" -#include <bits/unique_ptr.h> -#include "Modal.h" -#include <lvgl/src/lv_core/lv_style.h> -#include <displayapp/Apps.h> +#include "ScreenList.h" + namespace Pinetime { namespace Applications { @@ -17,19 +17,27 @@ namespace Pinetime { bool Refresh() override; bool OnButtonPushed() override; - void OnObjectEvent(lv_obj_t* obj, lv_event_t event, uint32_t buttonId); bool OnTouchEvent(Pinetime::Applications::TouchEvents event) override; private: - class ListWidget { + ScreenList<3> screens; + bool running = true; + std::unique_ptr<Screen> CreateScreen1(); + std::unique_ptr<Screen> CreateScreen2(); + std::unique_ptr<Screen> CreateScreen3(); + + class NotificationItem : public Screen { public: - ListWidget(); + NotificationItem(DisplayApp* app, const char* title, const char* msg, uint8_t notifNr, uint8_t notifNb); + NotificationItem(DisplayApp* app, const char* title1, const char* msg1, const char* title2, const char* msg2, uint8_t notifNr, uint8_t notifNb); + ~NotificationItem() override; + bool Refresh() override {return false;} + private: - lv_obj_t* page = nullptr; + uint8_t notifNr = 0; + uint8_t notifNb = 0; + char pageText[4]; }; - - bool running = true; - ListWidget list; }; } } |