Skip to content
You are viewing documentation for v6.1.5. Switch to latest (main).

ftxui::Mouse ​

cpp
#include <ftxui/component/mouse.hpp>

A mouse event. It contains the coordinate of the mouse, the button pressed and the modifier (shift, ctrl, meta).

Summary ​

SymbolDescription
Button
Motion
button
motion
shift
meta
control
x
y

Public Types ​

Button ​

cpp
enum Button { Left, Middle, Right, None, WheelUp, WheelDown, WheelLeft, WheelRight };
  • WheelRight: Supported terminal only.

Examples: component/button_animated, component/button_in_frame, component/button_style, component/composition, component/gallery, component/homescreen, component/modal_dialog, component/modal_dialog_custom, component/nested_screen, component/renderer, component/selection, component/with_restored_io

Motion ​

cpp
enum Motion { Released, Pressed, Moved };

Public Attributes ​

button ​

cpp
Button button = Button::None;

motion ​

cpp
Motion motion = Motion::Pressed;

shift ​

cpp
bool shift = false;

meta ​

cpp
bool meta = false;

control ​

cpp
bool control = false;

x ​

cpp
int x = 0;

y ​

cpp
int y = 0;