FTXUI  4.1.0
C++ functional terminal UI.
Loading...
Searching...
No Matches
mouse.hpp
Go to the documentation of this file.
1#ifndef FTXUI_COMPONENT_MOUSE_HPP
2#define FTXUI_COMPONENT_MOUSE_HPP
3namespace ftxui {
4
5/// @brief A mouse event. It contains the coordinate of the mouse, the button
6/// pressed and the modifier (shift, ctrl, meta).
7/// @ingroup component
8struct Mouse {
9 enum Button {
10 Left = 0,
11 Middle = 1,
12 Right = 2,
13 None = 3,
16 };
17
18 enum Motion {
21 };
22
23 // Button
25
26 // Motion
28
29 // Modifiers:
30 bool shift;
31 bool meta;
32 bool control;
33
34 // Coordinates:
35 int x;
36 int y;
37};
38
39} // namespace ftxui
40
41// Copyright 2020 Arthur Sonzogni. All rights reserved.
42// Use of this source code is governed by the MIT license that can be found in
43// the LICENSE file.
44#endif /* end of include guard: FTXUI_COMPONENT_MOUSE_HPP */
A mouse event. It contains the coordinate of the mouse, the button pressed and the modifier (shift,...
Definition mouse.hpp:8
bool meta
Definition mouse.hpp:31
Button button
Definition mouse.hpp:24
bool shift
Definition mouse.hpp:30
bool control
Definition mouse.hpp:32
Motion motion
Definition mouse.hpp:27