2006-03-05 17:24:44 +00:00
|
|
|
|
// -*- C++ -*-
|
|
|
|
|
/**
|
2007-12-26 10:55:43 +00:00
|
|
|
|
* \file Menus.h
|
2006-03-05 17:24:44 +00:00
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
|
*
|
|
|
|
|
* \author Lars Gullik Bj<EFBFBD>nnes
|
|
|
|
|
* \author John Levon
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
|
*/
|
|
|
|
|
|
2007-12-26 10:55:43 +00:00
|
|
|
|
#ifndef MENUS_H
|
|
|
|
|
#define MENUS_H
|
|
|
|
|
|
|
|
|
|
#include "MenuBackend.h"
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
|
|
#include <QObject>
|
2007-09-28 23:26:59 +00:00
|
|
|
|
#include <QHash>
|
|
|
|
|
|
2007-12-26 13:29:45 +00:00
|
|
|
|
class QMenu;
|
|
|
|
|
|
|
|
|
|
|
2007-08-14 09:54:59 +00:00
|
|
|
|
namespace lyx {
|
2006-03-05 17:24:44 +00:00
|
|
|
|
namespace frontend {
|
|
|
|
|
|
2007-11-05 13:52:37 +00:00
|
|
|
|
class GuiView;
|
2007-09-28 23:26:59 +00:00
|
|
|
|
class GuiPopupMenu;
|
2007-11-23 09:44:02 +00:00
|
|
|
|
class GuiView;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
2007-12-26 10:55:43 +00:00
|
|
|
|
class Menus : public QObject, public MenuBackend
|
2007-09-05 20:33:29 +00:00
|
|
|
|
{
|
2006-03-05 17:24:44 +00:00
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
2007-12-26 10:55:43 +00:00
|
|
|
|
Menus() {}
|
2007-10-02 07:51:25 +00:00
|
|
|
|
|
2007-11-21 21:14:34 +00:00
|
|
|
|
///
|
2007-12-26 10:55:43 +00:00
|
|
|
|
void fillMenuBar(GuiView * view);
|
2007-11-21 21:14:34 +00:00
|
|
|
|
|
2007-12-26 12:40:58 +00:00
|
|
|
|
/// \return a top-level submenu given its name.
|
|
|
|
|
QMenu * menu(QString const & name);
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
|
|
/// update the state of the menuitems - not needed
|
2007-09-03 20:28:26 +00:00
|
|
|
|
void updateView();
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
/// Initialize specific MACOS X menubar
|
2007-12-26 10:55:43 +00:00
|
|
|
|
void macxMenuBarInit(GuiView * view);
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
2007-09-28 23:26:59 +00:00
|
|
|
|
typedef QHash<QString, GuiPopupMenu *> NameMap;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
2007-12-26 12:40:58 +00:00
|
|
|
|
/// name to menu for \c menu() method.
|
2006-03-05 17:24:44 +00:00
|
|
|
|
NameMap name_map_;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
2007-12-26 10:55:43 +00:00
|
|
|
|
#endif // MENUS_H
|