2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
6 * Copyright 1995 Matthias Ettrich
7 * Copyright 1995-2000 The LyX Team.
9 * This file is Copyright 1996-2000
12 * ====================================================== */
14 #ifndef MENUBAR_PIMPL_H
15 #define MENUBAR_PIMPL_H
23 #include "frontends/Menubar.h"
24 #include "commandtags.h"
25 #include FORMS_H_LOCATION
32 /** The LyX GUI independent menubar class
33 The GUI interface is implemented in the corresponding Menubar_pimpl class.
35 struct Menubar::Pimpl {
38 Pimpl(LyXView *, MenuBackend const &);
42 void set(string const &);
43 /// Opens a top-level submenu given its name
44 void openByName(string const &);
47 static void MenuCallback(FL_OBJECT *, long);
49 /** Add to "menu" the list of last opened files
50 (add "extra_label" to the last entry)
52 void add_lastfiles(int menu, string const & extra_label);
53 /** Add to "menu" the list of opened documents
54 (add "extra_label" to the last entry)
56 void add_documents(int menu, string const & extra_label);
57 /// Add to "menu" the list of exportable/viewable formats
58 /// (add "extra_label" to the last entry)
59 void add_formats(int menu, string const & extra_label,
60 kb_action action, bool viewable);
62 void add_toc(int menu, string const & extra_label,
63 std::vector<int> & smn, Window win);
65 void add_references(int menu, string const & extra_label,
66 std::vector<int> & smn, Window win);
68 int create_submenu(Window win, LyXView * view,
69 string const & menuname,
70 std::vector<int> & smn);
72 /// update the state of the menuitems
80 MenuBackend const * menubackend_;
86 ItemInfo(Menubar::Pimpl * p, MenuItem const * i,
88 : pimpl_(p), item_(i), obj_(o) {}
90 Menubar::Pimpl * pimpl_;
92 MenuItem const * item_;
98 typedef std::vector<ItemInfo *> ButtonList;
100 ButtonList buttonlist_;