]> git.lyx.org Git - lyx.git/blob - src/frontends/gtk/GMenubar.h
Move to gtk 2.4
[lyx.git] / src / frontends / gtk / GMenubar.h
1 // -*- C++ -*-
2 /**
3  * \file gtk/GMenubar.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Huang Ying
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef MENUBAR_PIMPL_H
13 #define MENUBAR_PIMPL_H
14
15 #include "frontends/Menubar.h"
16 #include "MenuBackend.h"
17 #include <vector>
18
19 class LyXView;
20
21 namespace lyx {
22 namespace frontend {
23
24 class GMenubar : public Menubar, public sigc::trackable {
25 public:
26         GMenubar(LyXView *, MenuBackend const &);
27         ~GMenubar();
28         void update();
29         void openByName(std::string const &);
30 private:
31         void onCommandActivate(MenuItem const * item, Gtk::MenuItem * gitem);
32         void onSubMenuActivate(MenuItem const * item, Gtk::MenuItem * gitem);
33         bool submenuDisabled(MenuItem const * item);
34         Gtk::MenuBar menubar_;
35         LyXView * view_;
36         std::vector<Glib::ustring> mainMenuNames_;
37 };
38
39 } // namespace frontend
40 } // namespace lyx
41
42 #endif