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 extern LyXAction lyxaction;
26 Toolbar::Toolbar(LyXView * o, Dialogs & d,
27 int x, int y, ToolbarDefaults const &tbd)
30 pimpl_ = new Pimpl(o, d, x, y);
32 // extracts the toolbar actions from tbd
33 for (ToolbarDefaults::const_iterator cit = tbd.begin();
34 cit != tbd.end(); ++cit) {
36 lyxerr[Debug::GUI] << "tool action: " << (*cit) << endl;
47 void Toolbar::update()
54 void Toolbar::setLayout(string const & layout)
56 pimpl_->setLayout(layout);
60 bool Toolbar::updateLayoutList(int textclass)
62 // update the layout display
63 if (last_textclass_ != textclass) {
64 pimpl_->updateLayoutList(true);
65 last_textclass_ = textclass;
68 pimpl_->updateLayoutList(false);
74 void Toolbar::openLayoutList()
76 pimpl_->openLayoutList();
80 void Toolbar::clearLayoutList()
82 pimpl_->clearLayoutList();