]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/Menubar_pimpl.h
Yet more dialog tweaking from Rob.
[lyx.git] / src / frontends / xforms / Menubar_pimpl.h
index 85d895bba93c51e69179ef4bde77ef56eaf5c376..e1d43cec378a86d39d22d9753129b2f3ba64dea9 100644 (file)
@@ -2,11 +2,13 @@
 /**
  * \file Menubar_pimpl.h
  * Copyright 1995 Matthias Ettrich
- * Copyright 1995-2002 the LyX Team
  * Copyright 1996-2001 Lars Gullik Bjønnes
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * \author Lars Gullik Bjønnes, larsbj@lyx.org
+ * \author Lars Gullik Bjønnes
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #ifndef MENUBAR_PIMPL_H
@@ -18,8 +20,6 @@
 
 #include "LString.h"
 #include "frontends/Menubar.h"
-#include "commandtags.h"
-#include "MenuBackend.h"
 
 #include <boost/shared_ptr.hpp>
 
@@ -30,6 +30,9 @@
 #include <map>
 
 class LyXView;
+class XFormsView;
+class Menu;
+class MenuItem;
 
 /** The LyX GUI independent menubar class
   The GUI interface is implemented in the corresponding Menubar_pimpl class.
@@ -39,13 +42,18 @@ public:
        ///
        Pimpl(LyXView *, MenuBackend const &);
        ///
-       void set(string const &);
+       ~Pimpl();
+
+       /// update the state of the menuitems
+       void update();
+
        /// Opens a top-level submenu given its name
        void openByName(string const &);
 
        ///
        static void MenuCallback(FL_OBJECT *, long);
 
+private:
        ///
        void add_toc(int menu, string const & extra_label,
                     std::vector<int> & smn, Window win);
@@ -53,27 +61,23 @@ public:
        void add_references(int menu, string const & extra_label,
                            std::vector<int> & smn, Window win);
        ///
-       int create_submenu(Window win, LyXView * view,
-                          string const & menuname,
-                          std::vector<int> & smn);
+       int create_submenu(Window win, XFormsView * view,
+                          Menu const & menu,
+                          std::vector<int> & smn, bool & all_disabled);
 
-       /// update the state of the menuitems
-       void update() {}
-private:
        //
-       void makeMenubar(Menu const &menu);
+       void makeMenubar(Menu const & menu);
 
        ///
-       LyXView * owner_;
+       XFormsView * owner_;
        ///
        MenuBackend const * menubackend_;
        ///
        struct ItemInfo {
                ///
                ItemInfo(Menubar::Pimpl * p, MenuItem const * i,
-                        FL_OBJECT * o)
-
-                       : pimpl_(p), obj_(o) { item_.reset(i); }
+                        FL_OBJECT * o);
+               ~ItemInfo();
                ///
                Menubar::Pimpl * pimpl_;
                ///
@@ -86,14 +90,5 @@ private:
        typedef std::vector<boost::shared_ptr<ItemInfo> > ButtonList;
        ///
        ButtonList buttonlist_;
-
-       ///
-       typedef std::map<string, FL_OBJECT *> MenubarMap;
-       ///
-       MenubarMap menubarmap_;
-       ///
-       string current_menu_name_;
-       ///
-       FL_OBJECT * current_group_;
 };
 #endif