mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2026-04-19 23:02:43 +00:00
Fixed issues with new module system
This commit is contained in:
23
core/src/gui/menu.h
Normal file
23
core/src/gui/menu.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
class Menu {
|
||||
public:
|
||||
Menu();
|
||||
|
||||
struct MenuItem_t {
|
||||
void (*drawHandler)(void* ctx);
|
||||
void* ctx;
|
||||
};
|
||||
|
||||
void registerEntry(std::string name, void (*drawHandler)(void* ctx), void* ctx = NULL);
|
||||
void removeEntry(std::string name);
|
||||
void draw();
|
||||
|
||||
std::vector<std::string> order;
|
||||
|
||||
private:
|
||||
std::map<std::string, MenuItem_t> items;
|
||||
};
|
||||
Reference in New Issue
Block a user