X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FToolbarBackend.h;h=7d9fc9f6b914729081bd8c95f033a996287efb0a;hb=52eb91c94fb70d58dceef430659c8781de2eccda;hp=58a88765be4143b651e6638f7494f2ef4c8a97e1;hpb=2994fe551121614948dcb68d6f4953ee3bbb694d;p=lyx.git diff --git a/src/ToolbarBackend.h b/src/ToolbarBackend.h index 58a88765be..7d9fc9f6b9 100644 --- a/src/ToolbarBackend.h +++ b/src/ToolbarBackend.h @@ -17,7 +17,9 @@ #include -#include "support/std_string.h" + +namespace lyx { + class LyXLex; @@ -36,7 +38,7 @@ public: }; /// action, tooltip - typedef std::pair Item; + typedef std::pair Item; /// the toolbar items typedef std::vector Items; @@ -50,13 +52,17 @@ public: TOP = 16, //< show at top BOTTOM = 32, //< show at bottom LEFT = 64, //< show at left - RIGHT = 128 //< show at right + RIGHT = 128, //< show at right + REVIEW = 256, //< shown when change tracking is enabled + AUTO = 512 //< only if AUTO is set, will MATH, TABLE and REIVEW is used }; /// a toolbar struct Toolbar { - /// toolbar UI name - string name; + /// toolbar name + std::string name; + /// toolbar GUI name + std::string gui_name; /// toolbar contents Items items; /// flags @@ -70,13 +76,13 @@ public: ToolbarBackend(); /// iterator for all toolbars - Toolbars::const_iterator begin() const { - return usedtoolbars.begin(); - } + Toolbars::const_iterator begin() const { return usedtoolbars.begin(); } + + Toolbars::const_iterator end() const { return usedtoolbars.end(); } - Toolbars::const_iterator end() const { - return usedtoolbars.end(); - } + Toolbars::iterator begin() { return usedtoolbars.begin(); } + + Toolbars::iterator end() { return usedtoolbars.end(); } /// read a toolbar from the file void read(LyXLex &); @@ -85,12 +91,12 @@ public: void readToolbars(LyXLex &); /// return a full path of an XPM for the given action - static string const getIcon(FuncRequest const &); + static std::string const getIcon(FuncRequest const &); private: /// add the given lfun with tooltip if relevant void add(Toolbar & tb, FuncRequest const &, - string const & tooltip = string()); + docstring const & tooltip = docstring()); /// all the toolbars Toolbars toolbars; @@ -103,4 +109,7 @@ private: extern ToolbarBackend toolbarbackend; + +} // namespace lyx + #endif // TOOLBAR_BACKEND_H