mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-23 00:11:49 +00:00
42015a8ebd
- LFUN_INSET_APPLY handling goes to GuiView. - Dialog needs a GuiView instead of a LyXView. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21734 a592a061-630c-0410-9148-cb99ea01b6c8
80 lines
1.3 KiB
C++
80 lines
1.3 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file GuiMenubar.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 GUIMENUBAR_H
|
|
#define GUIMENUBAR_H
|
|
|
|
#include <QObject>
|
|
#include <QHash>
|
|
|
|
class QMenuBar;
|
|
|
|
namespace lyx {
|
|
|
|
class MenuBackend;
|
|
|
|
namespace frontend {
|
|
|
|
class GuiView;
|
|
class GuiPopupMenu;
|
|
class GuiView;
|
|
|
|
class GuiMenubar : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
GuiMenubar(GuiView *, MenuBackend &);
|
|
|
|
~GuiMenubar();
|
|
|
|
///
|
|
void init();
|
|
|
|
/// opens a top-level submenu given its name
|
|
void openByName(QString const & name);
|
|
|
|
/// return the owning view
|
|
GuiView * view() { return owner_; }
|
|
|
|
/// return the menu controller
|
|
MenuBackend const & backend() { return menubackend_; }
|
|
|
|
/// The QMenuBar used by LyX
|
|
QMenuBar * menuBar() const;
|
|
|
|
/// update the state of the menuitems - not needed
|
|
void updateView();
|
|
|
|
private:
|
|
/// Initialize specific MACOS X menubar
|
|
void macxMenuBarInit();
|
|
|
|
/// owning view
|
|
GuiView * owner_;
|
|
|
|
/// menu controller
|
|
MenuBackend & menubackend_;
|
|
|
|
typedef QHash<QString, GuiPopupMenu *> NameMap;
|
|
|
|
/// name to menu for openByName
|
|
NameMap name_map_;
|
|
|
|
/// MACOS X special menubar.
|
|
QMenuBar * mac_menubar_;
|
|
};
|
|
|
|
} // namespace frontend
|
|
} // namespace lyx
|
|
|
|
#endif // GUIMENUBAR_H
|