3 * \file Menubar_pimpl.h
4 * Copyright 1995 Matthias Ettrich
5 * Copyright 1996-2001 Lars Gullik Bjønnes
6 * Read the file COPYING
8 * \author Lars Gullik Bjønnes
10 * Full author contact details are available in file CREDITS
13 #ifndef MENUBAR_PIMPL_H
14 #define MENUBAR_PIMPL_H
21 #include "frontends/Menubar.h"
23 #include <boost/shared_ptr.hpp>
25 #include "forms_fwd.h"
26 #include <X11/X.h> // Window
36 /** The LyX GUI independent menubar class
37 The GUI interface is implemented in the corresponding Menubar_pimpl class.
39 struct Menubar::Pimpl {
42 Pimpl(LyXView *, MenuBackend const &);
46 /// update the state of the menuitems
49 /// Opens a top-level submenu given its name
50 void openByName(string const &);
53 static void MenuCallback(FL_OBJECT *, long);
57 void add_toc(int menu, string const & extra_label,
58 std::vector<int> & smn, Window win);
60 void add_references(int menu, string const & extra_label,
61 std::vector<int> & smn, Window win);
63 int create_submenu(Window win, XFormsView * view,
65 std::vector<int> & smn, bool & all_disabled);
68 void makeMenubar(Menu const & menu);
73 MenuBackend const * menubackend_;
77 ItemInfo(Menubar::Pimpl * p, MenuItem const * i,
81 Menubar::Pimpl * pimpl_;
83 boost::shared_ptr<MenuItem const> item_;
89 typedef std::vector<boost::shared_ptr<ItemInfo> > ButtonList;
91 ButtonList buttonlist_;