]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/Menubar_pimpl.C
Populate menus on popup - good news JMarc, it seems to work (almost) perfectly
[lyx.git] / src / frontends / qt2 / Menubar_pimpl.C
1 /**
2  * \file Menubar_pimpl.C
3  * Copyright 1999-2001 The LyX Team.
4  * See the file COPYING.
5  *
6  * \author  Lars Gullik Bjønnes, larsbj@lyx.org
7  */
8
9 #include <config.h>
10
11 #include <algorithm>
12
13 #ifdef __GNUG__
14 #pragma implementation
15 #endif
16
17 #include "Menubar_pimpl.h"
18 #include "MenuBackend.h"
19 #include "LyXAction.h"
20 #include "kbmap.h"
21 #include "buffer.h"
22 #include "lyxfunc.h"
23 #include "FloatList.h"
24 #include "support/lstrings.h"
25 #include "support/LAssert.h"
26 #include "gettext.h"
27 #include "debug.h"
28
29 #include "QtView.h"
30 #include "QLPopupMenu.h"
31  
32 #include <qmenubar.h>
33  
34  
35 using std::endl;
36 using std::vector;
37 using std::max;
38 using std::min;
39 using std::for_each;
40
41 Menubar::Pimpl::Pimpl(LyXView * view, MenuBackend const & mbe) 
42         : owner_(static_cast<QtView*>(view)), menubackend_(mbe)
43 {
44         Menu::const_iterator m = mbe.getMenubar().begin();
45         Menu::const_iterator end = mbe.getMenubar().end();
46         for (; m != end; ++m) {
47                 createMenu(owner_->menuBar(), &(*m), this);
48         }
49 }
50
51
52 void Menubar::Pimpl::openByName(string const &)
53 {
54         // FIXME 
55 }