2012-02-16 18:25:16 +04:00
|
|
|
#ifndef ncurses_hh_INCLUDED
|
|
|
|
#define ncurses_hh_INCLUDED
|
|
|
|
|
2012-08-30 23:53:22 +04:00
|
|
|
#include <ncurses.h>
|
|
|
|
#include <menu.h>
|
|
|
|
|
2012-06-28 16:11:43 +04:00
|
|
|
#include "client.hh"
|
2012-02-16 18:25:16 +04:00
|
|
|
|
|
|
|
namespace Kakoune
|
|
|
|
{
|
|
|
|
|
2012-06-28 16:11:43 +04:00
|
|
|
class NCursesClient : public Client
|
2012-02-16 18:25:16 +04:00
|
|
|
{
|
2012-06-06 03:15:19 +04:00
|
|
|
public:
|
2012-06-28 16:11:43 +04:00
|
|
|
NCursesClient();
|
|
|
|
~NCursesClient();
|
2012-02-16 18:25:16 +04:00
|
|
|
|
2012-06-28 16:11:43 +04:00
|
|
|
NCursesClient(const NCursesClient&) = delete;
|
|
|
|
NCursesClient& operator=(const NCursesClient&) = delete;
|
2012-02-16 18:25:16 +04:00
|
|
|
|
2012-06-06 03:15:19 +04:00
|
|
|
void draw_window(Window& window);
|
|
|
|
void print_status(const String& status);
|
|
|
|
|
2012-08-05 22:13:41 +04:00
|
|
|
String prompt(const String& prompt, const Context& context, Completer completer);
|
2012-06-06 03:15:19 +04:00
|
|
|
Key get_key();
|
2012-08-30 23:14:28 +04:00
|
|
|
|
2012-08-30 23:53:22 +04:00
|
|
|
void show_menu(const memoryview<String>& choices);
|
|
|
|
void menu_ctrl(MenuCommand command);
|
|
|
|
private:
|
|
|
|
MENU* m_menu;
|
|
|
|
std::vector<ITEM*> m_items;
|
|
|
|
std::vector<String> m_counts;
|
|
|
|
std::vector<String> m_choices;
|
2012-06-06 03:15:19 +04:00
|
|
|
};
|
2012-02-16 18:25:16 +04:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // ncurses_hh_INCLUDED
|
|
|
|
|