X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fkbsequence.h;h=6dc269a0357687f9f3e343c8927992a5a4036848;hb=e7f4618bcce770369cf46335c2c7f0164b4b8857;hp=8b090cf8ab2462aa3fc7021b4ace2f5362ab0197;hpb=6e4ee366a9e19ebc3cfbaa09311f4c2c3ed161c3;p=lyx.git diff --git a/src/kbsequence.h b/src/kbsequence.h index 8b090cf8ab..6dc269a035 100644 --- a/src/kbsequence.h +++ b/src/kbsequence.h @@ -14,19 +14,20 @@ #define KBSEQUENCE_H #include "frontends/key_state.h" +#include "frontends/LyXKeySym.h" -#include - -#include "support/std_string.h" +#include #include + +namespace lyx { + 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; @@ -43,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 @@ -57,19 +59,23 @@ 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. + * @param forgui true if the string should use translations and + * special characters. * @see parse() */ - string const print() const; + docstring const print(bool forgui) const; /** * Return the current sequence and available options as * a string. No options are added if no curmap kb map exists. + * @param forgui true if the string should use translations and + * special characters. */ - string const printOptions() const; + docstring const printOptions(bool forgui) const; /// Mark the sequence as deleted. void mark_deleted(); @@ -112,4 +118,7 @@ private: bool deleted_; }; + +} // namespace lyx + #endif