diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-01-17 14:27:32 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-01-17 14:27:32 +0100 |
| commit | 3f01f4bdf5479a81d54ee6174d886489afe50d92 (patch) | |
| tree | 47b011dd374d48aa46cb1871c44725dabfcd65d5 /src/input_handler.hh | |
| parent | d1f15123e4f07c6b63a09265804c537295610e61 (diff) | |
Add some documentation to InputHandler
Diffstat (limited to 'src/input_handler.hh')
| -rw-r--r-- | src/input_handler.hh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/input_handler.hh b/src/input_handler.hh index efba4fcb..9baa56ce 100644 --- a/src/input_handler.hh +++ b/src/input_handler.hh @@ -38,17 +38,31 @@ public: InputHandler(); ~InputHandler(); + // switch to insert mode void insert(Context& context, InsertMode mode); + // repeat last insert mode key sequence void repeat_last_insert(Context& context); + // enter prompt mode, callback is called on each change, + // abort or validation with corresponding PromptEvent value + // returns to normal mode after validation if callback does + // not change the mode itself void prompt(const String& prompt, Completer completer, PromptCallback callback, Context& context); + // enter menu mode, callback is called on each selection change, + // abort or validation with corresponding MenuEvent value + // returns to normal mode after validation if callback does + // not change the mode itself void menu(const memoryview<String>& choices, MenuCallback callback, Context& context); + // execute callback on next keypress and returns to normal mode + // if callback does not change the mode itself void on_next_key(KeyCallback callback); + // read and process all inputs available in context + // user interface void handle_available_inputs(Context& context); private: |
