c0973075fa
ClientManager now stores only the free windows, clients take ownership of its own.
54 lines
1.1 KiB
C++
54 lines
1.1 KiB
C++
#ifndef client_hh_INCLUDED
|
|
#define client_hh_INCLUDED
|
|
|
|
#include "string.hh"
|
|
#include "utils.hh"
|
|
#include "display_buffer.hh"
|
|
#include "input_handler.hh"
|
|
|
|
namespace Kakoune
|
|
{
|
|
|
|
class UserInterface;
|
|
class Window;
|
|
|
|
class Client : public SafeCountable
|
|
{
|
|
public:
|
|
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
|
|
void handle_available_input();
|
|
|
|
void print_status(DisplayLine status_line);
|
|
|
|
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(); }
|
|
|
|
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;
|
|
};
|
|
|
|
}
|
|
|
|
#endif // client_hh_INCLUDED
|