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