]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt2/QLPopupMenu.h
Some string(widget->text()) fixes. Weirdness
[lyx.git] / src / frontends / qt2 / QLPopupMenu.h
index 13cae4475dd4759f60178bf8464f6b497f6eae4b..b996780364f25a7a583aa5e7edd295fb45ac87b6 100644 (file)
@@ -1,42 +1,54 @@
+// -*- C++ -*-
 /**
  * \file QLPopupMenu.h
- * Copyright 2002 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * \author John Levon <levon@movementarian.org>
+ * \author John Levon
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #ifndef QLPOPUPMENU_H
 #define QLPOPUPMENU_H
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
 #include "Menubar_pimpl.h"
-#include <qpopupmenu.h> 
+
+#include <qpopupmenu.h>
 
 #include "LString.h"
+
 class MenuBackend;
-class QtView;
 class MenuItem;
+class Menu;
 class QMenuData;
+class QLPopupMenu;
 
 /// create a sub-menu
-int createMenu(QMenuData * parent, MenuItem const * item, Menubar::Pimpl * owner);
+std::pair<int, QLPopupMenu *>
+createMenu(QMenuData * parent, MenuItem const * item,
+          Menubar::Pimpl * owner, bool is_toplevel = false);
+
 /// a submenu
 class QLPopupMenu : public QPopupMenu {
        Q_OBJECT
 public:
-       QLPopupMenu(Menubar::Pimpl * owner, string const & name);
+       QLPopupMenu(Menubar::Pimpl * owner,
+                   string const & name, bool toplevel);
 
-public slots:
        /// populate the menu
+       void populate(Menu * menu);
+public slots:
+       /// populate the toplevel menu and all children
        void showing();
-
 private:
        /// return true if the given submenu is disabled
-       bool disabled(string const & name);
+       bool disabled(Menu * menu);
+
        /// our owning menubar
        Menubar::Pimpl * owner_;