File: menu-tree.h

package info (click to toggle)
menu 2.1.5-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,476 kB
  • ctags: 1,251
  • sloc: cpp: 6,222; ansic: 2,306; sh: 453; makefile: 296; sed: 93
file content (41 lines) | stat: -rw-r--r-- 888 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef MENU_TREE_H
#define MENU_TREE_H


#include <map>
#include <vector>
#include <deque>
#include "../adstring.h"
#include "menu-method.h"

class menuentry;

bool operator< (const StrVec &left, const StrVec &right);

typedef map <StrVec, menuentry *, less<StrVec> > submenu_container;

class menuentry {
private:
  char hotkeyconv(char);
  void generate_hotkeys();
  void store_hints();
  StrVec section; //Do we need section? I think not. (is in parent's submenus)
  StrVec menuhints;

public:
  submenu_container submenus;
  map <String, String, less<String> > vars;
  bool forced;

  void add_entry(StrVec, map <String, String, less<String> > &);
  void add_menuentry_ptr(StrVec s, menuentry *m);
  void output();
  void postprocess(int n_parent, int level, String title);
  void process_hints(const StrVec &pref);
  menuentry(){
    forced=false;
  }
};


#endif /* MENU_TREE_H */