// -*- 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 <config.h>
-
#include "frontends/key_state.h"
#include "frontends/LyXKeySym.h"
-#include "LString.h"
+
+#include <string>
#include <vector>
+
+namespace lyx {
+
class kb_keymap;
+class FuncRequest;
/// Holds a key sequence and the current and standard keymaps
class kb_sequence {
* @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
* 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();
bool deleted_;
};
+
+} // namespace lyx
+
#endif