]> git.lyx.org Git - lyx.git/blobdiff - src/kbsequence.C
* output_plaintext.C: cosmetics in comment: line length cannot be < 0
[lyx.git] / src / kbsequence.C
index 0d701cdb28ea982ad740bf828fecd98f9f4d7287..9277793fcc0e7164a73078e26b9a7000f87f88ce 100644 (file)
@@ -21,6 +21,9 @@
 #include "frontends/LyXKeySym.h"
 #include "frontends/LyXKeySymFactory.h"
 
+
+namespace lyx {
+
 using std::make_pair;
 using std::string;
 
@@ -127,17 +130,14 @@ string::size_type kb_sequence::parse(string const & s)
 }
 
 
-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 += sequence[i]->print(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) {
@@ -148,17 +148,17 @@ string const kb_sequence::print() const
 }
 
 
-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;
 }
 
@@ -180,3 +180,6 @@ void kb_sequence::clear()
        sequence.clear();
        reset();
 }
+
+
+} // namespace lyx