关键节点
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace XCEngine::UI::Editor::App {
|
||||
|
||||
enum class EditorWindowPointerCaptureOwner : std::uint8_t {
|
||||
None = 0,
|
||||
Shell,
|
||||
HostedContent,
|
||||
BorderlessResize,
|
||||
BorderlessChrome,
|
||||
GlobalTabDrag,
|
||||
};
|
||||
|
||||
constexpr bool CanRouteEditorWindowGlobalTabDragPointerMessages(
|
||||
EditorWindowPointerCaptureOwner owner,
|
||||
bool ownsActiveGlobalTabDrag) {
|
||||
return ownsActiveGlobalTabDrag &&
|
||||
owner == EditorWindowPointerCaptureOwner::GlobalTabDrag;
|
||||
}
|
||||
|
||||
constexpr bool CanRouteEditorWindowBorderlessResizePointerMessages(
|
||||
EditorWindowPointerCaptureOwner owner) {
|
||||
return owner == EditorWindowPointerCaptureOwner::BorderlessResize;
|
||||
}
|
||||
|
||||
constexpr bool CanRouteEditorWindowBorderlessChromePointerMessages(
|
||||
EditorWindowPointerCaptureOwner owner) {
|
||||
return owner == EditorWindowPointerCaptureOwner::BorderlessChrome;
|
||||
}
|
||||
|
||||
constexpr bool CanConsumeEditorWindowChromeHover(
|
||||
EditorWindowPointerCaptureOwner owner,
|
||||
bool shellInteractiveCaptureActive,
|
||||
bool hostedContentCaptureActive) {
|
||||
return owner == EditorWindowPointerCaptureOwner::None &&
|
||||
!shellInteractiveCaptureActive &&
|
||||
!hostedContentCaptureActive;
|
||||
}
|
||||
|
||||
} // namespace XCEngine::UI::Editor::App
|
||||
Reference in New Issue
Block a user