2020-02-16 18:32:36 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include <chrono>
|
|
|
|
#include <Components/Gfx/Gfx.h>
|
|
|
|
#include "Screen.h"
|
|
|
|
#include <bits/unique_ptr.h>
|
|
|
|
#include "../Fonts/lcdfont14.h"
|
|
|
|
#include "../Fonts/lcdfont70.h"
|
|
|
|
#include "../../Version.h"
|
2020-02-26 20:49:26 +01:00
|
|
|
#include "Modal.h"
|
2020-02-16 18:32:36 +01:00
|
|
|
#include <lvgl/src/lv_core/lv_style.h>
|
|
|
|
|
|
|
|
namespace Pinetime {
|
|
|
|
namespace Applications {
|
|
|
|
namespace Screens {
|
|
|
|
class Tile : public Screen {
|
|
|
|
public:
|
2020-02-23 13:44:39 +01:00
|
|
|
explicit Tile(DisplayApp* app);
|
2020-02-16 18:32:36 +01:00
|
|
|
~Tile() override;
|
|
|
|
|
2020-02-23 16:14:03 +01:00
|
|
|
bool Refresh() override;
|
2020-02-23 13:44:39 +01:00
|
|
|
bool OnButtonPushed() override;
|
|
|
|
|
2020-02-23 16:14:03 +01:00
|
|
|
void OnObjectEvent(lv_obj_t* obj, lv_event_t event, uint32_t buttonId);
|
2020-02-16 18:32:36 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
2020-02-23 13:44:39 +01:00
|
|
|
lv_style_t* labelRelStyle;
|
|
|
|
lv_style_t* labelPrStyle;
|
2020-02-16 18:32:36 +01:00
|
|
|
lv_obj_t * label1;
|
|
|
|
lv_obj_t * label2;
|
|
|
|
lv_obj_t * label3;
|
|
|
|
|
|
|
|
lv_obj_t* backgroundLabel;
|
|
|
|
lv_obj_t * button;
|
|
|
|
lv_obj_t * labelClick;
|
|
|
|
|
|
|
|
lv_obj_t *tileview;
|
|
|
|
lv_obj_t * tile1;
|
|
|
|
lv_obj_t * tile2;
|
|
|
|
lv_obj_t * list;
|
|
|
|
lv_obj_t * list_btn;
|
|
|
|
lv_obj_t * tile3;
|
|
|
|
lv_obj_t * btn1;
|
|
|
|
lv_obj_t * btn2;
|
|
|
|
lv_obj_t * btn3;
|
|
|
|
|
|
|
|
lv_obj_t * btnm1;
|
|
|
|
lv_obj_t * btnm2;
|
|
|
|
|
|
|
|
uint32_t clickCount = 0 ;
|
|
|
|
uint32_t previousClickCount = 0;
|
2020-02-23 16:14:03 +01:00
|
|
|
void StartClockApp();
|
|
|
|
void StartTestApp();
|
2020-02-26 20:49:26 +01:00
|
|
|
void StartMeterApp();
|
|
|
|
void StartGaugeApp();
|
2020-02-23 13:44:39 +01:00
|
|
|
bool running = true;
|
2020-02-26 20:49:26 +01:00
|
|
|
|
|
|
|
std::unique_ptr<Modal> modal;
|
2020-02-16 18:32:36 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|