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
6
namespace
ftxui
{
7
8
/// @brief 一个鼠标事件。它包含鼠标的坐标、按下的按钮以及修饰符(shift、ctrl、meta)。
9
/// @ingroup component
10
struct
Mouse
{
11
enum
Button
{
12
Left
= 0,
13
Middle
= 1,
14
Right
= 2,
15
None
= 3,
16
WheelUp
= 4,
17
WheelDown
= 5,
18
WheelLeft
= 6,
/// 仅支持的终端。
19
WheelRight
= 7,
/// 仅支持的终端。
20
};
21
22
enum
Motion
{
23
Released
= 0,
24
Pressed
= 1,
25
Moved
= 2,
26
};
27
28
// Button
29
Button
button
=
Button::None
;
30
31
// Motion
32
Motion
motion
=
Motion::Pressed
;
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 */
ftxui::Mouse::Button
Button
定义
mouse.hpp:11
ftxui::Mouse::WheelLeft
@ WheelLeft
定义
mouse.hpp:18
ftxui::Mouse::Middle
@ Middle
定义
mouse.hpp:13
ftxui::Mouse::Left
@ Left
定义
mouse.hpp:12
ftxui::Mouse::WheelUp
@ WheelUp
定义
mouse.hpp:16
ftxui::Mouse::None
@ None
定义
mouse.hpp:15
ftxui::Mouse::Right
@ Right
定义
mouse.hpp:14
ftxui::Mouse::WheelRight
@ WheelRight
仅支持的终端。
定义
mouse.hpp:19
ftxui::Mouse::WheelDown
@ WheelDown
定义
mouse.hpp:17
ftxui::Mouse::Motion
Motion
定义
mouse.hpp:22
ftxui::Mouse::Pressed
@ Pressed
定义
mouse.hpp:24
ftxui::Mouse::Moved
@ Moved
定义
mouse.hpp:25
ftxui::Mouse::Released
@ Released
定义
mouse.hpp:23
ftxui::Mouse::y
int y
定义
mouse.hpp:41
ftxui::Mouse::meta
bool meta
定义
mouse.hpp:36
ftxui::Mouse::x
int x
定义
mouse.hpp:40
ftxui::Mouse::button
Button button
定义
mouse.hpp:29
ftxui::Mouse::shift
bool shift
定义
mouse.hpp:35
ftxui::Mouse::control
bool control
定义
mouse.hpp:37
ftxui::Mouse::motion
Motion motion
定义
mouse.hpp:32
ftxui::Mouse
一个鼠标事件。它包含鼠标的坐标、按下的按钮以及修饰符(shift、ctrl、meta)。
定义
mouse.hpp:10
ftxui
#include "ftxui/component/component_base.hpp" // 用于 ComponentBase
定义
animation.hpp:9