3 * \file XFormsMenubar.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 XFORMSMENUBAR_H
13 #define XFORMSMENUBAR_H
15 #include "funcrequest.h"
16 #include "frontends/Menubar.h"
18 #include "LayoutEngine.h"
20 #include <boost/shared_ptr.hpp>
22 #include "forms_fwd.h"
23 #include <X11/X.h> // Window
37 class XFormsMenubar : public Menubar {
40 typedef std::vector<FuncRequest> Funcs;
42 XFormsMenubar(LyXView *, MenuBackend const &);
46 /// update the state of the menuitems
49 /// Opens a top-level submenu given its name
50 void openByName(std::string const &);
53 static void MenuCallback(FL_OBJECT *, long);
57 void add_toc(int menu, std::string const & extra_label,
58 std::vector<int> & smn, Window win);
60 void add_references(int menu, std::string const & extra_label,
61 std::vector<int> & smn, Window win);
63 int create_submenu(Window win, XFormsView * view,
65 std::vector<int> & smn, Funcs & funcs);
68 void makeMenubar(Menu const & menu);
73 MenuBackend const * menubackend_;
75 boost::shared_ptr<Box> menubar_;
81 ItemInfo(XFormsMenubar * p, MenuItem const * i,
85 XFormsMenubar * menubar_;
87 boost::shared_ptr<MenuItem const> item_;
93 typedef std::vector<boost::shared_ptr<ItemInfo> > ButtonList;
95 ButtonList buttonlist_;
98 } // namespace frontend