2020-10-18 17:35:36 +02:00
|
|
|
#pragma once
|
|
|
|
|
2020-10-19 21:46:41 +02:00
|
|
|
#include <functional>
|
|
|
|
#include <vector>
|
|
|
|
|
2020-10-18 17:35:36 +02:00
|
|
|
#include "Screen.h"
|
2020-10-19 21:46:41 +02:00
|
|
|
#include "ScreenList.h"
|
|
|
|
|
2020-10-18 17:35:36 +02:00
|
|
|
|
|
|
|
namespace Pinetime {
|
|
|
|
namespace Applications {
|
|
|
|
namespace Screens {
|
|
|
|
class Notifications : public Screen {
|
|
|
|
public:
|
|
|
|
explicit Notifications(DisplayApp* app);
|
|
|
|
~Notifications() override;
|
|
|
|
|
|
|
|
bool Refresh() override;
|
|
|
|
bool OnButtonPushed() override;
|
|
|
|
bool OnTouchEvent(Pinetime::Applications::TouchEvents event) override;
|
|
|
|
|
|
|
|
private:
|
2020-10-19 21:46:41 +02:00
|
|
|
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 {
|
2020-10-18 17:35:36 +02:00
|
|
|
public:
|
2020-10-19 21:46:41 +02:00
|
|
|
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;}
|
|
|
|
|
2020-10-18 17:35:36 +02:00
|
|
|
private:
|
2020-10-19 21:46:41 +02:00
|
|
|
uint8_t notifNr = 0;
|
|
|
|
uint8_t notifNb = 0;
|
|
|
|
char pageText[4];
|
2020-10-18 17:35:36 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|