]> git.lyx.org Git - features.git/blob - src/frontends/qt2/QLMenubar.h
Replace LString.h with support/std_string.h,
[features.git] / src / frontends / qt2 / QLMenubar.h
1 // -*- C++ -*-
2 /**
3  * \file qt2/QLMenubar.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Lars Gullik Bjønnes
8  * \author John Levon
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13
14 #ifndef QLMENUBAR_H
15 #define QLMENUBAR_H
16
17 #include "frontends/Menubar.h"
18 #include "support/std_string.h"
19 #include <map>
20
21 class LyXView;
22 class QtView;
23 class MenuBackend;
24 class QLPopupMenu;
25
26 class QLMenubar : public Menubar {
27 public:
28         QLMenubar(LyXView *, MenuBackend const &);
29
30         /// opens a top-level submenu given its name
31         void openByName(string const &);
32
33         /// update the state of the menuitems - not needed
34         void update();
35
36         /// return the owning view
37         QtView * view();
38
39         /// return the menu controller
40         MenuBackend const & backend();
41 private:
42         /// owning view
43         QtView * owner_;
44
45         /// menu controller
46         MenuBackend const & menubackend_;
47
48         typedef std::map<string, QLPopupMenu *> NameMap;
49
50         /// name to menu for openByName
51         NameMap name_map_;
52 };
53
54 #endif // QLMENUBAR_H