3 * \file xforms/Menubar_pimpl.h
4 * Copyright 1995 Matthias Ettrich
5 * Copyright 1996-2001 Lars Gullik Bjønnes
6 * This file is part of LyX, the document processor.
7 * Licence details can be found in the file COPYING.
9 * \author Lars Gullik Bjønnes
11 * Full author contact details are available in file CREDITS
14 #ifndef MENUBAR_PIMPL_H
15 #define MENUBAR_PIMPL_H
19 #include "frontends/Menubar.h"
21 #include <boost/shared_ptr.hpp>
23 #include "forms_fwd.h"
24 #include <X11/X.h> // Window
34 /** The LyX GUI independent menubar class
35 The GUI interface is implemented in the corresponding Menubar_pimpl class.
37 struct Menubar::Pimpl {
40 Pimpl(LyXView *, MenuBackend const &);
44 /// update the state of the menuitems
47 /// Opens a top-level submenu given its name
48 void openByName(string const &);
51 static void MenuCallback(FL_OBJECT *, long);
55 void add_toc(int menu, string const & extra_label,
56 std::vector<int> & smn, Window win);
58 void add_references(int menu, string const & extra_label,
59 std::vector<int> & smn, Window win);
61 int create_submenu(Window win, XFormsView * view,
62 Menu const & menu, std::vector<int> & smn);
65 void makeMenubar(Menu const & menu);
70 MenuBackend const * menubackend_;
74 ItemInfo(Menubar::Pimpl * p, MenuItem const * i,
78 Menubar::Pimpl * pimpl_;
80 boost::shared_ptr<MenuItem const> item_;
86 typedef std::vector<boost::shared_ptr<ItemInfo> > ButtonList;
88 ButtonList buttonlist_;