diff options
author | chai <chaifix@163.com> | 2019-04-06 07:39:49 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-04-06 07:39:49 +0800 |
commit | e47baca4f23db43ec91fbf64d5d06d7c0dbee495 (patch) | |
tree | 9e909413bbf61834570e7dbdbe37fc8705f12730 /source/Asura.Editor | |
parent | e13616b5c40f912853be99f0603f0e4c97b22062 (diff) |
*misc
Diffstat (limited to 'source/Asura.Editor')
-rw-r--r-- | source/Asura.Editor/config.h | 0 | ||||
-rw-r--r-- | source/Asura.Editor/core/slot.h | 2 | ||||
-rw-r--r-- | source/Asura.Editor/editor.h | 9 | ||||
-rw-r--r-- | source/Asura.Editor/system/window.cpp | 13 | ||||
-rw-r--r-- | source/Asura.Editor/system/window.h | 82 | ||||
-rw-r--r-- | source/Asura.Editor/type.h | 30 |
6 files changed, 133 insertions, 3 deletions
diff --git a/source/Asura.Editor/config.h b/source/Asura.Editor/config.h new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/source/Asura.Editor/config.h diff --git a/source/Asura.Editor/core/slot.h b/source/Asura.Editor/core/slot.h index b62f406..f569cfe 100644 --- a/source/Asura.Editor/core/slot.h +++ b/source/Asura.Editor/core/slot.h @@ -4,7 +4,7 @@ #include <asura-utils/scripting/portable.hpp> #include <asura-core/input/event.h> -#include "../widgets/widget.h" +#include "../controls/widget.h" namespace AsuraEditor { diff --git a/source/Asura.Editor/editor.h b/source/Asura.Editor/editor.h index b086532..fbcfb62 100644 --- a/source/Asura.Editor/editor.h +++ b/source/Asura.Editor/editor.h @@ -21,9 +21,14 @@ namespace AsuraEditor private: /// - /// еstate + /// е /// - lua_State* mMainState; + Luax::LuaxVM* mEditorVM; + + /// + /// Ϸʱ + /// + Luax::LuaxVM* mRunnerVM; }; diff --git a/source/Asura.Editor/system/window.cpp b/source/Asura.Editor/system/window.cpp new file mode 100644 index 0000000..440c88c --- /dev/null +++ b/source/Asura.Editor/system/window.cpp @@ -0,0 +1,13 @@ +#include "window.h" + +namespace AsuraEditor +{ + + bool Window::Init(int posx, uint posy, uint w, uint h) + { + if (mHWND) + return false; + + } + +}
\ No newline at end of file diff --git a/source/Asura.Editor/system/window.h b/source/Asura.Editor/system/window.h new file mode 100644 index 0000000..c9837e3 --- /dev/null +++ b/source/Asura.Editor/system/window.h @@ -0,0 +1,82 @@ +#ifndef __ASURA_EDITOR_WINDOW_H__ +#define __ASURA_EDITOR_WINDOW_H__ + +#include <windows.h> +#include <string.h> + +#include <asura-utils/scripting/portable.hpp> + +#include "../type.h" + +namespace AsuraEditor +{ + + /// + /// ڷָֻ˿ܵķĿؼӦóơ + /// + enum WindowStyle + { + WINDOW_STYLE_BASIC, ///< + WINDOW_STYLE_TOOL, ///< + WINDOW_STYLE_CONFIRM, ///< ȷϴ + }; + + /// + /// ʱҪ + /// + struct WindowConfig + { + std::string title; ///< + uint x, y; ///< + uint width, height; ///< С + WindowStyle style; ///< + }; + + /// + /// ༭win32ڣÿһڰһHWNDһHDC + /// + class Window + : public AEScripting::Portable<Window> + { + public: + + Window(); + ~Window(); + + bool Init(WindowConfig& config); + + private: + + //------------------------------------------------------------------------------// + + LUAX_DECL_FACTORY(Window); + + LUAX_DECL_ENUM(WindowStyle); + + LUAX_DECL_METHOD(_New); + LUAX_DECL_METHOD(_Init); + LUAX_DECL_METHOD(_SetPosition); + + //------------------------------------------------------------------------------// + + /// + /// ڡ + /// + Window* mParent; + + /// + /// ھ豸ġ + /// + HWND mHWND; + HDC mHDC; + + /// + /// ڷ + /// + WindowStyle mStyle; + + }; + +} + +#endif
\ No newline at end of file diff --git a/source/Asura.Editor/type.h b/source/Asura.Editor/type.h new file mode 100644 index 0000000..d58cf87 --- /dev/null +++ b/source/Asura.Editor/type.h @@ -0,0 +1,30 @@ +#ifndef __ASURA_EDITOR_TYPE_H__ +#define __ASURA_EDITOR_TYPE_H__ + +#include <cstdlib> +#include <stdint.h> + +namespace AsuraEditor +{ + + typedef int8_t int8; + typedef uint8_t uint8; + //typedef uint8 byte; + typedef char byte; + typedef int16_t int16; + typedef uint16_t uint16; + typedef int32_t int32; + typedef uint32_t uint32; + typedef int64_t int64; + typedef uint64_t uint64; + + typedef uint32_t uint; + typedef int32_t sint; + + typedef std::size_t size_t; + + typedef const char cc8; + +} + +#endif
\ No newline at end of file |