3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Lars Gullik Bjønnes
8 * Full author contact details are available in file CREDITS
15 #include "ToolbarBackend.h"
16 #include "Toolbar_pimpl.h"
18 #include "LyXAction.h"
22 Toolbar::Toolbar(LyXView * o, int x, int y)
25 pimpl_ = new Pimpl(o, x, y);
27 // extracts the toolbars from the backend
28 ToolbarBackend::Toolbars::const_iterator cit = toolbarbackend.begin();
29 ToolbarBackend::Toolbars::const_iterator end = toolbarbackend.end();
31 for (; cit != end; ++cit)
42 void Toolbar::update(bool in_math, bool in_table)
46 // extracts the toolbars from the backend
47 ToolbarBackend::Toolbars::const_iterator cit = toolbarbackend.begin();
48 ToolbarBackend::Toolbars::const_iterator end = toolbarbackend.end();
50 for (; cit != end; ++cit) {
51 if (cit->flags & ToolbarBackend::MATH)
52 pimpl_->displayToolbar(*cit, in_math);
53 else if (cit->flags & ToolbarBackend::TABLE)
54 pimpl_->displayToolbar(*cit, in_table);
60 void Toolbar::setLayout(string const & layout)
62 pimpl_->setLayout(layout);
66 bool Toolbar::updateLayoutList(int textclass)
68 // update the layout display
69 if (last_textclass_ != textclass) {
70 pimpl_->updateLayoutList(true);
71 last_textclass_ = textclass;
74 pimpl_->updateLayoutList(false);
80 void Toolbar::openLayoutList()
82 pimpl_->openLayoutList();
86 void Toolbar::clearLayoutList()
88 pimpl_->clearLayoutList();