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 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)
51 void add_lastfiles(int menu, string const & extra_label,
52 std::vector<int> & smn, StrPool & strpool);
53 /// Add to "menu" the list of opened documents
54 /// (add "extra_label" to the last entry)
55 void add_documents(int menu, string const & extra_label,
56 std::vector<int> & smn, StrPool & strpool);
58 int create_submenu(Window win, LyXView * view,
59 string const & menuname,
60 std::vector<int> & smn, StrPool & strpool);
62 /// update the state of the menuitems
71 MenuBackend const * menubackend_;
77 ItemInfo(Menubar::Pimpl * p, MenuItem const * i,
79 : pimpl_(p), item_(i), obj_(o) {}
81 Menubar::Pimpl * pimpl_;
83 MenuItem const * item_;
89 typedef std::vector<ItemInfo *> ButtonList;
91 ButtonList buttonlist_;