FTXUI 7.0.3
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
6
7#include <cstdint>
8
10
11namespace ftxui {
12
13/// @brief マウスイベント。マウスの座標、押されたボタン、
14/// および修飾子(shift, ctrl, meta)が含まれます。
15/// @ingroup component
16struct FTXUI_EXPORT(COMPONENT) Mouse {
17 enum Button : uint8_t {
18 Left = 0,
19 Middle = 1,
20 Right = 2,
21 None = 3,
22 WheelUp = 4,
23 WheelDown = 5,
24 WheelLeft = 6, /// サポートされているターミナルのみ。
25 WheelRight = 7, /// サポートされているターミナルのみ。
26 };
27
28 enum Motion : uint8_t {
29 Released = 0,
30 Pressed = 1,
31 Moved = 2,
32 };
33
34 // ボタン
35 Button button = Button::None;
36
37 // モーション
38 Motion motion = Motion::Pressed;
39
40 // 修飾キー:
41 bool shift = false;
42 bool meta = false;
43 bool control = false;
44
45 // 座標:
46 int x = 0;
47 int y = 0;
48};
49
50} // namespace ftxui
51
52#endif /* インクルードガードの終わり: FTXUI_COMPONENT_MOUSE_HPP */
FTXUI ftxui::名前空間
Definition animation.hpp:11
int y
Definition elements.hpp:131