+ MN_HL, /* horizontal line */
+};
+
+class Menu;
+
+class MenuItem
+{
+public:
+ MenuItemKind kind;
+ int toggled;
+ char *text;
+ char *input;
+ string_list_type* list;
+ Menu* target_menu;
+
+ void change_text (const char *text);
+ void change_input(const char *text);
+
+ static MenuItem* create(MenuItemKind kind, const char *text, int init_toggle, Menu* target_menu);
+};
+
+class Menu
+{
+private:
+ // position of the menu (ie. center of the menu, not top/left)
+ int pos_x;
+ int pos_y;
+
+ Menu* last_menu;
+ int width();
+ int height();
+
+public:
+ Timer effect;
+ int arrange_left;
+ int active_item;
+ std::vector<MenuItem> item;
+
+ static void set_current(Menu* pmenu);
+
+ Menu();
+ ~Menu();
+
+ void additem(MenuItem* pmenu_item);
+ void additem(MenuItemKind kind, const std::string& text, int init_toggle, Menu* target_menu);
+ void action ();
+
+ /** Remove all entries from the menu */
+ void clear();
+
+ /** Check, if the value of the active menu item has changed. */
+ int check ();
+ void draw ();
+ void draw_item(int index, int menu_width, int menu_height);
+ void set_pos(int x, int y, float rw = 0, float rh = 0);
+
+ /* Check for a menu event */
+ void event(SDL_Event& event);