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 "Toolbar_pimpl.h"
18 #include "LyXAction.h"
22 extern LyXAction lyxaction;
25 Toolbar::Toolbar(LyXView * o, int x, int y, ToolbarDefaults const &tbd)
27 pimpl_ = new Pimpl(o, x, y);
31 // extracts the toolbar actions from tbd
32 for (ToolbarDefaults::const_iterator cit = tbd.begin();
33 cit != tbd.end(); ++cit) {
35 lyxerr[Debug::GUI] << "tool action: "
47 void Toolbar::set(bool doingmain)
49 pimpl_->set(doingmain);
53 void Toolbar::activate()
59 void Toolbar::deactivate()
65 void Toolbar::update()
72 void Toolbar::setLayout(string const & layout)
74 pimpl_->setLayout(layout);
78 void Toolbar::updateLayoutList(bool force)
80 pimpl_->updateLayoutList(force);
84 void Toolbar::openLayoutList()
86 pimpl_->openLayoutList();
90 void Toolbar::clearLayoutList()
92 pimpl_->clearLayoutList();
96 void Toolbar::push(int nth)
102 void Toolbar::add(string const & func, bool doclean)
104 int const tf = lyxaction.LookupFunc(func);
107 lyxerr << "Toolbar::add: no LyX command called`"
108 << func << "'exists!" << endl;
110 pimpl_->add(tf, doclean);