4#ifndef FTXUI_COMPONENT_EVENT_HPP
5#define FTXUI_COMPONENT_EVENT_HPP
14class ScreenInteractive;
57 static const Event F1,
F2,
F3,
F4,
F5,
F6,
F7,
F8,
F9,
F10,
F11,
F12;
73 const std::string&
input()
const {
return input_; }
78 bool is_mouse()
const {
return type_ == Type::Mouse; }
83 int cursor_x()
const {
return data_.cursor.x; }
84 int cursor_y()
const {
return data_.cursor.y; }
102 Type type_ = Type::Unknown;
111 struct Cursor cursor;
It implement rendering itself as ftxui::Element. It implement keyboard navigation by responding to ft...
Represent an event. It can be key press event, a terminal resize, or more ...
static const Event TabReverse
static const Event ArrowLeftCtrl
std::string character() const
static Event CursorShape(std::string, int shape)
An event corresponding to a terminal DCS (Device Control String).
static const Event PageUp
static const Event Escape
static Event Mouse(std::string, Mouse mouse)
An event corresponding to a given typed character.
bool is_cursor_position() const
ScreenInteractive * screen_
static const Event Custom
static Event Character(std::string)
An event corresponding to a given typed character.
static const Event Backspace
static const Event ArrowUp
const std::string & input() const
static const Event ArrowDown
static const Event ArrowUpCtrl
static const Event PageDown
static Event CursorPosition(std::string, int x, int y)
static const Event Return
bool operator==(const Event &other) const
static const Event ArrowLeft
bool operator!=(const Event &other) const
bool is_character() const
static const Event Delete
static const Event ArrowDownCtrl
static const Event Insert
static const Event ArrowRightCtrl
bool is_cursor_shape() const
static Event Special(std::string)
An custom event whose meaning is defined by the user of the library.
static const Event ArrowRight
A mouse event. It contains the coordinate of the mouse, the button pressed and the modifier (shift,...