Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <functional>
- #include <algorithm>
- #include <numeric>
- #include "Keys.h"
- using namespace std;
- typedef function<void(KeyboardShortcut)> KeyboardCallback;
- struct KeyboardShortcut
- {
- private:
- vector<int> _included_keys;
- vector<int> _excluded_keys;
- public:
- KeyboardShortcut(
- const vector<int> included_keys,
- const vector<int> excluded_keys = {}
- )
- {
- _included_keys = included_keys;
- _excluded_keys = excluded_keys;
- }
- vector<int> included_keys() const { return _included_keys; };
- vector<int> excluded_keys() const { return _excluded_keys; };
- };
- class CustomSlot
- {
- private:
- unsigned int _index;
- KeyboardShortcut _copy_shortcut;
- KeyboardShortcut _paste_shortcut;
- public:
- CustomSlot(
- const unsigned int index,
- const KeyboardShortcut copy_shortcut,
- const KeyboardShortcut paste_shortcut
- )
- {
- _index = index;
- _copy_shortcut = copy_shortcut;
- _paste_shortcut = paste_shortcut;
- }
- unsigned int index() const { return _index; }
- KeyboardShortcut copy_shortcut() const { return _copy_shortcut; }
- KeyboardShortcut paste_shortcut() const { return _paste_shortcut; }
- };
Add Comment
Please, Sign In to add comment