home/src/client.hh

48 lines
957 B
C++
Raw Normal View History

2013-09-12 23:47:23 +02:00
#ifndef client_hh_INCLUDED
#define client_hh_INCLUDED
#include "editor.hh"
#include "string.hh"
#include "utils.hh"
#include "display_buffer.hh"
#include "input_handler.hh"
namespace Kakoune
{
class UserInterface;
2013-11-14 19:09:15 +01:00
class Client : public SafeCountable
{
public:
Client(std::unique_ptr<UserInterface>&& ui, Editor& editor, 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; }
void check_buffer_fs_timestamp();
2013-11-14 19:09:15 +01:00
Context& context() { return m_input_handler.context(); }
const Context& context() const { return m_input_handler.context(); }
private:
2013-11-14 19:09:15 +01:00
InputHandler m_input_handler;
DisplayLine generate_mode_line() const;
std::unique_ptr<UserInterface> m_ui;
DisplayLine m_status_line;
};
}
2013-09-12 23:47:23 +02:00
#endif // client_hh_INCLUDED