#include "FuncStatus.h"
#include "gettext.h"
#include "LyXFunc.h"
-#include "LyXTextClass.h"
+#include "TextClass.h"
#include "LyXView.h"
#include "LyX.h"
for (; cit != end; ++cit) {
if (cit->name == name) {
unsigned int flags = cit->flags;
+ TurnOffFlag(ON);
+ TurnOffFlag(OFF);
TurnOffFlag(AUTO);
- if (show) {
+ if (show)
TurnOnFlag(ON);
+ else
TurnOnFlag(OFF);
- } else {
- TurnOnFlag(OFF);
- TurnOnFlag(ON);
- }
cit->flags = static_cast<lyx::ToolbarInfo::Flags>(flags);
displayToolbar(*cit, show);
return;
}
+bool Toolbars::visible(string const & name) const
+{
+ std::map<string, ToolbarPtr>::const_iterator it =
+ toolbars_.find(name);
+ if (it == toolbars_.end())
+ return false;
+ return it->second.get()->isVisible();
+}
+
+
void Toolbars::saveToolbarInfo()
{
ToolbarSection & tb = LyX::ref().session().toolbars();
void layoutSelected(LyXView & lv, string const & name)
{
- LyXTextClass const & tc = lv.buffer()->params().getLyXTextClass();
+ TextClass const & tc = lv.buffer()->params().getTextClass();
- LyXTextClass::const_iterator it = tc.begin();
- LyXTextClass::const_iterator const end = tc.end();
+ TextClass::const_iterator it = tc.begin();
+ TextClass::const_iterator const end = tc.end();
for (; it != end; ++it) {
string const & itname = (*it)->name();
// Yes, the lyx::to_utf8(_()) is correct