X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fkbsequence.h;h=036cdcf43bce7efd56e79b0d170cdce8b1d7170f;hb=35204f8f33d7400a5fefeffea533fb4cb4097211;hp=35d600a415aa0a1f3124e02ce4fbd8e505e2806a;hpb=74c871a9fc4f73088e00f0a3a4e502abf18af0b0;p=lyx.git diff --git a/src/kbsequence.h b/src/kbsequence.h index 35d600a415..036cdcf43b 100644 --- a/src/kbsequence.h +++ b/src/kbsequence.h @@ -1,25 +1,29 @@ // -*- C++ -*- /** * \file kbsequence.h - * Copyright 2001 the LyX Team - * Read the file COPYING + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author Lars Gullik Bjønnes + * \author Jean-Marc Lasgouttes + * + * Full author contact details are available in file CREDITS. */ #ifndef KBSEQUENCE_H #define KBSEQUENCE_H -#ifdef __GNUG__ -#pragma interface -#endif - -#include - #include "frontends/key_state.h" #include "frontends/LyXKeySym.h" -#include "LString.h" + +#include #include + +namespace lyx { + class kb_keymap; +class FuncRequest; /// Holds a key sequence and the current and standard keymaps class kb_sequence { @@ -40,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 @@ -54,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(); @@ -109,4 +114,7 @@ private: bool deleted_; }; + +} // namespace lyx + #endif