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.
16 #include "LyXAction.h"
17 #include "ToolbarBackend.h"
35 // extracts the toolbars from the backend
36 ToolbarBackend::Toolbars::const_iterator cit = toolbarbackend.begin();
37 ToolbarBackend::Toolbars::const_iterator end = toolbarbackend.end();
39 for (; cit != end; ++cit)
44 void Toolbar::display(string const & name, bool show)
46 ToolbarBackend::Toolbars::const_iterator cit = toolbarbackend.begin();
47 ToolbarBackend::Toolbars::const_iterator end = toolbarbackend.end();
49 for (; cit != end; ++cit) {
50 if (cit->name == name) {
51 displayToolbar(*cit, show);
56 lyxerr[Debug::GUI] << "Toolbar::display: no toolbar named "
61 void Toolbar::update(bool in_math, bool in_table)
65 // extracts the toolbars from the backend
66 ToolbarBackend::Toolbars::const_iterator cit = toolbarbackend.begin();
67 ToolbarBackend::Toolbars::const_iterator end = toolbarbackend.end();
69 for (; cit != end; ++cit) {
70 if (cit->flags & ToolbarBackend::MATH)
71 displayToolbar(*cit, in_math);
72 else if (cit->flags & ToolbarBackend::TABLE)
73 displayToolbar(*cit, in_table);
78 void Toolbar::clearLayoutList()
84 bool Toolbar::updateLayoutList(int textclass)
86 // update the layout display
87 if (last_textclass_ != textclass) {
89 last_textclass_ = textclass;