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