23 #include <ncursesw/ncurses.h> 25 #include <unordered_map> 75 virtual const std::string&
getTitle()=0;
90 virtual void draw(
bool fHighlight,
const int y0,
const int x0,
const int w) = 0;
102 void draw_menu(
bool fHighlight,
const int y0,
const int x0,
const int w,
const std::string& key = std::string());
127 m_active(tags.at(
"active") ==
"true"),
128 m_title(tags.at(
"title")),
139 void drawInBar(
int x,
bool fHighlight =
false);
146 bool handleKey(
int code);
176 void draw(
bool fHighlight,
const int y0,
const int x0,
const int w) {
197 void highlight_next(
int step);
202 void refresh_window();
239 m_active(tags.at(
"active") ==
"true"),
240 m_title(tags.at(
"title")),
241 m_action(tags.at(
"action")),
242 m_key((tags.at(
"key") ==
"NONE") ? std::string() : tags.at(
"key")) {}
277 void draw(
bool fHighlight,
const int y0,
const int x0,
const int w) {
310 void draw(
bool fHighlight,
const int y0,
const int x0,
const int w);
321 const std::string&
getTitle() {
return m_line_title; }
334 static const std::string m_line_title;
348 MenuBar(
const std::string& xml);
354 void add(
Menu* menu);
366 bool select(
int mouse_x = 1);
379 bool handleKey(
int code);
394 void define_menu(
const StringMap& attributes);
400 void define_menu_end(
const std::string& name);
406 void define_menu_item(
const StringMap& attributes);
411 void define_menu_line();
static MiloApp & getGlobal()
Definition: ui.h:809
std::unordered_map< std::string, std::string > StringMap
hash map for string => string
Definition: util.h:363
void doMenu(const std::string &menuFunctionName)
Definition: ui.cpp:144