MGL(Win32)
読み取り中…
検索中…
一致する文字列を見つけられません
mgl_mouse_delegate_win32.h
[詳解]
1// SPDX-License-Identifier: Zlib
2/* ------------------------------------------------------------------------- */
9/* ------------------------------------------------------------------------- */
10
11#ifndef INCGUARD_MGL_MOUSE_DELEGATE_WIN32_H_1617153888
12#define INCGUARD_MGL_MOUSE_DELEGATE_WIN32_H_1617153888
13
14#include <mgl/mgl_environment.h>
15#if defined(MGL_MOUSE_DELEGATE_ENABLE_WIN32)
16
18
19namespace MGL::Input
20{
23{
24public:
25 Win32MouseDelegate() noexcept;
26
27 void UpdateState(MouseState &state) noexcept override;
28 void PostUpdatePosition(const MouseState &state) noexcept override;
29
30 bool SetCursorMode(CursorMode cursorMode) noexcept override;
31 [[nodiscard]] CursorMode GetCursorMode() const noexcept override;
32
33 void SetCursorVisibleMode(CursorVisibleMode visibleMode) noexcept override;
34 [[nodiscard]] CursorVisibleMode GetCursorVisibleMode() const noexcept override;
35
36 /* ------------------------------------------------------------------------- */
42 /* ------------------------------------------------------------------------- */
43 [[nodiscard]] bool IsConnecting() const noexcept override
44 {
45 return true;
46 }
47
48private:
49 void UpdateCursorAutoErase(const MouseState &state, float elapsedTime) noexcept;
50 void SetVisibleCursor(bool isVisible) noexcept;
51 void FixCursorPosition() noexcept;
52
53 CursorMode _cursorMode;
54 CursorVisibleMode _cursorVisibleMode;
55 float _cursorDisplayTime;
56 bool _isVisibleCursor;
57};
58
59} // namespace MGL::Input
60
61#endif // MGL_MOUSE_DELEGATE_ENABLE_WIN32
62#endif // INCGUARD_MGL_MOUSE_DELEGATE_WIN32_H_1617153888
63
64// vim: et ts=4 sw=4 sts=4
マウス入力デリゲート基底クラス
Definition mgl_mouse_delegate.h:20
Win32用マウス入力デリゲートクラス
Definition mgl_mouse_delegate_win32.h:23
void UpdateState(MouseState &state) noexcept override
マウス入力状態の更新処理
Definition mgl_mouse_delegate_win32.cc:48
bool IsConnecting() const noexcept override
マウスの接続状態を取得
Definition mgl_mouse_delegate_win32.h:43
CursorMode GetCursorMode() const noexcept override
カーソルモードを取得
Definition mgl_mouse_delegate_win32.cc:189
void PostUpdatePosition(const MouseState &state) noexcept override
マウスの座標確定後の処理
Definition mgl_mouse_delegate_win32.cc:114
Win32MouseDelegate() noexcept
コンストラクタ
Definition mgl_mouse_delegate_win32.cc:33
void SetCursorVisibleMode(CursorVisibleMode visibleMode) noexcept override
カーソルの表示モードを設定
Definition mgl_mouse_delegate_win32.cc:201
bool SetCursorMode(CursorMode cursorMode) noexcept override
カーソルモードを設定
Definition mgl_mouse_delegate_win32.cc:153
CursorVisibleMode GetCursorVisibleMode() const noexcept override
カーソルの表示モードを取得
Definition mgl_mouse_delegate_win32.cc:227
MGL 環境定義
MGL マウス入力デリゲート基底クラス
CursorVisibleMode
表示設定
Definition mgl_mouse_state.h:75
CursorMode
カーソルモード
Definition mgl_mouse_state.h:67
マウスの状態
Definition mgl_mouse_state.h:52