From bad78945ceba425f6a80e3b8dca2414d592970eb Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 2 Aug 2019 20:51:00 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6=E5=90=8D=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/Asura.Editor/System/ContainerWindow.h | 62 ++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 source/Asura.Editor/System/ContainerWindow.h (limited to 'source/Asura.Editor/System/ContainerWindow.h') diff --git a/source/Asura.Editor/System/ContainerWindow.h b/source/Asura.Editor/System/ContainerWindow.h new file mode 100644 index 0000000..ee72b72 --- /dev/null +++ b/source/Asura.Editor/System/ContainerWindow.h @@ -0,0 +1,62 @@ +#ifndef _ASURA_EDITOR_WINDOW_H_ +#define _ASURA_EDITOR_WINDOW_H_ + +#include +#include + +#include +#include + +#include "../Type.h" + +namespace_begin(AsuraEditor) + +/// +/// 包含编辑器窗口的native窗口 +/// +class ContainerWindow : public AEScripting::Portable +{ +public: + + enum WindowStyle + { + WINDOW_STYLE_BASIC, ///< 基础风格 + WINDOW_STYLE_TOOL, ///< 工具栏风格 + WINDOW_STYLE_CONFIRM, ///< 确认窗口 + }; + + struct WindowConfig + { + std::string title; ///< 标题 + uint x, y; ///< 坐标 + uint width, height; ///< 大小 + WindowStyle style; ///< 风格 + }; + + ContainerWindow(); + ~ContainerWindow(); + + bool Init(WindowConfig& config); + +private: + + ContainerWindow* mParent; + WindowStyle mStyle; + HWND mHWND; + HDC mHDC; + +luaxport: + + LUAX_DECL_FACTORY(ContainerWindow); + + LUAX_DECL_ENUM(WindowStyle); + + LUAX_DECL_METHOD(_New); + LUAX_DECL_METHOD(_Init); + LUAX_DECL_METHOD(_SetPosition); + +}; + +namespace_end + +#endif \ No newline at end of file -- cgit v1.1-26-g67d0