2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 2000 The LyX Team.
9 * ====================================================== */
11 #ifndef MENUBAR_PIMPL_H
12 #define MENUBAR_PIMPL_H
20 #include <gnome--/app.h>
21 #include "frontends/Menubar.h"
31 Structure containing Gtk widget and corresponding LyX action
33 struct GtkWidgetToAction
36 GtkWidgetToAction(GtkWidget * w, int a) { widget_=w; action_=a; }
43 /** The LyX GUI independent menubar class
44 The GUI interface is implemented in the corresponding Menubar_pimpl class.
46 class Menubar::Pimpl: public SigC::Object {
49 Pimpl(LyXView *, MenuBackend const &);
53 void set(string const &);
54 /// Opens a top-level submenu given its name
55 void openByName(string const &);
56 /// update the state of menuitems
61 void callback(int action);
62 /// compose Gnome::UI::Array object describing the menu
63 void composeUIInfo(string const & menu_name, vector<Gnome::UI::Info> & Menus);
64 /// populate wid_act_ vector with all widgets and corresponding actions
65 void connectWidgetToAction(GnomeUIInfo * guinfo);
71 MenuBackend const * menubackend_;
73 string current_menu_name_;
74 Gnome::UI::Array Menu_;
79 vector<GtkWidgetToAction> wid_act_;