summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/Notifications.h
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-10-19 21:46:41 +0200
committerJF <jf@codingfield.com>2020-10-19 21:46:41 +0200
commit55427d83b87960903cd6213ac9c73e694ee547bd (patch)
tree11604c13579de52016ca1b490ca212e016fd1916 /src/displayapp/screens/Notifications.h
parent28bc4344193cda2936ff0f69ae51aa79a7840998 (diff)
[WIP] Add new notification UI that use HW scrolling effects. Both notification apps are available in the menu, we can compare them.
Diffstat (limited to 'src/displayapp/screens/Notifications.h')
-rw-r--r--src/displayapp/screens/Notifications.h32
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;
};
}
}