]> git.lyx.org Git - features.git/blob - src/frontends/qt2/QLPopupMenu.h
Replace LString.h with support/std_string.h,
[features.git] / src / frontends / qt2 / QLPopupMenu.h
1 // -*- C++ -*-
2 /**
3  * \file QLPopupMenu.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef QLPOPUPMENU_H
13 #define QLPOPUPMENU_H
14
15
16 #include <qpopupmenu.h>
17
18 #include "support/std_string.h"
19
20 #include <map>
21
22 class MenuBackend;
23 class MenuItem;
24 class Menu;
25 class QMenuData;
26 class QLMenubar;
27 class QLPopupMenu;
28
29 /// create a sub-menu
30 std::pair<int, QLPopupMenu *>
31 createMenu(QMenuData * parent, MenuItem const * item,
32            QLMenubar * owner, bool is_toplevel = false);
33
34 /// a submenu
35 class QLPopupMenu : public QPopupMenu {
36         Q_OBJECT
37 public:
38         QLPopupMenu(QLMenubar * owner,
39                     string const & name, bool toplevel);
40
41         /// populate the menu
42         void populate(Menu * menu);
43 public slots:
44         /// populate the toplevel menu and all children
45         void showing();
46 private:
47         /// our owning menubar
48         QLMenubar * owner_;
49
50         /// the name of this menu
51         string name_;
52 };
53
54 #endif // QLPOPUPMENU_H