]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/Menubar_pimpl.h
Populate menus on popup - good news JMarc, it seems to work (almost) perfectly
[lyx.git] / src / frontends / qt2 / Menubar_pimpl.h
1 // -*- C++ -*-
2 /**
3  * \file Menubar_pimpl.h
4  * Copyright 2002 the LyX Team
5  * Read the file COPYING
6  *
7  * \author Lars Gullik Bjønnes <larsbj@lyx.org>
8  * \author John Levon <moz@compsoc.man.ac.uk>
9  */
10
11  
12 #ifndef MENUBAR_PIMPL_H
13 #define MENUBAR_PIMPL_H
14
15 #include <vector>
16 #include <map>
17
18 #include <config.h>
19  
20 #ifdef __GNUG__
21 #pragma interface
22 #endif
23
24 #include "LString.h"
25 #include "frontends/Menubar.h"
26
27 class LyXView;
28 class QtView;
29 class MenuBackend;
30
31 struct Menubar::Pimpl {
32 public:
33         Pimpl(LyXView *, MenuBackend const &);
34  
35         /// opens a top-level submenu given its name
36         void openByName(string const &);
37
38         /// update the state of the menuitems - not needed
39         void update() {};
40
41         /// return the owning view
42         QtView * view() { return owner_; } 
43
44         /// return the menu controller
45         MenuBackend const & backend() { return menubackend_; }
46 private:
47         /// owning view
48         QtView * owner_;
49
50         /// menu controller
51         MenuBackend const & menubackend_;
52 };
53  
54 #endif // MENUBAR_PIMPL_H