]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QLPopupMenu.h
fix navigate
[lyx.git] / src / frontends / qt2 / QLPopupMenu.h
1 /**
2  * \file QLPopupMenu.h
3  * Copyright 2002 the LyX Team
4  * Read the file COPYING
5  *
6  * \author John Levon <levon@movementarian.org>
7  */
8
9 #ifndef QLPOPUPMENU_H
10 #define QLPOPUPMENU_H
11  
12 #include "Menubar_pimpl.h"
13  
14 #include <qpopupmenu.h> 
15
16 #include "LString.h"
17  
18 class MenuBackend;
19 class MenuItem;
20 class Menu;
21 class QMenuData;
22 class QLPopupMenu;
23
24 /// create a sub-menu
25 std::pair<int, QLPopupMenu *>
26         createMenu(QMenuData * parent, MenuItem const * item, Menubar::Pimpl * owner, bool is_toplevel = false);
27  
28 /// a submenu
29 class QLPopupMenu : public QPopupMenu {
30         Q_OBJECT
31 public:
32         QLPopupMenu(Menubar::Pimpl * owner, string const & name, bool toplevel);
33
34         /// populate the menu 
35         void populate(Menu * menu);
36
37 public slots:
38         /// populate the toplevel menu and all children
39         void showing();
40
41 private:
42         /// return true if the given submenu is disabled
43         bool disabled(Menu * menu);
44  
45         /// our owning menubar
46         Menubar::Pimpl * owner_;
47
48         /// the name of this menu
49         string name_;
50 };
51
52 #endif // QLPOPUPMENU_H