Skip to content
You are viewing documentation for v5.0.0. 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).

Examples: component/print_key_press

Summary ​

SymbolDescription
Button
Motion
button
motion
shift
meta
control
x
y

Public Types ​

Button ​

cpp
enum Button { Left, Middle, Right, None, WheelUp, WheelDown };

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

Motion ​

cpp
enum Motion { Released, Pressed };

Public Attributes ​

button ​

cpp
Button button = Button::None;

Examples: component/print_key_press

motion ​

cpp
Motion motion = Motion::Pressed;

Examples: component/print_key_press

shift ​

cpp
bool shift = false;

Examples: component/print_key_press

meta ​

cpp
bool meta = false;

Examples: component/print_key_press

control ​

cpp
bool control = false;

Examples: component/print_key_press

x ​

cpp
int x = 0;

Examples: component/print_key_press

y ​

cpp
int y = 0;

Examples: component/print_key_press