#include "frontends/LyXKeySym.h"
#include "frontends/LyXKeySymFactory.h"
+
+namespace lyx {
+
using std::make_pair;
+using std::string;
-int kb_sequence::addkey(LyXKeySymPtr key,
- key_modifier::state mod, key_modifier::state nmod)
+FuncRequest const &
+kb_sequence::addkey(LyXKeySymPtr key,
+ key_modifier::state mod, key_modifier::state nmod)
{
// adding a key to a deleted sequence
// starts a new sequence
return curmap->lookup(key, mod, this);
}
- return LFUN_UNKNOWN_ACTION;
+ static FuncRequest unknown(LFUN_UNKNOWN_ACTION);
+ return unknown;
}
}
-string const kb_sequence::print() const
+docstring const kb_sequence::print(bool forgui) const
{
- string buf;
-
- //if (deleted_)
- // return buf;
+ docstring buf;
- KeySequence::size_type i, length = sequence.size();
+ const KeySequence::size_type length = sequence.size();
- for (i = 0; i < length; ++i) {
- buf += kb_keymap::printKeysym(sequence[i], modifiers[i].first);
+ for (KeySequence::size_type i = 0; i < length; ++i) {
+ buf += sequence[i]->print(modifiers[i].first, forgui);
// append a blank
if (i + 1 < length) {
}
-string const kb_sequence::printOptions() const
+docstring const kb_sequence::printOptions(bool forgui) const
{
- string buf;
+ docstring buf;
- buf += print();
+ buf += print(forgui);
if (!curmap)
return buf;
buf += _(" options: ");
- buf += curmap->print();
+ buf += curmap->print(forgui);
return buf;
}
sequence.clear();
reset();
}
+
+
+} // namespace lyx