diff options
Diffstat (limited to 'Editor/GUI')
-rw-r--r-- | Editor/GUI/EditorWindows.cpp | 10 | ||||
-rw-r--r-- | Editor/GUI/EditorWindows.h | 22 |
2 files changed, 20 insertions, 12 deletions
diff --git a/Editor/GUI/EditorWindows.cpp b/Editor/GUI/EditorWindows.cpp index 18f2e3a..00c573a 100644 --- a/Editor/GUI/EditorWindows.cpp +++ b/Editor/GUI/EditorWindows.cpp @@ -14,7 +14,7 @@ void RegisterWindowClasses() {
s_ContainerWindowClassAtom = winutils::RegisterWindowClass(kContainerWindowClassName, ContainnerWindow::ContainerWndProc, CS_HREDRAW | CS_VREDRAW); s_PopupWindowClassAtom = winutils::RegisterWindowClass(kPopupWindowClassName, ContainnerWindow::ContainerWndProc, CS_HREDRAW | CS_VREDRAW | CS_DROPSHADOW);//CS_HREDRAW宽度(水平)变化时重绘、CS_VREDRAW高度(垂直)变化时重绘 - s_GUIViewClassAtom = winutils::RegisterWindowClass(kViewportClassName, Viewport::ViewportWndProc, CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS); + s_GUIViewClassAtom = winutils::RegisterWindowClass(kViewportClassName, GUIView::GUIViewWndProc, CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS); }
LRESULT CALLBACK ContainnerWindow::ContainerWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
@@ -156,9 +156,15 @@ void ContainnerWindow::Init(Rectf pixelRect, int showMode, const Vector2f& minSi }
-LRESULT CALLBACK Viewport::ViewportWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
+//------------------------------------------------------------------------------------------------------------------
+
+LRESULT CALLBACK GUIView::GUIViewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
long flag = DefWindowProcW(hWnd, message, wParam, lParam); return flag; } +void GUIView::DoPaint() +{
+ +}
\ No newline at end of file diff --git a/Editor/GUI/EditorWindows.h b/Editor/GUI/EditorWindows.h index ca1c059..a78e163 100644 --- a/Editor/GUI/EditorWindows.h +++ b/Editor/GUI/EditorWindows.h @@ -2,7 +2,7 @@ #define EDITOR_WINDOW_H #include <windows.h> -#include "../../Runtime/Math/Rect.h" +#include "Runtime/Math/Rect.h" void RegisterWindowClasses(); @@ -29,22 +29,24 @@ public: private: HWND m_Window; POINT m_Size; - ShowMode m_ShowMode; - bool m_IsClosing; - bool m_InMenuLoop; - bool m_CloseFromScriptDontShutdown; - Rectf m_InternalRect; - POINT m_MinSize; - POINT m_MaxSize; + ShowMode m_ShowMode; // 窗口类型 + bool m_IsClosing; + bool m_InMenuLoop; + bool m_CloseFromScriptDontShutdown; + Rectf m_InternalRect; + POINT m_MinSize; + POINT m_MaxSize; }; // 窗口内的单个子窗口,是事件相应、绘制、布局的单元 -class Viewport +class GUIView { public: - static LRESULT CALLBACK ViewportWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); + static LRESULT CALLBACK GUIViewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); + + void DoPaint(); private: HWND m_View; |