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 "frontends/Menubar.h"
17 #include <boost/shared_ptr.hpp>
19 #include "forms_fwd.h"
20 #include <X11/X.h> // Window
22 #include "support/std_string.h"
31 class XFormsMenubar : public Menubar {
34 XFormsMenubar(LyXView *, MenuBackend const &);
38 /// update the state of the menuitems
41 /// Opens a top-level submenu given its name
42 void openByName(string const &);
45 static void MenuCallback(FL_OBJECT *, long);
49 void add_toc(int menu, string const & extra_label,
50 std::vector<int> & smn, Window win);
52 void add_references(int menu, string const & extra_label,
53 std::vector<int> & smn, Window win);
55 int create_submenu(Window win, XFormsView * view,
56 Menu const & menu, std::vector<int> & smn);
59 void makeMenubar(Menu const & menu);
64 MenuBackend const * menubackend_;
68 ItemInfo(XFormsMenubar * p, MenuItem const * i,
72 XFormsMenubar * menubar_;
74 boost::shared_ptr<MenuItem const> item_;
80 typedef std::vector<boost::shared_ptr<ItemInfo> > ButtonList;
82 ButtonList buttonlist_;