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
34 class XFormsMenubar : public Menubar {
37 typedef std::vector<FuncRequest> Funcs;
39 XFormsMenubar(LyXView *, MenuBackend const &);
43 /// update the state of the menuitems
46 /// Opens a top-level submenu given its name
47 void openByName(std::string const &);
50 static void MenuCallback(FL_OBJECT *, long);
54 void add_toc(int menu, std::string const & extra_label,
55 std::vector<int> & smn, Window win);
57 void add_references(int menu, std::string const & extra_label,
58 std::vector<int> & smn, Window win);
60 int create_submenu(Window win, XFormsView * view,
62 std::vector<int> & smn, Funcs & funcs);
65 void makeMenubar(Menu const & menu);
70 MenuBackend const * menubackend_;
72 lyx::frontend::Box * menubar_;
74 lyx::frontend::WidgetMap widgets_;
78 ItemInfo(XFormsMenubar * p, MenuItem const * i,
82 XFormsMenubar * menubar_;
84 boost::shared_ptr<MenuItem const> item_;
90 typedef std::vector<boost::shared_ptr<ItemInfo> > ButtonList;
92 ButtonList buttonlist_;