]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/Menus.h
some more cleanups.
[lyx.git] / src / frontends / qt4 / Menus.h
1 // -*- C++ -*-
2 /**
3  * \file Menus.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 #ifndef MENUS_H
14 #define MENUS_H
15
16 #include "support/docstring.h"
17
18 #include <vector>
19
20 class QMenu;
21 class QString;
22
23 namespace lyx {
24
25 class Lexer;
26 class FuncRequest;
27
28 namespace frontend {
29
30 class GuiView;
31
32 class Menus
33 {
34 public:
35         Menus();
36         
37         ///
38         bool searchMenu(FuncRequest const & func,
39                 std::vector<docstring> & names) const;
40         ///
41         void fillMenuBar(GuiView * view);
42
43         /// \return a top-level submenu given its name.
44         QMenu * menu(QString const & name);
45
46         ///
47         void read(Lexer &);
48
49         ///
50         void updateMenu(QString const & name);
51
52 private:
53         /// Use the Pimpl idiom to hide the internals.
54         struct Impl;
55         /// The pointer never changes although *d's contents may.
56         Impl * const d;
57 };
58
59 } // namespace frontend
60 } // namespace lyx
61
62 #endif // MENUS_H