]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt2/Menubar_pimpl.h
better selection and scrolling behaviour
[lyx.git] / src / frontends / qt2 / Menubar_pimpl.h
index 1dc44a423bf253fb6a9993bbe04552f5c0e21829..6937bc0612d1f6cbcecd258a9c044236aa1c3323 100644 (file)
@@ -1,45 +1,44 @@
 // -*- C++ -*-
 /**
- * \file Menubar_pimpl.h
- * Copyright 2002 the LyX Team
- * Read the file COPYING
+ * \file qt2/Menubar_pimpl.h
+ * 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 John Levon <moz@compsoc.man.ac.uk>
+ * \author Lars Gullik Bjønnes
+ * \author John Levon
+ *
+ * Full author contact details are available in file CREDITS
  */
 
+
 #ifndef MENUBAR_PIMPL_H
 #define MENUBAR_PIMPL_H
 
-#include <vector>
-#include <map>
-
-#include <config.h>
 #ifdef __GNUG__
 #pragma interface
 #endif
 
-#include "LString.h"
 #include "frontends/Menubar.h"
+#include "LString.h"
+#include <map>
 
 class LyXView;
 class QtView;
 class MenuBackend;
+class QLPopupMenu;
 
 struct Menubar::Pimpl {
 public:
        Pimpl(LyXView *, MenuBackend const &);
+
        /// opens a top-level submenu given its name
        void openByName(string const &);
 
        /// update the state of the menuitems - not needed
-       void update() {};
+       void update() {}
 
        /// return the owning view
-       QtView * view() { return owner_; } 
+       QtView * view() { return owner_; }
 
        /// return the menu controller
        MenuBackend const & backend() { return menubackend_; }
@@ -49,6 +48,11 @@ private:
 
        /// menu controller
        MenuBackend const & menubackend_;
+
+       typedef std::map<string, QLPopupMenu *> NameMap;
+
+       /// name to menu for openByName
+       NameMap name_map_;
 };
+
 #endif // MENUBAR_PIMPL_H