]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/Menus.h
do what the FIXME suggested
[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 "MenuBackend.h"
17
18 #include <QObject>
19 #include <QHash>
20
21 class QMenu;
22
23
24 namespace lyx {
25 namespace frontend {
26
27 class GuiView;
28 class GuiPopupMenu;
29 class GuiView;
30
31 class Menus : public QObject, public MenuBackend
32 {
33         Q_OBJECT
34 public:
35         Menus() {}
36
37         ///
38         void fillMenuBar(GuiView * view);
39
40         /// \return a top-level submenu given its name.
41         QMenu * menu(QString const & name);
42
43         /// update the state of the menuitems - not needed
44         void updateView();
45
46 private:
47         /// Initialize specific MACOS X menubar
48         void macxMenuBarInit(GuiView * view);
49
50         typedef QHash<QString, GuiPopupMenu *> NameMap;
51
52         /// name to menu for \c menu() method.
53         NameMap name_map_;
54 };
55
56 } // namespace frontend
57 } // namespace lyx
58
59 #endif // MENUS_H