3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Lars Gullik Bjønnes
8 * Full author contact details are available in file CREDITS
14 #pragma implementation "Toolbar.h"
18 #include "ToolbarDefaults.h"
19 #include "Toolbar_pimpl.h"
21 #include "LyXAction.h"
25 Toolbar::Toolbar(LyXView * o, int x, int y, ToolbarDefaults const &tbd)
28 pimpl_ = new Pimpl(o, x, y);
30 // extracts the toolbar actions from tbd
31 for (ToolbarDefaults::const_iterator cit = tbd.begin();
32 cit != tbd.end(); ++cit) {
34 lyxerr[Debug::GUI] << "tool action: " << (*cit) << endl;
45 void Toolbar::update()
52 void Toolbar::setLayout(string const & layout)
54 pimpl_->setLayout(layout);
58 bool Toolbar::updateLayoutList(int textclass)
60 // update the layout display
61 if (last_textclass_ != textclass) {
62 pimpl_->updateLayoutList(true);
63 last_textclass_ = textclass;
66 pimpl_->updateLayoutList(false);
72 void Toolbar::openLayoutList()
74 pimpl_->openLayoutList();
78 void Toolbar::clearLayoutList()
80 pimpl_->clearLayoutList();