2012-06-28 14:11:43 +02:00
|
|
|
#ifndef client_hh_INCLUDED
|
|
|
|
#define client_hh_INCLUDED
|
2012-06-06 01:15:19 +02:00
|
|
|
|
|
|
|
#include "keys.hh"
|
|
|
|
#include "completion.hh"
|
|
|
|
|
|
|
|
namespace Kakoune
|
|
|
|
{
|
|
|
|
|
|
|
|
class Editor;
|
|
|
|
class Window;
|
|
|
|
class String;
|
2012-08-05 20:13:41 +02:00
|
|
|
class Context;
|
2012-06-06 01:15:19 +02:00
|
|
|
|
2012-06-28 14:11:43 +02:00
|
|
|
class Client
|
2012-06-06 01:15:19 +02:00
|
|
|
{
|
|
|
|
public:
|
2012-06-28 14:11:43 +02:00
|
|
|
virtual ~Client() {}
|
2012-06-06 01:15:19 +02:00
|
|
|
|
|
|
|
virtual void draw_window(Window& window) = 0;
|
|
|
|
virtual void print_status(const String& status) = 0;
|
2012-08-05 20:13:41 +02:00
|
|
|
virtual String prompt(const String& prompt, const Context& context, Completer completer) = 0;
|
2012-06-06 01:15:19 +02:00
|
|
|
virtual Key get_key() = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct prompt_aborted {};
|
|
|
|
|
2012-06-28 14:11:43 +02:00
|
|
|
extern Client* current_client;
|
2012-06-06 01:15:19 +02:00
|
|
|
|
|
|
|
void draw_editor_ifn(Editor& editor);
|
2012-08-05 20:13:41 +02:00
|
|
|
String prompt(const String& text, const Context& context, Completer completer = complete_nothing);
|
2012-06-06 01:15:19 +02:00
|
|
|
Key get_key();
|
|
|
|
void print_status(const String& status);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2012-06-28 14:11:43 +02:00
|
|
|
#endif // client_hh_INCLUDED
|