FTXUI 6.1.9
C++ functional terminal UI.
载入中...
搜索中...
未找到
mouse.hpp
浏览该文件的文档.
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 一个鼠标事件。它包含鼠标的坐标、按下的按钮以及修饰符(shift、ctrl、meta)。
9/// @ingroup component
10struct Mouse {
11 enum Button {
12 Left = 0,
13 Middle = 1,
14 Right = 2,
15 None = 3,
18 WheelLeft = 6, /// 仅支持的终端。
19 WheelRight = 7, /// 仅支持的终端。
20 };
21
22 enum Motion {
25 Moved = 2,
26 };
27
28 // Button
30
31 // Motion
33
34 // Modifiers:
35 bool shift = false;
36 bool meta = false;
37 bool control = false;
38
39 // Coordinates:
40 int x = 0;
41 int y = 0;
42};
43
44} // namespace ftxui
45
46#endif /* end of include guard: FTXUI_COMPONENT_MOUSE_HPP */
@ WheelRight
仅支持的终端。
一个鼠标事件。它包含鼠标的坐标、按下的按钮以及修饰符(shift、ctrl、meta)。
#include "ftxui/component/component_base.hpp" // 用于 ComponentBase