]> git.lyx.org Git - lyx.git/blobdiff - src/KeyMap.h
* GuiToolbar.cpp:
[lyx.git] / src / KeyMap.h
index b9f8b28641b4a4c184a140d4ca935f2b8bfbf849..2b3ac315f15eab5b3537f5c96f46bd1b9fa136ce 100644 (file)
@@ -22,7 +22,6 @@
 #include <boost/shared_ptr.hpp>
 
 #include <vector>
-#include <deque>
 
 
 namespace lyx {
@@ -64,7 +63,7 @@ public:
         * @param bind_file bind file
         * @param unbind_map pointer to a KeyMap that holds \unbind bindings
         */
-       bool read(std::string const & bind_file, KeyMap * unbind_map = NULL);
+       bool read(std::string const & bind_file, KeyMap * unbind_map = 0);
 
        /** write to a bind file.
         * @param append append to the bind_file instead of overwrite it
@@ -91,13 +90,13 @@ public:
        lookup(KeySymbol const & key, KeyModifier mod, KeySequence * seq) const;
 
        ///
-       typedef std::deque<KeySequence> Bindings;
+       typedef std::vector<KeySequence> Bindings;
 
        /// Given an action, find all keybindings.
-       Bindings findbindings(FuncRequest const & func) const;
+       Bindings findBindings(FuncRequest const & func) const;
 
        /// Given an action, print the keybindings.
-       docstring const printbindings(FuncRequest const & func) const;
+       docstring printBindings(FuncRequest const & func) const;
 
        struct Binding {
                Binding(FuncRequest const & r, KeySequence const & s, int t)
@@ -122,7 +121,6 @@ public:
        std::pair<KeySymbol, KeyModifier>
        find1keybinding(FuncRequest const & func) const;
 
-
        /**
         * Returns a string of the given keysym, with modifiers.
         * @param key the key as a keysym
@@ -131,21 +129,18 @@ public:
        static std::string const printKeySym(KeySymbol const & key,
                                             KeyModifier mod);
 
+private:
+       ///
        typedef std::pair<KeyModifier, KeyModifier> ModifierPair;
 
-
-private:
        ///
        struct Key {
                /// Keysym
                KeySymbol code;
-
                /// Modifier masks
                ModifierPair mod;
-
                /// Keymap for prefix keys
                boost::shared_ptr<KeyMap> table;
-
                /// Action for !prefix keys
                FuncRequest func;
        };
@@ -155,7 +150,7 @@ private:
         * @param func the action
         * @param prefix a sequence to prepend the results
         */
-       Bindings findbindings(FuncRequest const & func,
+       Bindings findBindings(FuncRequest const & func,
                              KeySequence const & prefix) const;
        
        void listBindings(BindingList & list, KeySequence const & prefix,