3 * Copyright 1995-2002 the LyX Team
4 * Read the file COPYING
6 * \author Lars Gullik Bjønnes <larsbj@lyx.org>
12 #pragma implementation "Toolbar.h"
16 #include "ToolbarDefaults.h"
17 #include "Toolbar_pimpl.h"
19 #include "LyXAction.h"
23 Toolbar::Toolbar(LyXView * o, int x, int y, ToolbarDefaults const &tbd)
26 pimpl_ = new Pimpl(o, x, y);
28 // extracts the toolbar actions from tbd
29 for (ToolbarDefaults::const_iterator cit = tbd.begin();
30 cit != tbd.end(); ++cit) {
32 lyxerr[Debug::GUI] << "tool action: " << (*cit) << endl;
43 void Toolbar::update()
50 void Toolbar::setLayout(string const & layout)
52 pimpl_->setLayout(layout);
56 bool Toolbar::updateLayoutList(int textclass)
58 // update the layout display
59 if (last_textclass_ != textclass) {
60 pimpl_->updateLayoutList(true);
61 last_textclass_ = textclass;
64 pimpl_->updateLayoutList(false);
70 void Toolbar::openLayoutList()
72 pimpl_->openLayoutList();
76 void Toolbar::clearLayoutList()
78 pimpl_->clearLayoutList();