@@ -24,36 +24,6 @@ namespace s3d
24
24
{
25
25
class CCursor final : public ISiv3DCursor
26
26
{
27
- private:
28
-
29
- HWND m_hWnd = nullptr ;
30
-
31
- std::mutex m_clientPosBufferMutex;
32
- Array<std::pair<uint64, Point >> m_clientPosBuffer;
33
-
34
- CursorState m_state;
35
-
36
- Mat3x2 m_transformLocal = Mat3x2::Identity();
37
- Mat3x2 m_transformCamera = Mat3x2::Identity();
38
- Mat3x2 m_transformScreen = Mat3x2::Identity();
39
- Mat3x2 m_transformAll = Mat3x2::Identity();
40
- Mat3x2 m_transformAllInv = Mat3x2::Identity();
41
-
42
- bool m_clippedToWindow = false ;
43
-
44
- static void CursorDeleter (HICON h)
45
- {
46
- ::DestroyIcon (h);
47
- }
48
-
49
- std::array<HCURSOR, 11 > m_systemCursors;
50
- HICON m_currentCursor = nullptr ;
51
- HICON m_defaultCursor = nullptr ;
52
- HICON m_requestedCursor = nullptr ;
53
- HashTable<String, unique_resource<HICON, decltype(&CursorDeleter)>> m_customCursors;
54
-
55
- void confineCursor ();
56
-
57
27
public:
58
28
59
29
CCursor ();
@@ -92,13 +62,49 @@ namespace s3d
92
62
93
63
void requestStyle (StringView name) override ;
94
64
65
+ void setCapture (bool captured) noexcept override ;
66
+
67
+ bool isCaptured () const noexcept override ;
68
+
95
69
// //////////////////////////////////////////////////////////////
96
70
//
97
71
// Windows
98
72
//
99
73
void handleMessage (UINT message, WPARAM wParam, LPARAM lParam);
100
74
101
75
void onSetCursor ();
76
+
77
+ private:
78
+
79
+ HWND m_hWnd = nullptr ;
80
+
81
+ std::mutex m_clientPosBufferMutex;
82
+ Array<std::pair<uint64, Point >> m_clientPosBuffer;
83
+
84
+ CursorState m_state;
85
+
86
+ Mat3x2 m_transformLocal = Mat3x2::Identity();
87
+ Mat3x2 m_transformCamera = Mat3x2::Identity();
88
+ Mat3x2 m_transformScreen = Mat3x2::Identity();
89
+ Mat3x2 m_transformAll = Mat3x2::Identity();
90
+ Mat3x2 m_transformAllInv = Mat3x2::Identity();
91
+
92
+ bool m_clippedToWindow = false ;
93
+
94
+ static void CursorDeleter (HICON h)
95
+ {
96
+ ::DestroyIcon (h);
97
+ }
98
+
99
+ std::array<HCURSOR, 11 > m_systemCursors;
100
+ HICON m_currentCursor = nullptr ;
101
+ HICON m_defaultCursor = nullptr ;
102
+ HICON m_requestedCursor = nullptr ;
103
+ HashTable<String, unique_resource<HICON, decltype(&CursorDeleter)>> m_customCursors;
104
+
105
+ bool m_captured = false ;
106
+
107
+ void confineCursor ();
102
108
};
103
109
}
104
110
0 commit comments