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