2013-09-12 23:47:23 +02:00
|
|
|
#ifndef client_hh_INCLUDED
|
|
|
|
#define client_hh_INCLUDED
|
2012-06-06 01:15:19 +02:00
|
|
|
|
2013-04-09 19:39:03 +02:00
|
|
|
#include "editor.hh"
|
|
|
|
#include "string.hh"
|
|
|
|
#include "utils.hh"
|
2013-09-16 20:15:13 +02:00
|
|
|
#include "display_buffer.hh"
|
2013-11-14 22:12:59 +01:00
|
|
|
#include "input_handler.hh"
|
2012-06-06 01:15:19 +02:00
|
|
|
|
|
|
|
namespace Kakoune
|
|
|
|
{
|
|
|
|
|
2013-11-14 22:12:59 +01:00
|
|
|
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();
|
|
|
|
|
2013-09-16 20:15:13 +02:00
|
|
|
void print_status(DisplayLine status_line);
|
|
|
|
|
|
|
|
void redraw_ifn();
|
|
|
|
|
2013-09-12 23:39:34 +02:00
|
|
|
UserInterface& ui() const { return *m_ui; }
|
2013-10-15 19:50:43 +02:00
|
|
|
|
2013-10-15 19:51:31 +02:00
|
|
|
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(); }
|
|
|
|
|
2012-09-03 14:22:02 +02:00
|
|
|
private:
|
2013-11-14 19:09:15 +01:00
|
|
|
InputHandler m_input_handler;
|
2013-10-10 22:34:19 +02:00
|
|
|
|
|
|
|
DisplayLine generate_mode_line() const;
|
|
|
|
|
2013-09-12 23:39:34 +02:00
|
|
|
std::unique_ptr<UserInterface> m_ui;
|
2013-02-18 14:07:30 +01:00
|
|
|
|
2013-09-16 20:15:13 +02:00
|
|
|
DisplayLine m_status_line;
|
2012-06-06 01:15:19 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2013-09-12 23:47:23 +02:00
|
|
|
#endif // client_hh_INCLUDED
|