summaryrefslogtreecommitdiff
path: root/src/client.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-12-20 20:10:08 +0000
committerMaxime Coste <frrrwww@gmail.com>2013-12-20 20:14:57 +0000
commitc0973075fafc7003be1028922bf99a2c48bcdcd6 (patch)
tree303d3d6b03942857775f7c0d2e15d621a6f6df37 /src/client.hh
parentcb324a4b8842d6d45a7dba316cd4f909addb99c2 (diff)
Get rid of Editor for good
ClientManager now stores only the free windows, clients take ownership of its own.
Diffstat (limited to 'src/client.hh')
-rw-r--r--src/client.hh14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/client.hh b/src/client.hh
index 89fb46bc..ac191542 100644
--- a/src/client.hh
+++ b/src/client.hh
@@ -1,7 +1,6 @@
#ifndef client_hh_INCLUDED
#define client_hh_INCLUDED
-#include "editor.hh"
#include "string.hh"
#include "utils.hh"
#include "display_buffer.hh"
@@ -11,11 +10,14 @@ namespace Kakoune
{
class UserInterface;
+class Window;
class Client : public SafeCountable
{
public:
- Client(std::unique_ptr<UserInterface>&& ui, Editor& editor, String name);
+ Client(std::unique_ptr<UserInterface>&& ui,
+ std::unique_ptr<Window>&& window,
+ SelectionList selections, String name);
~Client();
// handle all the keys currently available in the user interface
@@ -26,18 +28,22 @@ public:
void redraw_ifn();
UserInterface& ui() const { return *m_ui; }
+ Window& window() const { return *m_window; }
void check_buffer_fs_timestamp();
Context& context() { return m_input_handler.context(); }
const Context& context() const { return m_input_handler.context(); }
-private:
- InputHandler m_input_handler;
+ void change_buffer(Buffer& buffer);
+private:
DisplayLine generate_mode_line() const;
std::unique_ptr<UserInterface> m_ui;
+ std::unique_ptr<Window> m_window;
+
+ InputHandler m_input_handler;
DisplayLine m_status_line;
};