home/src/client.hh

37 lines
697 B
C++
Raw Normal View History

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