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
32 class XFormsMenubar : public Menubar {
35 typedef std::vector<FuncRequest> Funcs;
37 XFormsMenubar(LyXView *, MenuBackend const &);
41 /// update the state of the menuitems
44 /// Opens a top-level submenu given its name
45 void openByName(std::string const &);
48 static void MenuCallback(FL_OBJECT *, long);
52 void add_toc(int menu, std::string const & extra_label,
53 std::vector<int> & smn, Window win);
55 void add_references(int menu, std::string const & extra_label,
56 std::vector<int> & smn, Window win);
58 int create_submenu(Window win, XFormsView * view,
60 std::vector<int> & smn, Funcs & funcs);
63 void makeMenubar(Menu const & menu);
68 MenuBackend const * menubackend_;
72 ItemInfo(XFormsMenubar * p, MenuItem const * i,
76 XFormsMenubar * menubar_;
78 boost::shared_ptr<MenuItem const> item_;
84 typedef std::vector<boost::shared_ptr<ItemInfo> > ButtonList;
86 ButtonList buttonlist_;