unleashed-firmware/applications/subghz/subghz-view-manager.h
SG 7afdd14a4c
Subghz app example (#365)
* Gui: ported submenu and view_dispatcher_remove_view from iButton branch

* App gui-test: use backported submenu api

* App subghz: initial commit

* App subghz: syntax fix

* App gui-test: fix submenu callback

* App subghz: add subfolders to build

* Gui view: c++ verison of with_view_model

* Subghz app: simple spectrum settings view

* Subghz app: add spectrum settings view to view manager

* Subghz app: spectrum settings scene

Co-authored-by: coreglitch <mail@s3f.ru>
2021-03-05 12:47:27 +03:00

37 lines
No EOL
809 B
C++

#pragma once
#include <furi.h>
#include <gui/view_dispatcher.h>
#include <gui/modules/submenu.h>
#include "subghz-event.h"
#include "view/subghz-view-spectrum-settings.h"
class SubghzAppViewManager {
public:
enum class ViewType : uint8_t {
Submenu,
SpectrumSettings,
};
osMessageQueueId_t event_queue;
SubghzAppViewManager();
~SubghzAppViewManager();
void switch_to(ViewType type);
void receive_event(SubghzEvent* event);
void send_event(SubghzEvent* event);
Submenu* get_submenu();
SubghzViewSpectrumSettings* get_spectrum_settings();
private:
ViewDispatcher* view_dispatcher;
Gui* gui;
uint32_t previous_view_callback(void* context);
// view elements
Submenu* submenu;
SubghzViewSpectrumSettings* spectrum_settings;
};