1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 1995 Matthias Ettrich
7 * Copyright 1995-2000 The LyX Team.
9 * This file is Copyright 1996-1998
12 * ====================================================== */
14 // Added pseudo-action handling, asierra 180296
19 #pragma implementation "Toolbar.h"
23 #include "Toolbar_pimpl.h"
25 #include "LyXAction.h"
29 extern LyXAction lyxaction;
32 Toolbar::Toolbar(LyXView * o, int x, int y, ToolbarDefaults const &tbd)
34 pimpl_ = new Pimpl(o, x, y);
38 // extracts the toolbar actions from tbd
39 for (ToolbarDefaults::const_iterator cit = tbd.begin();
40 cit != tbd.end(); ++cit) {
42 lyxerr[Debug::GUI] << "tool action: "
54 void Toolbar::set(bool doingmain)
56 pimpl_->set(doingmain);
60 void Toolbar::activate()
66 void Toolbar::deactivate()
72 void Toolbar::update()
78 void Toolbar::setLayout(int layout)
80 pimpl_->setLayout(layout);
84 void Toolbar::updateLayoutList(bool force)
86 pimpl_->updateLayoutList(force);
90 void Toolbar::openLayoutList()
92 pimpl_->openLayoutList();
96 void Toolbar::clearLayoutList()
98 pimpl_->clearLayoutList();
102 void Toolbar::push(int nth)
108 void Toolbar::add(string const & func, bool doclean)
110 int const tf = lyxaction.LookupFunc(func);
113 lyxerr << "Toolbar::add: no LyX command called`"
114 << func << "'exists!" << endl;
116 pimpl_->add(tf, doclean);