]> git.lyx.org Git - lyx.git/blobdiff - src/LyXAction.h
Improved support for docbook export in inset text.
[lyx.git] / src / LyXAction.h
index 4fadb5c04840c4e8c2367096ab60d45c0022ae7a..9c4d4c1d12a5453f9ae4cb42b02bbf905e6f02c9 100644 (file)
 
 #include "commandtags.h"
 #include "LString.h"
+#include <boost/utility.hpp>
 
 /** This class encapsulates LyX action and user command operations.
  */
-class LyXAction {
+class LyXAction : boost::noncopyable {
 private:
        ///
        struct func_info {
+               ///
                string name;
+               ///
                unsigned int attrib;
+               ///
                string helpText;
        };
 
        ///
        struct pseudo_func {
+               ///
                kb_action action;
+               ///
                string arg;
        };
 public:
@@ -48,7 +54,8 @@ public:
                 /// Can be used when there is no document open
                 NoBuffer = 2,
                //Interactive = 2, // Is interactive (requires a GUI)
-               Argument=4      // Requires argument
+               ///
+               Argument = 4      // Requires argument
                //MathOnly = 8,    // Only math mode
                //EtcEtc = ...     // Or other attributes...
        };
@@ -67,7 +74,7 @@ public:
 
         /** Returns an action name the most similar to a string.
            Don't include arguments, they would be ignored. */
-        string getApproxFuncName(string const & func) const;
+        string const getApproxFuncName(string const & func) const;
 
        /// Returns a pseudo-action given an action and its argument.
        int getPseudoAction(kb_action action, string const & arg) const;
@@ -82,14 +89,17 @@ public:
        bool isPseudoAction(int) const;
     
        /// Return the name associated with command
-       string getActionName(int action) const;
+       string const getActionName(int action) const;
 
        /// Return one line help text associated with (pseudo)action
-       string helpText(int action) const;
+       string const helpText(int action) const;
 
        /// True if the command has `flag' set
        bool funcHasFlag(kb_action action, func_attrib flag) const;
 
+       typedef func_map::const_iterator const_func_iterator;
+       const_func_iterator func_begin() const;
+       const_func_iterator func_end() const;
 private:
        ///
        void init();