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()
70 void Toolbar::update()
76 void Toolbar::setLayout(int layout) {
77 pimpl_->setLayout(layout);
81 void Toolbar::updateLayoutList(bool force) {
82 pimpl_->updateLayoutList(force);
86 void Toolbar::openLayoutList() {
87 pimpl_->openLayoutList();
91 void Toolbar::clearLayoutList()
93 pimpl_->clearLayoutList();
97 void Toolbar::push(int nth)
102 void Toolbar::add(string const & func, bool doclean)
104 int tf = lyxaction.LookupFunc(func);
107 lyxerr << "Toolbar::add: no LyX command called`"
108 << func << "'exists!" << endl;
110 pimpl_->add(tf, doclean);