#include "FuncRequest.h"
#include <vector>
+#include <map>
+#include <memory>
namespace lyx {
LAYOUTS,
/// a special widget to insert tabulars
TABLEINSERT,
- ///
+ /// a button that expands a menu
POPUPMENU,
+ /// a button that expands a menu but remembers the last choice
+ STICKYPOPUPMENU,
///
ICONPALETTE
};
/// item type
Type type_;
/// action
- FuncRequest func_;
+ std::shared_ptr<FuncRequest> func_; // non-null
/// label/tooltip
docstring label_;
/// name
/// toolbar name
std::string name;
/// toolbar GUI name
- std::string gui_name;
+ docstring gui_name;
/// toolbar contents
Items items;
MATH = 128, //< show when in math
TABLE = 256, //< show when in table
REVIEW = 512, //< show when change tracking is enabled
- MATHMACROTEMPLATE = 1024 //< show in math macro template
+ MATHMACROTEMPLATE = 1024, //< show in math macro template
+ SAMEROW = 2048, //< place to the current row, no new line
+ IPA = 4096, //< show when in IPA inset
+ MINIBUFFER = 8192, //< show when command-execute has been invoked
+ MINIBUFFER_FOCUS = 16384, //< set focus to minibuffer
+ ALLOWAUTO = MATH | TABLE | REVIEW | MATHMACROTEMPLATE | IPA | MINIBUFFER
};
typedef std::vector<ToolbarInfo> Infos;
Toolbars() {}
+ ///
+ void reset();
+
/// iterator for all toolbars
Infos::const_iterator begin() const { return toolbar_info_.begin(); }
ToolbarInfo const * info(std::string const & name) const;
///
int defaultVisibility(std::string const & name) const;
+ ///
+ bool isMainToolbar(std::string const & name) const;
private:
/// all the defined toolbars