1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 1995 Matthias Ettrich
7 * Copyright 1995-2001 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()
79 void Toolbar::setLayout(string const & layout)
81 pimpl_->setLayout(layout);
85 void Toolbar::updateLayoutList(bool force)
87 pimpl_->updateLayoutList(force);
91 void Toolbar::openLayoutList()
93 pimpl_->openLayoutList();
97 void Toolbar::clearLayoutList()
99 pimpl_->clearLayoutList();
103 void Toolbar::push(int nth)
109 void Toolbar::add(string const & func, bool doclean)
111 int const tf = lyxaction.LookupFunc(func);
114 lyxerr << "Toolbar::add: no LyX command called`"
115 << func << "'exists!" << endl;
117 pimpl_->add(tf, doclean);