Files
integration/luprex/core/cpp/gui.hpp
2021-02-16 14:15:40 -05:00

41 lines
790 B
C++

#ifndef GUI_HPP
#define GUI_HPP
#include <string>
#include <vector>
#include "luastack.hpp"
class GuiElt {
friend class Gui;
public:
enum Type {
TYPE_MENU_ITEM,
};
private:
Type type_;
std::string action_;
std::string label_;
GuiElt() {}
public:
~GuiElt() {}
Type type() const { return type_; }
const std::string &action() const { return action_; }
const std::string &label() const { return label_; }
};
class Gui {
public:
using EltVec = std::vector<GuiElt>;
private:
EltVec elts_;
public:
const EltVec &elts() const { return elts_; }
void clear() { elts_.clear(); }
bool has_action(const std::string &action) const;
void menu_item(const std::string &action, const std::string &label);
};
#endif // GUI_HPP