]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/Menubar_pimpl.h
Strip trailing whitespace.
[lyx.git] / src / frontends / qt2 / Menubar_pimpl.h
1 // -*- C++ -*-
2 /**
3  * \file qt2/Menubar_pimpl.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 MENUBAR_PIMPL_H
15 #define MENUBAR_PIMPL_H
16
17
18 #include "frontends/Menubar.h"
19 #include "LString.h"
20 #include <map>
21
22 class LyXView;
23 class QtView;
24 class MenuBackend;
25 class QLPopupMenu;
26
27 struct Menubar::Pimpl {
28 public:
29         Pimpl(LyXView *, MenuBackend const &);
30
31         /// opens a top-level submenu given its name
32         void openByName(string const &);
33
34         /// update the state of the menuitems - not needed
35         void update() {}
36
37         /// return the owning view
38         QtView * view() { return owner_; }
39
40         /// return the menu controller
41         MenuBackend const & backend() { return menubackend_; }
42 private:
43         /// owning view
44         QtView * owner_;
45
46         /// menu controller
47         MenuBackend const & menubackend_;
48
49         typedef std::map<string, QLPopupMenu *> NameMap;
50
51         /// name to menu for openByName
52         NameMap name_map_;
53 };
54
55 #endif // MENUBAR_PIMPL_H