#ifndef EXTRA_MENU_HPP
#define EXTRA_MENU_HPP

#include "functor.hpp"

#include "gettext.hpp"

#include <string>
#include <vector>

class ExtraMenuItem
{
public:
  ExtraMenuItem(const std::string c, const std::string& s, TimeFv *cb);

  std::string command;
  std::string shortcut;
  TimeFv *callback;
};

class ExtraMenu
{
public:
  void add_item(const ExtraMenuItem& e);

  void mainloop();

  ExtraMenu(const std::string& h = gettext("Extra Menu"));

private:
  std::string header;

  void print();
  void cleanup();

  std::vector<ExtraMenuItem> items;
  int pos;
  Overlay o;
};

#endif
