#include "support/lstrings.h"
#include <boost/bind.hpp>
+#include <algorithm>
#include "frontends/controllers/ControlMath.h"
public:
ToolbarNamesEqual(string const & name)
: name_(name) {}
- bool operator()(ToolbarInfo const & tb) const
+ bool operator()(ToolbarInfo const & tbinfo) const
{
- return tb.name == name_;
+ return tbinfo.name == name_;
}
private:
string name_;
TO_LAYOUTS,
TO_MINIBUFFER,
TO_TABLEINSERT,
+ TO_POPUPMENU,
+ TO_ICONPALETTE,
TO_LAST
};
struct keyword_item toolTags[TO_LAST - 1] = {
{ "end", TO_ENDTOOLBAR },
+ { "iconpalette", TO_ICONPALETTE },
{ "item", TO_COMMAND },
{ "layouts", TO_LAYOUTS },
{ "minibuffer", TO_MINIBUFFER },
+ { "popupmenu", TO_POPUPMENU },
{ "separator", TO_SEPARATOR },
{ "tableinsert", TO_TABLEINSERT }
};
FuncRequest(kb_action(ToolbarItem::SEPARATOR))));
break;
+ case TO_POPUPMENU:
+ if (lex.next(true)) {
+ string const name = lex.getString();
+ lex.next(true);
+ docstring const label = lex.getDocString();
+ add(ToolbarItem(ToolbarItem::POPUPMENU, name, label));
+ }
+ break;
+
+ case TO_ICONPALETTE:
+ if (lex.next(true)) {
+ string const name = lex.getString();
+ lex.next(true);
+ docstring const label = lex.getDocString();
+ add(ToolbarItem(ToolbarItem::ICONPALETTE, name, label));
+ }
+ break;
+
case TO_LAYOUTS:
add(ToolbarItem(ToolbarItem::LAYOUTS,
FuncRequest(kb_action(ToolbarItem::LAYOUTS))));
while (lex.isOK() && !quit) {
switch (lex.lex()) {
case TO_TOOLBAR: {
- ToolbarInfo tb;
- tb.read(lex);
- toolbars.push_back(tb);
+ ToolbarInfo tbinfo;
+ tbinfo.read(lex);
+ toolbars.push_back(tbinfo);
break;
}
case TO_ENDTOOLBARSET: