2002-06-19 05:20:29 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file Menubar_pimpl.C
|
|
|
|
|
* Copyright 1999-2001 The LyX Team.
|
|
|
|
|
* See the file COPYING.
|
|
|
|
|
*
|
|
|
|
|
* \author Lars Gullik Bj<EFBFBD>nnes, larsbj@lyx.org
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
|
|
#include <algorithm>
|
|
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
|
#pragma implementation
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#include "Menubar_pimpl.h"
|
|
|
|
|
#include "MenuBackend.h"
|
|
|
|
|
#include "LyXAction.h"
|
|
|
|
|
#include "kbmap.h"
|
|
|
|
|
#include "buffer.h"
|
|
|
|
|
#include "lyxfunc.h"
|
|
|
|
|
#include "FloatList.h"
|
|
|
|
|
#include "support/lstrings.h"
|
|
|
|
|
#include "support/LAssert.h"
|
|
|
|
|
#include "gettext.h"
|
|
|
|
|
#include "debug.h"
|
|
|
|
|
|
|
|
|
|
#include "QtView.h"
|
2002-08-25 18:26:45 +00:00
|
|
|
|
#include "QLPopupMenu.h"
|
2002-06-19 05:20:29 +00:00
|
|
|
|
|
|
|
|
|
#include <qmenubar.h>
|
2002-08-25 18:26:45 +00:00
|
|
|
|
|
2002-06-19 05:20:29 +00:00
|
|
|
|
|
|
|
|
|
using std::endl;
|
|
|
|
|
using std::vector;
|
|
|
|
|
using std::max;
|
|
|
|
|
using std::min;
|
|
|
|
|
using std::for_each;
|
|
|
|
|
|
2002-06-21 16:40:54 +00:00
|
|
|
|
Menubar::Pimpl::Pimpl(LyXView * view, MenuBackend const & mbe)
|
|
|
|
|
: owner_(static_cast<QtView*>(view)), menubackend_(mbe)
|
2002-06-19 05:20:29 +00:00
|
|
|
|
{
|
2002-07-21 01:38:24 +00:00
|
|
|
|
Menu::const_iterator m = mbe.getMenubar().begin();
|
|
|
|
|
Menu::const_iterator end = mbe.getMenubar().end();
|
|
|
|
|
for (; m != end; ++m) {
|
2002-09-10 19:23:38 +00:00
|
|
|
|
createMenu(owner_->menuBar(), &(*m), this, true);
|
2002-06-19 05:20:29 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2002-08-25 18:26:45 +00:00
|
|
|
|
void Menubar::Pimpl::openByName(string const &)
|
2002-06-19 05:20:29 +00:00
|
|
|
|
{
|
2002-07-22 01:53:26 +00:00
|
|
|
|
// FIXME
|
2002-06-19 05:20:29 +00:00
|
|
|
|
}
|