From a077eb38b01292611f4f6031b75e3e2c1c20f06e Mon Sep 17 00:00:00 2001
From: chai <chaifix@163.com>
Date: Fri, 16 Aug 2019 08:54:08 +0800
Subject: *misc

---
 Source/Asura.Editor/System/ContainerFrame.cpp |  6 +++
 Source/Asura.Editor/System/ContainerFrame.h   | 63 +++++++++++++++++++++++++++
 Source/Asura.Editor/System/ContainerWindow.h  | 14 +++---
 Source/Asura.Editor/System/GUIWindow.cpp      |  0
 Source/Asura.Editor/System/GUIWindow.h        | 36 +++++++++++++++
 Source/Asura.Editor/System/Input.cpp          |  2 +-
 6 files changed, 113 insertions(+), 8 deletions(-)
 create mode 100644 Source/Asura.Editor/System/ContainerFrame.cpp
 create mode 100644 Source/Asura.Editor/System/ContainerFrame.h
 create mode 100644 Source/Asura.Editor/System/GUIWindow.cpp
 create mode 100644 Source/Asura.Editor/System/GUIWindow.h

(limited to 'Source/Asura.Editor/System')

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
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;
+
+/// һ��GUIWindow������������GUI panel����tab������panel���л�������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)
 {
 }
 
-- 
cgit v1.1-26-g67d0