X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLyXAction.h;h=3ec318a596871b4cf4817c77cb0f31598a143d68;hb=7c095d4330fc264a6c443ed83ff1bbe1d22c69db;hp=a5e65c895d3bc1832cdb085b4b2e8d58157d5b59;hpb=1d7d3cc4afa2205c801ccc2aa71c7ac59359dc5f;p=lyx.git diff --git a/src/LyXAction.h b/src/LyXAction.h index a5e65c895d..3ec318a596 100644 --- a/src/LyXAction.h +++ b/src/LyXAction.h @@ -7,47 +7,55 @@ #endif #include + #include "commandtags.h" #include "LString.h" +#include /** This class encapsulates LyX action and user command operations. */ -class LyXAction { +class LyXAction : public noncopyable { private: /// struct func_info { + /// string name; + /// unsigned int attrib; + /// string helpText; }; /// struct pseudo_func { + /// kb_action action; + /// string arg; }; public: /// - typedef map > func_map; + typedef std::map func_map; /// - typedef map > info_map; + typedef std::map info_map; /// - typedef map > pseudo_map; + typedef std::map pseudo_map; /// - typedef map > arg_item; + typedef std::map arg_item; /// - typedef map > arg_map; + typedef std::map arg_map; /// enum func_attrib { /// nothing special about this func Noop = 0, - /// can not be used in RO mode (perhaps this should change) + /// can be used in RO mode (perhaps this should change) ReadOnly = 1, // , /// 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... }; @@ -66,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; @@ -81,10 +89,10 @@ 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; @@ -125,5 +133,4 @@ bool LyXAction::isPseudoAction(int a) const return a > int(LFUN_LASTACTION); } - #endif