lyx_mirror/src/frontends/qt4/GuiPopupMenu.h
Jean-Marc Lasgouttes cdb78de525 * MenuBackend.cpp (binding): remove forgui argument
* frontends/qt4/GuiPopupMenu.cpp (addBinding): remove (merge into
	getLabel and remove mac-specific code).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22412 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-07 10:53:04 +00:00

58 lines
1.1 KiB
C++

// -*- C++ -*-
/**
* \file GuiPopupMenu.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author John Levon
*
* Full author contact details are available in file CREDITS.
*/
#ifndef GUIPOPUPMENU_H
#define GUIPOPUPMENU_H
#include <QMenu>
#include "FuncRequest.h"
#include "MenuBackend.h"
namespace lyx {
namespace frontend {
class GuiView;
/// a submenu
class GuiPopupMenu : public QMenu
{
Q_OBJECT
public:
///
GuiPopupMenu(GuiView * owner, MenuItem const & mi,
bool topLevelMenu = false);
/// populates the menu or one of its submenu
/// This is used as a recursive function
void populate(QMenu* qMenu, Menu * menu);
public Q_SLOTS:
/// populate the toplevel menu and all children
void updateView();
private:
/// Get a Menu item label from the menu backend
docstring const getLabel(MenuItem const & mi);
/// our owning view
GuiView * owner_;
/// the name of this menu
docstring name_;
/// Top Level Menu
Menu topLevelMenu_;
};
} // namespace frontend
} // namespace lyx
#endif // GUIPOPUPMENU_H