mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-14 06:57:01 +00:00
4c5f5c6633
Menu -> MenuDefinition GuiPopupMenu -> Menu (definition now in header because of moc). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23604 a592a061-630c-0410-9148-cb99ea01b6c8
87 lines
1.3 KiB
C++
87 lines
1.3 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file Menus.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Lars Gullik Bjønnes
|
|
* \author John Levon
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#ifndef MENUS_H
|
|
#define MENUS_H
|
|
|
|
#include "support/docstring.h"
|
|
|
|
#include <QMenu>
|
|
|
|
#include <vector>
|
|
|
|
class QString;
|
|
|
|
namespace lyx {
|
|
|
|
class Lexer;
|
|
class FuncRequest;
|
|
|
|
namespace frontend {
|
|
|
|
class GuiView;
|
|
|
|
class Menu : public QMenu
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
///
|
|
Menu(GuiView * gv, QString const & name, bool top_level);
|
|
|
|
~Menu();
|
|
|
|
private Q_SLOTS:
|
|
///
|
|
void updateView();
|
|
|
|
private:
|
|
friend class Menus;
|
|
|
|
/// Use the Pimpl idiom to hide the internals.
|
|
struct Impl;
|
|
/// The pointer never changes although *d's contents may.
|
|
Impl * const d;
|
|
};
|
|
|
|
|
|
class Menus
|
|
{
|
|
public:
|
|
Menus();
|
|
|
|
///
|
|
bool searchMenu(FuncRequest const & func,
|
|
std::vector<docstring> & names) const;
|
|
///
|
|
void fillMenuBar(GuiView * view);
|
|
|
|
/// \return a top-level submenu given its name.
|
|
Menu * menu(QString const & name, GuiView & view);
|
|
|
|
///
|
|
void read(Lexer &);
|
|
|
|
///
|
|
void updateMenu(QString const & name);
|
|
|
|
private:
|
|
/// Use the Pimpl idiom to hide the internals.
|
|
struct Impl;
|
|
/// The pointer never changes although *d's contents may.
|
|
Impl * const d;
|
|
};
|
|
|
|
} // namespace frontend
|
|
} // namespace lyx
|
|
|
|
#endif // MENUS_H
|