3 * \file xforms/Menubar_pimpl.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
9 * Full author contact details are available in file CREDITS
12 #ifndef MENUBAR_PIMPL_H
13 #define MENUBAR_PIMPL_H
17 #include "frontends/Menubar.h"
19 #include <boost/shared_ptr.hpp>
21 #include "forms_fwd.h"
22 #include <X11/X.h> // Window
32 /** The LyX GUI independent menubar class
33 The GUI interface is implemented in the corresponding Menubar_pimpl class.
35 struct Menubar::Pimpl {
38 Pimpl(LyXView *, MenuBackend const &);
42 /// update the state of the menuitems
45 /// Opens a top-level submenu given its name
46 void openByName(string const &);
49 static void MenuCallback(FL_OBJECT *, long);
53 void add_toc(int menu, string const & extra_label,
54 std::vector<int> & smn, Window win);
56 void add_references(int menu, string const & extra_label,
57 std::vector<int> & smn, Window win);
59 int create_submenu(Window win, XFormsView * view,
60 Menu const & menu, std::vector<int> & smn);
63 void makeMenubar(Menu const & menu);
68 MenuBackend const * menubackend_;
72 ItemInfo(Menubar::Pimpl * p, MenuItem const * i,
76 Menubar::Pimpl * pimpl_;
78 boost::shared_ptr<MenuItem const> item_;
84 typedef std::vector<boost::shared_ptr<ItemInfo> > ButtonList;
86 ButtonList buttonlist_;