diff options
author | chai <chaifix@163.com> | 2019-08-16 08:54:08 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-16 08:54:08 +0800 |
commit | a077eb38b01292611f4f6031b75e3e2c1c20f06e (patch) | |
tree | 8f760483d7b0290952bbdb5bcd8f3943102aeb3a /Source/Asura.Editor/System | |
parent | 6a065c913e9308cc72e1ad0723b6167048f439b6 (diff) |
Diffstat (limited to 'Source/Asura.Editor/System')
-rw-r--r-- | Source/Asura.Editor/System/ContainerFrame.cpp | 6 | ||||
-rw-r--r-- | Source/Asura.Editor/System/ContainerFrame.h | 63 | ||||
-rw-r--r-- | Source/Asura.Editor/System/ContainerWindow.h | 14 | ||||
-rw-r--r-- | Source/Asura.Editor/System/GUIWindow.cpp | 0 | ||||
-rw-r--r-- | Source/Asura.Editor/System/GUIWindow.h | 36 | ||||
-rw-r--r-- | Source/Asura.Editor/System/Input.cpp | 2 |
6 files changed, 113 insertions, 8 deletions
diff --git a/Source/Asura.Editor/System/ContainerFrame.cpp b/Source/Asura.Editor/System/ContainerFrame.cpp new file mode 100644 index 0000000..9626317 --- /dev/null +++ b/Source/Asura.Editor/System/ContainerFrame.cpp @@ -0,0 +1,6 @@ +#include "ContainerFrame.h" + +namespace_begin(AsuraEditor) + + +namespace_end diff --git a/Source/Asura.Editor/System/ContainerFrame.h b/Source/Asura.Editor/System/ContainerFrame.h new file mode 100644 index 0000000..51a08d4 --- /dev/null +++ b/Source/Asura.Editor/System/ContainerFrame.h @@ -0,0 +1,63 @@ +#ifndef _ASURA_CONTAINER_FRAME_H_ +#define _ASURA_CONTAINER_FRAME_H_ + +#include <windows.h> +#include <string.h> + +#include <asura-base/Scripting/Scripting.h> +#include <asura-base/Classes.h> + +#include "../Type.h" + +namespace_begin(AsuraEditor) + +/// ༭ڵnativeڣΪmenuûmenuģGUIWindow +class ContainerFrame : public AEScripting::Portable<ContainerFrame> +{ +public: + + enum WindowStyle + { + WINDOW_STYLE_MAIN, ///< + WINDOW_STYLE_NORMAL, ///< + WINDOW_STYLE_TOOL, ///< + WINDOW_STYLE_POPUP, ///< + }; + + struct WindowConfig + { + std::string title; ///< + uint x, y; ///< + uint width, height; ///< С + WindowStyle style; ///< + }; + + ContainerFrame(); + ~ContainerFrame(); + + bool Init(WindowConfig& config); + +private: + + WindowStyle m_Style; + HWND m_HWND; + HDC m_HDC; + +luaxport: + + LUAX_DECL_FACTORY(ContainerFrame); + + LUAX_DECL_ENUM(WindowStyle); + + LUAX_DECL_METHOD(_New); + LUAX_DECL_METHOD(_Init); + LUAX_DECL_METHOD(_SetPosition); + +}; + +// GUIWindowĿ +using ContainerWindow = ContainerFrame; + +namespace_end + +#endif
\ No newline at end of file diff --git a/Source/Asura.Editor/System/ContainerWindow.h b/Source/Asura.Editor/System/ContainerWindow.h index 5893aff..06a7b82 100644 --- a/Source/Asura.Editor/System/ContainerWindow.h +++ b/Source/Asura.Editor/System/ContainerWindow.h @@ -11,9 +11,7 @@ namespace_begin(AsuraEditor) -/// -/// ༭ڵnative -/// +/// ༭ڵnativeڣΪmenuûmenuģGUIWindow class ContainerWindow : public AEScripting::Portable<ContainerWindow> { public: @@ -40,10 +38,9 @@ public: private: - ContainerWindow* mParent; - WindowStyle mStyle; - HWND mHWND; - HDC mHDC; + WindowStyle m_Style; + HWND m_HWND; + HDC m_HDC; luaxport: @@ -57,6 +54,9 @@ luaxport: }; +// GUIWindowĿ +using ContainerFrame = ContainerWindow; + namespace_end #endif
\ No newline at end of file diff --git a/Source/Asura.Editor/System/GUIWindow.cpp b/Source/Asura.Editor/System/GUIWindow.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Source/Asura.Editor/System/GUIWindow.cpp diff --git a/Source/Asura.Editor/System/GUIWindow.h b/Source/Asura.Editor/System/GUIWindow.h new file mode 100644 index 0000000..228aa74 --- /dev/null +++ b/Source/Asura.Editor/System/GUIWindow.h @@ -0,0 +1,36 @@ +#ifndef _ASURA_GUI_WINDOW_H_ +#define _ASURA_GUI_WINDOW_H_ + +#include <vector> + +#include <asura-base/Classes.h> + +#include "ContainerWindow.h" + +namespace_begin(AsuraEditor) + +typedef std::vector<GUIPanel*> GUIPanelVector; + +/// һGUIWindowGUI paneltabpanelлGUIԪصĴڡ +class GUIWindow +{ +public: + + GUIWindow(); + ~GUIWindow(); + + void DoRepint(); + +private: + + ContainerWindow* m_ParentWindow; + GUIPanelVector m_GUIPanels; + + bool m_IsRepaint; + +}; + + +namespace_end + +#endif
\ No newline at end of file diff --git a/Source/Asura.Editor/System/Input.cpp b/Source/Asura.Editor/System/Input.cpp index c10eb3b..80086d3 100644 --- a/Source/Asura.Editor/System/Input.cpp +++ b/Source/Asura.Editor/System/Input.cpp @@ -49,7 +49,7 @@ LRESULT Input::OnDeviceChange(LPCWSTR name, bool add) { } -bool Input::ConvertPositionToClientAreaCoord(HWND activeWindow, POINT position, AEMath::Vector2f& newPos) +bool Input::ConvertPositionToClientAreaCoord(HWND activeWindow, POINT position, Vector2f& newPos) { } |