]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/Menubar_pimpl.h
Get rid of the static_casts.
[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         ~Pimpl();
32         
33         /// opens a top-level submenu given its name
34         void openByName(string const &);
35
36         /// update the state of the menuitems - not needed
37         void update();
38
39         /// return the owning view
40         QtView * view();
41
42         /// return the menu controller
43         MenuBackend const & backend();
44 private:
45         /// owning view
46         QtView * owner_;
47
48         /// menu controller
49         MenuBackend const & menubackend_;
50
51         typedef std::map<string, QLPopupMenu *> NameMap;
52
53         /// name to menu for openByName
54         NameMap name_map_;
55 };
56
57 #endif // MENUBAR_PIMPL_H