flipperzero-firmware/lib/app-scened-template/view_modules/submenu_vm.cpp
gornekich 23ff6723cf
[FL-2204] Bluetooth forget devices (#967)
* bt: update connection parameters
* bt: set correct connection latency and timeout
* gui popup: add clean method
* furi_hal_bt: add connection parameters request, clear database
* bt: add forget bonded devices API
* bt_settings: add forget bonded devices GUI
* bt: rework pin code show with view port to hide view
* bt: support conn parameters for different profiles
* furi_hal_bt: sync f6 target
* target f6: fix build
* bt: format sources
* furi_hal_bt: update connection parameters
* bt: update connection params, fix GUI
* FuriHal: fix spelling
* Refactoring: rename _clean to _reset

Co-authored-by: あく <alleteam@gmail.com>
2022-01-21 20:32:03 +03:00

34 lines
671 B
C++

#include "submenu_vm.h"
SubmenuVM::SubmenuVM() {
submenu = submenu_alloc();
}
SubmenuVM::~SubmenuVM() {
submenu_free(submenu);
}
View* SubmenuVM::get_view() {
return submenu_get_view(submenu);
}
void SubmenuVM::clean() {
submenu_reset(submenu);
}
void SubmenuVM::add_item(
const char* label,
uint32_t index,
SubmenuItemCallback callback,
void* callback_context) {
submenu_add_item(submenu, label, index, callback, callback_context);
}
void SubmenuVM::set_selected_item(uint32_t index) {
submenu_set_selected_item(submenu, index);
}
void SubmenuVM::set_header(const char* header) {
submenu_set_header(submenu, header);
}