+ /// category of an action, used in the Shortcuts dialog
+ enum FuncType {
+ Hidden, //< Not listed for configuration
+ Edit, //< Cursor and mouse movement, copy/paste etc
+ Math, //< Mathematics
+ Buffer, //< Buffer and window related
+ Layout, //< Font, Layout and textclass related
+ System, //< Lyx preference, server etc
+ };
+
+private:
+ /// information for an action
+ struct FuncInfo {
+ /// the action name
+ std::string name;
+ /// the FuncAttribs values set
+ unsigned int attrib;
+ /// the category of this func
+ FuncType type;
+ };
+ /// type for map between a function name and its action
+ typedef std::map<std::string, FuncCode> FuncMap;
+ /// type for map between an action and its info
+ typedef std::map<FuncCode, FuncInfo> InfoMap;
+
+public:
+ /// possible "permissions" for an action
+ enum FuncAttribs {
+ Noop = 0, //< Nothing special about this func
+ ReadOnly = 1, //< Can be used in RO mode (perhaps this should change); no automatic markDirty
+ NoBuffer = 2, //< Can be used when there is no document open
+ Argument = 4, //< Requires argument
+ NoUpdate = 8, //< Does not (usually) require update
+ SingleParUpdate = 16, //< Usually only requires this par updated
+ AtPoint = 32, //< dispatch first to inset at cursor if there is one
+ NoInternal = 64, //< Cannot be used for internal, non-document Buffers
+ };
+