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