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: "
53 void Toolbar::set(bool doingmain)
55 pimpl_->set(doingmain);
59 void Toolbar::activate()
65 void Toolbar::deactivate()
71 void Toolbar::update()
77 void Toolbar::setLayout(int layout)
79 pimpl_->setLayout(layout);
83 void Toolbar::updateLayoutList(bool force)
85 pimpl_->updateLayoutList(force);
89 void Toolbar::openLayoutList()
91 pimpl_->openLayoutList();
95 void Toolbar::clearLayoutList()
97 pimpl_->clearLayoutList();
101 void Toolbar::push(int nth)
107 void Toolbar::add(string const & func, bool doclean)
109 int tf = lyxaction.LookupFunc(func);
112 lyxerr << "Toolbar::add: no LyX command called`"
113 << func << "'exists!" << endl;
115 pimpl_->add(tf, doclean);