]> git.lyx.org Git - lyx.git/blobdiff - src/ToolbarBackend.h
LFUN_UNICODE_INSERT - unicode-insert
[lyx.git] / src / ToolbarBackend.h
index 58a88765be4143b651e6638f7494f2ef4c8a97e1..33694481cdfec0b2522353d286a04b77cc13172a 100644 (file)
@@ -17,7 +17,9 @@
 
 #include <vector>
 
-#include "support/std_string.h"
+
+namespace lyx {
+
 
 class LyXLex;
 
@@ -36,7 +38,7 @@ public:
        };
 
        /// action, tooltip
-       typedef std::pair<FuncRequest, string> Item;
+       typedef std::pair<FuncRequest, docstring> Item;
 
        /// the toolbar items
        typedef std::vector<Item> Items;
@@ -55,8 +57,10 @@ public:
 
        /// 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 +74,9 @@ 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(); }
 
        /// read a toolbar from the file
        void read(LyXLex &);
@@ -85,12 +85,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 +103,7 @@ private:
 extern ToolbarBackend toolbarbackend;
 
 
+
+} // namespace lyx
+
 #endif // TOOLBAR_BACKEND_H