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
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 XFormsMenubar(LyXView *, MenuBackend const &);
39 /// update the state of the menuitems
42 /// Opens a top-level submenu given its name
43 void openByName(string const &);
46 static void MenuCallback(FL_OBJECT *, long);
50 void add_toc(int menu, string const & extra_label,
51 std::vector<int> & smn, Window win);
53 void add_references(int menu, string const & extra_label,
54 std::vector<int> & smn, Window win);
56 int create_submenu(Window win, XFormsView * view,
57 Menu const & menu, std::vector<int> & smn);
60 void makeMenubar(Menu const & menu);
65 MenuBackend const * menubackend_;
69 ItemInfo(XFormsMenubar * p, MenuItem const * i,
73 XFormsMenubar * menubar_;
75 boost::shared_ptr<MenuItem const> item_;
81 typedef std::vector<boost::shared_ptr<ItemInfo> > ButtonList;
83 ButtonList buttonlist_;