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
22 #include "frontends/Menubar.h"
24 #include <boost/shared_ptr.hpp>
26 #include "forms_fwd.h"
27 #include <X11/X.h> // Window
37 /** The LyX GUI independent menubar class
38 The GUI interface is implemented in the corresponding Menubar_pimpl class.
40 struct Menubar::Pimpl {
43 Pimpl(LyXView *, MenuBackend const &);
47 /// update the state of the menuitems
50 /// Opens a top-level submenu given its name
51 void openByName(string const &);
54 static void MenuCallback(FL_OBJECT *, long);
58 void add_toc(int menu, string const & extra_label,
59 std::vector<int> & smn, Window win);
61 void add_references(int menu, string const & extra_label,
62 std::vector<int> & smn, Window win);
64 int create_submenu(Window win, XFormsView * view,
66 std::vector<int> & smn, bool & all_disabled);
69 void makeMenubar(Menu const & menu);
74 MenuBackend const * menubackend_;
78 ItemInfo(Menubar::Pimpl * p, MenuItem const * i,
82 Menubar::Pimpl * pimpl_;
84 boost::shared_ptr<MenuItem const> item_;
90 typedef std::vector<boost::shared_ptr<ItemInfo> > ButtonList;
92 ButtonList buttonlist_;