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 <boost/shared_ptr.hpp>
20 #include "forms_fwd.h"
21 #include <X11/X.h> // Window
23 #include "support/std_string.h"
33 class XFormsMenubar : public Menubar {
36 typedef std::vector<FuncRequest> Funcs;
38 XFormsMenubar(LyXView *, MenuBackend const &);
42 /// update the state of the menuitems
45 /// Opens a top-level submenu given its name
46 void openByName(string const &);
49 static void MenuCallback(FL_OBJECT *, long);
53 void add_toc(int menu, string const & extra_label,
54 std::vector<int> & smn, Window win);
56 void add_references(int menu, string const & extra_label,
57 std::vector<int> & smn, Window win);
59 int create_submenu(Window win, XFormsView * view,
61 std::vector<int> & smn, Funcs & funcs);
64 void makeMenubar(Menu const & menu);
69 MenuBackend const * menubackend_;
73 ItemInfo(XFormsMenubar * p, MenuItem const * i,
77 XFormsMenubar * menubar_;
79 boost::shared_ptr<MenuItem const> item_;
85 typedef std::vector<boost::shared_ptr<ItemInfo> > ButtonList;
87 ButtonList buttonlist_;