mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-13 06:32:26 +00:00
389ff92cc1
* Makefile, Scripts: new linter * About: remove ID from IC * Firmware: remove double define for DIVC/DIVR * Scripts: check folder names too. Docker: replace syntax check with make lint. * Reformat Sources and Migrate to new file naming convention * Docker: symlink clang-format-12 to clang-format * Add coding style guide
59 lines
1.4 KiB
C++
59 lines
1.4 KiB
C++
#pragma once
|
|
#include "gui/modules/button_menu.h"
|
|
#include "gui/modules/text_input.h"
|
|
#include <furi.h>
|
|
#include <gui/view_dispatcher.h>
|
|
#include <gui/modules/dialog_ex.h>
|
|
#include <gui/modules/submenu.h>
|
|
#include <gui/modules/popup.h>
|
|
#include "irda_app.h"
|
|
#include "view/irda_app_brut_view.h"
|
|
#include "gui/modules/button_panel.h"
|
|
|
|
class IrdaAppViewManager {
|
|
public:
|
|
enum class ViewType : uint8_t {
|
|
DialogEx,
|
|
TextInput,
|
|
Submenu,
|
|
ButtonMenu,
|
|
ButtonPanel,
|
|
Popup,
|
|
};
|
|
|
|
IrdaAppViewManager();
|
|
~IrdaAppViewManager();
|
|
|
|
void switch_to(ViewType type);
|
|
|
|
void receive_event(IrdaAppEvent* event);
|
|
void send_event(IrdaAppEvent* event);
|
|
void clear_events();
|
|
|
|
DialogEx* get_dialog_ex();
|
|
Submenu* get_submenu();
|
|
Popup* get_popup();
|
|
TextInput* get_text_input();
|
|
ButtonMenu* get_button_menu();
|
|
ButtonPanel* get_button_panel();
|
|
IrdaAppPopupBrut* get_popup_brut();
|
|
|
|
osMessageQueueId_t get_event_queue();
|
|
|
|
uint32_t previous_view_callback(void* context);
|
|
|
|
private:
|
|
ViewDispatcher* view_dispatcher;
|
|
Gui* gui;
|
|
TextInput* text_input;
|
|
DialogEx* dialog_ex;
|
|
Submenu* submenu;
|
|
Popup* popup;
|
|
ButtonMenu* button_menu;
|
|
ButtonPanel* button_panel;
|
|
IrdaAppPopupBrut* popup_brut;
|
|
|
|
osMessageQueueId_t event_queue;
|
|
|
|
void add_view(ViewType view_type, View* view);
|
|
};
|