2002-06-19 05:20:29 +00:00
|
|
|
|
// -*- C++ -*-
|
|
|
|
|
/**
|
2002-09-26 08:57:43 +00:00
|
|
|
|
* \file qt2/Menubar_pimpl.h
|
2002-09-24 13:57:09 +00:00
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-06-19 05:20:29 +00:00
|
|
|
|
*
|
2002-09-24 13:57:09 +00:00
|
|
|
|
* \author Lars Gullik Bj<EFBFBD>nnes
|
|
|
|
|
* \author John Levon
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS
|
2002-06-19 05:20:29 +00:00
|
|
|
|
*/
|
|
|
|
|
|
2002-09-24 13:57:09 +00:00
|
|
|
|
|
2002-06-19 05:20:29 +00:00
|
|
|
|
#ifndef MENUBAR_PIMPL_H
|
|
|
|
|
#define MENUBAR_PIMPL_H
|
|
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
|
#pragma interface
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#include "frontends/Menubar.h"
|
2002-09-24 13:57:09 +00:00
|
|
|
|
#include "LString.h"
|
|
|
|
|
#include <map>
|
2002-06-19 05:20:29 +00:00
|
|
|
|
|
|
|
|
|
class LyXView;
|
|
|
|
|
class QtView;
|
|
|
|
|
class MenuBackend;
|
2002-09-12 02:10:19 +00:00
|
|
|
|
class QLPopupMenu;
|
2002-06-19 05:20:29 +00:00
|
|
|
|
|
|
|
|
|
struct Menubar::Pimpl {
|
|
|
|
|
public:
|
|
|
|
|
Pimpl(LyXView *, MenuBackend const &);
|
2002-09-24 13:57:09 +00:00
|
|
|
|
|
2002-07-22 01:53:26 +00:00
|
|
|
|
/// opens a top-level submenu given its name
|
2002-06-19 05:20:29 +00:00
|
|
|
|
void openByName(string const &);
|
|
|
|
|
|
2002-08-25 18:26:45 +00:00
|
|
|
|
/// update the state of the menuitems - not needed
|
2002-10-20 01:48:28 +00:00
|
|
|
|
void update() {}
|
2002-06-19 05:20:29 +00:00
|
|
|
|
|
2002-08-25 18:26:45 +00:00
|
|
|
|
/// return the owning view
|
2002-09-24 13:57:09 +00:00
|
|
|
|
QtView * view() { return owner_; }
|
2002-07-22 01:53:26 +00:00
|
|
|
|
|
2002-08-25 18:26:45 +00:00
|
|
|
|
/// return the menu controller
|
|
|
|
|
MenuBackend const & backend() { return menubackend_; }
|
|
|
|
|
private:
|
2002-07-22 01:53:26 +00:00
|
|
|
|
/// owning view
|
2002-06-19 05:20:29 +00:00
|
|
|
|
QtView * owner_;
|
|
|
|
|
|
2002-07-22 01:53:26 +00:00
|
|
|
|
/// menu controller
|
2002-06-19 05:20:29 +00:00
|
|
|
|
MenuBackend const & menubackend_;
|
2002-09-12 02:10:19 +00:00
|
|
|
|
|
|
|
|
|
typedef std::map<string, QLPopupMenu *> NameMap;
|
|
|
|
|
|
2002-09-24 13:57:09 +00:00
|
|
|
|
/// name to menu for openByName
|
2002-09-12 02:10:19 +00:00
|
|
|
|
NameMap name_map_;
|
2002-06-19 05:20:29 +00:00
|
|
|
|
};
|
2002-09-24 13:57:09 +00:00
|
|
|
|
|
2002-07-22 01:53:26 +00:00
|
|
|
|
#endif // MENUBAR_PIMPL_H
|