diff options
author | chai <chaifix@163.com> | 2021-10-18 19:56:41 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-10-18 19:56:41 +0800 |
commit | 45328cbadd8a946c19a77301f218efbf650e2f28 (patch) | |
tree | 8ec4f3a9737b2cbb9744f8347a56783743be2a4c /Editor/GUI/EditorWindows.h | |
parent | b5702ece4c2cf751c252e76fb885a7ec41ccabe8 (diff) |
*misc
Diffstat (limited to 'Editor/GUI/EditorWindows.h')
-rw-r--r-- | Editor/GUI/EditorWindows.h | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/Editor/GUI/EditorWindows.h b/Editor/GUI/EditorWindows.h index 307ab86..97175b3 100644 --- a/Editor/GUI/EditorWindows.h +++ b/Editor/GUI/EditorWindows.h @@ -4,7 +4,8 @@ #include <windows.h> #include <vector> #include "Runtime/Math/Rect.h" -#include "Runtime/LuaBind/LuaBind.h" +#include "Runtime/Lua/LuaBind/LuaBind.h" +#include "Runtime/Lua/LuaHelper.h" #include "Runtime/Utilities/Singleton.h" #include "Runtime/Debug/Log.h" #include "Runtime/Graphics/OpenGL.h" @@ -18,7 +19,7 @@ class GUIWindow; class WindowUtil { public : - static void Init(); + static void RegisterClasses(); static const wchar_t* kContainerWindowClassName; static const wchar_t* kPopupWindowClassName; @@ -89,8 +90,11 @@ private: POINT m_MaxSize; LUA_BIND_DECL_FACTORY(ContainnerWindow); - LUA_BIND_DECL_METHOD(_SetTitle); - LUA_BIND_DECL_METHOD(_DoPaint); + + LUA_BIND_DECL_METHOD(_New); + LUA_BIND_DECL_METHOD(_SetTitle); + LUA_BIND_DECL_METHOD(_SetIcon); + LUA_BIND_DECL_METHOD(_DoPaint); }; @@ -122,7 +126,9 @@ private: }; // GUI窗口,事件相应、绘制、布局的单元 -class GUIWindow : public WindowBase +class GUIWindow + : public WindowBase + , public LuaBind::NativeClass<GUIWindow> { public: static LRESULT CALLBACK GUIViewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); @@ -155,6 +161,14 @@ private: LuaBind::Ref m_Script; + LUA_BIND_DECL_FACTORY(GUIWindow); + + LUA_BIND_DECL_METHOD(_New); + LUA_BIND_DECL_METHOD(_DoPaint); + LUA_BIND_DECL_METHOD(_Focus); + LUA_BIND_DECL_METHOD(_SetContainnerWindow); + LUA_BIND_DECL_METHOD(_SetPosition); + }; #endif
\ No newline at end of file |