Welcome to mirror list, hosted at ThFree Co, Russian Federation.

scened-app.h « scened-app-example « applications - github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b5e2bbf1ab367a896546548bfa9bd62a3b6be3ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#pragma once
#include <furi.h>
#include <furi-hal.h>

#include <generic-scene.hpp>
#include <scene-controller.hpp>
#include <view-controller.hpp>
#include <record-controller.hpp>
#include <text-store.h>

#include <view-modules/submenu-vm.h>
#include <view-modules/byte-input-vm.h>

#include <notification/notification-messages.h>

class ScenedApp {
public:
    enum class EventType : uint8_t {
        GENERIC_EVENT_ENUM_VALUES,
        MenuSelected,
        ByteEditResult,
    };

    enum class SceneType : uint8_t {
        GENERIC_SCENE_ENUM_VALUES,
        ByteInputScene,
    };

    class Event {
    public:
        union {
            int32_t menu_index;
        } payload;

        EventType type;
    };

    SceneController<GenericScene<ScenedApp>, ScenedApp> scene_controller;
    TextStore text_store;
    ViewController<ScenedApp, SubmenuVM, ByteInputVM> view_controller;
    RecordController<NotificationApp> notification;

    ~ScenedApp();
    ScenedApp();

    void run();
};