]> git.lyx.org Git - lyx.git/blobdiff - src/LyXAction.h
whichFont down to 5.3%
[lyx.git] / src / LyXAction.h
index 19790c32e5f9bcb473bfeca5393067012d779d68..c5fbf527cea2d1ec638ce5f3ab0655037fb66bd0 100644 (file)
 
 #include "commandtags.h"
 #include "LString.h"
-#include "support/utility.hpp"
+#include <boost/utility.hpp>
 
 /** This class encapsulates LyX action and user command operations.
  */
-class LyXAction : public noncopyable {
+class LyXAction : boost::noncopyable {
 private:
        ///
        struct func_info {
@@ -63,9 +63,9 @@ public:
        ///
        LyXAction();
     
-       /** Returns an action tag from a string. Returns kb_action.
-         Include arguments in func_name ONLY if you
-         want to create new pseudo actions. */
+       /** Returns an pseudoaction from a string
+         If you include arguments in func_name, a new psedoaction will be 
+         created if needed. */
        int LookupFunc(string const & func_name) const; 
 
         /** Returns an action tag which name is the most similar to a string.
@@ -74,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;
@@ -85,18 +85,18 @@ public:
        /// Search for an existent pseudoaction, return -1 if it doesn't exist.
        int searchActionArg(kb_action action, string const & arg) const;
 
-       /// Check if a value is a pseudo-action. 
-       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();
@@ -123,14 +123,4 @@ private:
        mutable arg_map lyx_arg_map;
 };
      
-
-/* --------------------   Inlines  ------------------ */
-    
-     
-inline
-bool LyXAction::isPseudoAction(int a) const
-{ 
-       return a > int(LFUN_LASTACTION); 
-}
-     
 #endif