From a077eb38b01292611f4f6031b75e3e2c1c20f06e Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 16 Aug 2019 08:54:08 +0800 Subject: *misc --- Source/Asura.Editor/System/ContainerFrame.h | 63 +++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Source/Asura.Editor/System/ContainerFrame.h (limited to 'Source/Asura.Editor/System/ContainerFrame.h') 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 +#include + +#include +#include + +#include "../Type.h" + +namespace_begin(AsuraEditor) + +/// 包含编辑器窗口的native窗口,分为有menu和没有menu的,用来容纳GUIWindow。 +class ContainerFrame : public AEScripting::Portable +{ +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 -- cgit v1.1-26-g67d0