From 91ef8c69db46f5947a142e2a30dc9f805aceb3a8 Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Thu, 25 Jul 2024 21:29:30 +0300 Subject: [PATCH] Move Window related enums to separate header file --- Source/Engine/Platform/Base/Enums.h | 251 +++++++++++++++++++++++ Source/Engine/Platform/Base/WindowBase.h | 247 +--------------------- 2 files changed, 252 insertions(+), 246 deletions(-) create mode 100644 Source/Engine/Platform/Base/Enums.h diff --git a/Source/Engine/Platform/Base/Enums.h b/Source/Engine/Platform/Base/Enums.h new file mode 100644 index 000000000..69c5a43a1 --- /dev/null +++ b/Source/Engine/Platform/Base/Enums.h @@ -0,0 +1,251 @@ +// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved. + +#pragma once + +#include "Engine/Core/Config.h" + +/// +/// Window closing reasons. +/// +API_ENUM() enum class ClosingReason +{ + /// + /// The unknown. + /// + Unknown = 0, + + /// + /// The user. + /// + User, + + /// + /// The engine exit. + /// + EngineExit, + + /// + /// The close event. + /// + CloseEvent, +}; + +/// +/// Types of default cursors. +/// +API_ENUM() enum class CursorType +{ + /// + /// The default. + /// + Default = 0, + + /// + /// The cross. + /// + Cross, + + /// + /// The hand. + /// + Hand, + + /// + /// The help icon + /// + Help, + + /// + /// The I beam. + /// + IBeam, + + /// + /// The blocking image. + /// + No, + + /// + /// The wait. + /// + Wait, + + /// + /// The size all sides. + /// + SizeAll, + + /// + /// The size NE-SW. + /// + SizeNESW, + + /// + /// The size NS. + /// + SizeNS, + + /// + /// The size NW-SE. + /// + SizeNWSE, + + /// + /// The size WE. + /// + SizeWE, + + /// + /// The cursor is hidden. + /// + Hidden, + + MAX +}; + +/// +/// Data drag and drop effects. +/// +API_ENUM() enum class DragDropEffect +{ + /// + /// The none. + /// + None = 0, + + /// + /// The copy. + /// + Copy, + + /// + /// The move. + /// + Move, + + /// + /// The link. + /// + Link, +}; + +/// +/// Window hit test codes. Note: they are 1:1 mapping for Win32 values. +/// +API_ENUM() enum class WindowHitCodes +{ + /// + /// The transparent area. + /// + Transparent = -1, + + /// + /// The no hit. + /// + NoWhere = 0, + + /// + /// The client area. + /// + Client = 1, + + /// + /// The caption area. + /// + Caption = 2, + + /// + /// The system menu. + /// + SystemMenu = 3, + + /// + /// The grow box + /// + GrowBox = 4, + + /// + /// The menu. + /// + Menu = 5, + + /// + /// The horizontal scroll. + /// + HScroll = 6, + + /// + /// The vertical scroll. + /// + VScroll = 7, + + /// + /// The minimize button. + /// + MinButton = 8, + + /// + /// The maximize button. + /// + MaxButton = 9, + + /// + /// The left side; + /// + Left = 10, + + /// + /// The right side. + /// + Right = 11, + + /// + /// The top side. + /// + Top = 12, + + /// + /// The top left corner. + /// + TopLeft = 13, + + /// + /// The top right corner. + /// + TopRight = 14, + + /// + /// The bottom side. + /// + Bottom = 15, + + /// + /// The bottom left corner. + /// + BottomLeft = 16, + + /// + /// The bottom right corner. + /// + BottomRight = 17, + + /// + /// The border. + /// + Border = 18, + + /// + /// The object. + /// + Object = 19, + + /// + /// The close button. + /// + Close = 20, + + /// + /// The help button. + /// + Help = 21, +}; diff --git a/Source/Engine/Platform/Base/WindowBase.h b/Source/Engine/Platform/Base/WindowBase.h index 7196f046b..240c2e650 100644 --- a/Source/Engine/Platform/Base/WindowBase.h +++ b/Source/Engine/Platform/Base/WindowBase.h @@ -8,6 +8,7 @@ #include "Engine/Scripting/ScriptingObject.h" #include "Engine/Input/KeyboardKeys.h" #include "Engine/Input/Enums.h" +#include "Enums.h" class Input; class Engine; @@ -17,252 +18,6 @@ class GPUSwapChain; class TextureData; class IGuiData; -/// -/// Window closing reasons. -/// -API_ENUM() enum class ClosingReason -{ - /// - /// The unknown. - /// - Unknown = 0, - - /// - /// The user. - /// - User, - - /// - /// The engine exit. - /// - EngineExit, - - /// - /// The close event. - /// - CloseEvent, -}; - -/// -/// Types of default cursors. -/// -API_ENUM() enum class CursorType -{ - /// - /// The default. - /// - Default = 0, - - /// - /// The cross. - /// - Cross, - - /// - /// The hand. - /// - Hand, - - /// - /// The help icon - /// - Help, - - /// - /// The I beam. - /// - IBeam, - - /// - /// The blocking image. - /// - No, - - /// - /// The wait. - /// - Wait, - - /// - /// The size all sides. - /// - SizeAll, - - /// - /// The size NE-SW. - /// - SizeNESW, - - /// - /// The size NS. - /// - SizeNS, - - /// - /// The size NW-SE. - /// - SizeNWSE, - - /// - /// The size WE. - /// - SizeWE, - - /// - /// The cursor is hidden. - /// - Hidden, - - MAX -}; - -/// -/// Data drag and drop effects. -/// -API_ENUM() enum class DragDropEffect -{ - /// - /// The none. - /// - None = 0, - - /// - /// The copy. - /// - Copy, - - /// - /// The move. - /// - Move, - - /// - /// The link. - /// - Link, -}; - -/// -/// Window hit test codes. Note: they are 1:1 mapping for Win32 values. -/// -API_ENUM() enum class WindowHitCodes -{ - /// - /// The transparent area. - /// - Transparent = -1, - - /// - /// The no hit. - /// - NoWhere = 0, - - /// - /// The client area. - /// - Client = 1, - - /// - /// The caption area. - /// - Caption = 2, - - /// - /// The system menu. - /// - SystemMenu = 3, - - /// - /// The grow box - /// - GrowBox = 4, - - /// - /// The menu. - /// - Menu = 5, - - /// - /// The horizontal scroll. - /// - HScroll = 6, - - /// - /// The vertical scroll. - /// - VScroll = 7, - - /// - /// The minimize button. - /// - MinButton = 8, - - /// - /// The maximize button. - /// - MaxButton = 9, - - /// - /// The left side; - /// - Left = 10, - - /// - /// The right side. - /// - Right = 11, - - /// - /// The top side. - /// - Top = 12, - - /// - /// The top left corner. - /// - TopLeft = 13, - - /// - /// The top right corner. - /// - TopRight = 14, - - /// - /// The bottom side. - /// - Bottom = 15, - - /// - /// The bottom left corner. - /// - BottomLeft = 16, - - /// - /// The bottom right corner. - /// - BottomRight = 17, - - /// - /// The border. - /// - Border = 18, - - /// - /// The object. - /// - Object = 19, - - /// - /// The close button. - /// - Close = 20, - - /// - /// The help button. - /// - Help = 21, -}; - API_INJECT_CODE(cpp, "#include \"Engine/Platform/Window.h\""); ///