40 lines
724 B
C++
40 lines
724 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 id_;
|
|
std::string label_;
|
|
|
|
GuiElt() {}
|
|
public:
|
|
~GuiElt() {}
|
|
Type type() const { return type_; }
|
|
const std::string &id() const { return id_; }
|
|
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(); }
|
|
void add_menu_item(const std::string &id, const std::string &label);
|
|
};
|
|
|
|
#endif // GUI_HPP
|
|
|