mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 21:49:51 +00:00
4035592aee
* QWorkArea.[Ch] cleanup: - Added private members workWidth_ and workHeight_ in order to make sure QWorkArea is always able to draw (link to workArea::WorkAreaResize). - deleted superfluous debugging stuff - deleted superfluous commented out code. - placed all specific stuff (Qt-immodule, X11 and Mac OSX) in a separate place at the end of QWorkArea.C. - initial support for Wheel mouse (still does not work). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13348 a592a061-630c-0410-9148-cb99ea01b6c8
84 lines
1.4 KiB
C++
84 lines
1.4 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file qt2/QLMenubar.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 QLMENUBAR_H
|
|
#define QLMENUBAR_H
|
|
|
|
#include "frontends/Menubar.h"
|
|
|
|
#include <map>
|
|
|
|
#include <QObject>
|
|
|
|
class QMenuBar;
|
|
class QMenu;
|
|
class LyXView;
|
|
class MenuBackend;
|
|
class Menu;
|
|
class MenuItem;
|
|
|
|
namespace lyx {
|
|
|
|
|
|
namespace frontend {
|
|
|
|
class QtView;
|
|
|
|
class QLMenubar : public QObject, public Menubar {
|
|
Q_OBJECT
|
|
public:
|
|
QLMenubar(LyXView *, MenuBackend &);
|
|
|
|
/// opens a top-level submenu given its name
|
|
void openByName(std::string const &);
|
|
|
|
/// return the owning view
|
|
QtView * view();
|
|
|
|
/// return the menu controller
|
|
MenuBackend const & backend();
|
|
|
|
/// The QMenuBar used by LyX
|
|
QMenuBar * menuBar() const;
|
|
|
|
/// update the state of the menuitems - not needed
|
|
void update();
|
|
|
|
public slots:
|
|
/// populate a toplevel menu and all its children on demand
|
|
// void updateMenu();
|
|
|
|
private:
|
|
/// Initialize specific MACOS X menubar
|
|
void macxMenuBarInit();
|
|
|
|
/// owning view
|
|
QtView * owner_;
|
|
|
|
/// menu controller
|
|
MenuBackend & menubackend_;
|
|
|
|
typedef std::map<std::string, QMenu *> NameMap;
|
|
|
|
/// name to menu for openByName
|
|
NameMap name_map_;
|
|
|
|
#ifdef Q_WS_MACX
|
|
boost::scoped_ptr<QMenuBar> menubar_;
|
|
#endif
|
|
};
|
|
|
|
} // namespace frontend
|
|
} // namespace lyx
|
|
|
|
#endif // QLMENUBAR_H
|