diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2012-09-26 14:13:04 +0200 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2012-09-26 14:13:04 +0200 |
| commit | f76323f56e8d98ad5ae9f1b26f83689e008c8454 (patch) | |
| tree | b661096b8bc430417472eda511240b6aaefdd3fb /src/client.hh | |
| parent | c36ee924eb478e1d8f88eccbc1f0db800d446b92 (diff) | |
Move UserInterface out of Client into Context
Diffstat (limited to 'src/client.hh')
| -rw-r--r-- | src/client.hh | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/client.hh b/src/client.hh index 2afd4590..27000ab4 100644 --- a/src/client.hh +++ b/src/client.hh @@ -6,13 +6,11 @@ #include "utils.hh" #include "string.hh" #include "window.hh" -#include "user_interface.hh" namespace Kakoune { class Editor; -class Window; class Context; using MenuCallback = std::function<void (int, Context&)>; @@ -24,20 +22,17 @@ class ClientMode; class Client : public SafeCountable { public: - Client(UserInterface* ui); + Client(); ~Client(); void insert(Editor& editor, IncrementalInserter::Mode mode); - void repeat_last_insert(Editor& editor, Context& context); + void repeat_last_insert(Context& context); void prompt(const String& prompt, Completer completer, - PromptCallback callback); + PromptCallback callback, Context& context); void menu(const memoryview<String>& choices, - MenuCallback callback); - - void print_status(const String& status, CharCount cursor_pos = -1); - void draw_window(Window& window); + MenuCallback callback, Context& context); void on_next_key(KeyCallback callback); @@ -46,7 +41,6 @@ public: private: friend class ClientMode; std::unique_ptr<ClientMode> m_mode; - std::unique_ptr<UserInterface> m_ui; std::pair<IncrementalInserter::Mode, std::vector<Key>> m_last_insert; }; |
