X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fkbsequence.h;h=3d894a1ec31c54d1fe602cb7db77656a7d757095;hb=37d42d45f3f4a5d3e916a080af50b37ae4a9d118;hp=2c46672c9fc64613b5302224ecd7c67b3c058d80;hpb=0be0fcfd5907d448cd51addf83ed7032719a0692;p=lyx.git diff --git a/src/kbsequence.h b/src/kbsequence.h index 2c46672c9f..3d894a1ec3 100644 --- a/src/kbsequence.h +++ b/src/kbsequence.h @@ -14,15 +14,20 @@ #define KBSEQUENCE_H #include "frontends/key_state.h" -#include "frontends/LyXKeySym.h" -#include "LString.h" + +#include + +#include #include class kb_keymap; +class LyXKeySym; +class FuncRequest; /// Holds a key sequence and the current and standard keymaps class kb_sequence { public: + typedef boost::shared_ptr LyXKeySymPtr; typedef std::vector KeySequence; friend class kb_keymap; @@ -39,8 +44,9 @@ public: * @param nmod which modifiers to mask out for equality test * @return the action matching this key sequence or LFUN_UNKNOWN_ACTION */ - int addkey(LyXKeySymPtr keysym, key_modifier::state mod, - key_modifier::state nmod = key_modifier::none); + FuncRequest const & + addkey(LyXKeySymPtr keysym, key_modifier::state mod, + key_modifier::state nmod = key_modifier::none); /** * Add a sequence of keys from a string to the sequence @@ -53,19 +59,19 @@ public: * Prefixes can also be ignored by using the Tilde "~" * f.ex.: "~S-Space". */ - string::size_type parse(string const & s); + std::string::size_type parse(std::string const & s); /** * Return the current sequence as a string. * @see parse() */ - string const print() const; + std::string const print() const; /** * Return the current sequence and available options as * a string. No options are added if no curmap kb map exists. */ - string const printOptions() const; + std::string const printOptions() const; /// Mark the sequence as deleted. void mark_deleted();