]> git.lyx.org Git - lyx.git/blobdiff - src/ToolbarBackend.h
more cursor dispatch
[lyx.git] / src / ToolbarBackend.h
index 9a84eee9bc0b6a97cf48b1fc485025453bfbd37a..873da4df313f35effb82cb7d5bba3721b31d10a7 100644 (file)
@@ -4,21 +4,23 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author unknown
+ * \author Jean-Marc Lasgouttes
+ * \author John Levon
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #ifndef TOOLBAR_BACKEND_H
 #define TOOLBAR_BACKEND_H
 
+#include "funcrequest.h"
+
 #include <vector>
-#include <algorithm>
 
-#include "LString.h"
 
 class LyXLex;
 
+
 ///
 class ToolbarBackend {
 public:
@@ -33,10 +35,10 @@ public:
        };
 
        /// action, tooltip
-       typedef std::pair<int, string> Item;
+       typedef std::pair<FuncRequest, std::string> Item;
 
        /// the toolbar items
-       typedef std::vector<std::pair<int, string> > Items;
+       typedef std::vector<Item> Items;
 
        /// toolbar flags
        enum Flags {
@@ -53,7 +55,7 @@ public:
        /// a toolbar
        struct Toolbar {
                /// toolbar UI name
-               string name;
+               std::string name;
                /// toolbar contents
                Items items;
                /// flags
@@ -82,14 +84,12 @@ public:
        void readToolbars(LyXLex &);
 
        /// return a full path of an XPM for the given action
-       static string const getIcon(int action);
+       static std::string const getIcon(FuncRequest const &);
 
 private:
        /// add the given lfun with tooltip if relevant
-       void add(Toolbar & tb, int, string const & tooltip = string());
-
-       /// add the given lfun with tooltip if relevant
-       void add(Toolbar & tb, string const &, string const & tooltip);
+       void add(Toolbar & tb, FuncRequest const &,
+                std::string const & tooltip = std::string());
 
        /// all the toolbars
        Toolbars toolbars;