diff --git a/doc/软件工程泛读报告.docx b/doc/软件工程泛读报告.docx index e69de29..ae7511d 100644 Binary files a/doc/软件工程泛读报告.docx and b/doc/软件工程泛读报告.docx differ diff --git a/src/PowerEditor/src/WinControls/Window.h b/src/PowerEditor/src/WinControls/Window.h index 57a45c7..dd7bdfc 100644 --- a/src/PowerEditor/src/WinControls/Window.h +++ b/src/PowerEditor/src/WinControls/Window.h @@ -15,48 +15,51 @@ // along with this program. If not, see . +//´úÂëÕûÌåʵÏÖÁËÒ»¸ö´´½¨ºÍÏú»Ù´°¿ÚµÄ¹¦ÄÜ +//ÔÚVerticalFileSwitcherListView.h¡¢URLCtrl.h¡¢TreeView.h¡¢ToolTip.hµÈÎļþÀï¶¼ÒýÓÃÁËWindow.h +//»ù±¾ÉÏÖ»ÒªÊǻᵯ³ö´°¿ÚµÄ¹¦Äܶ¼ÐèÒªÒýÓôËÍ·Îļþ #pragma once #include -class Window +class Window//¶¨ÒåÁËÒ»¸ö´°¿ÚÀ࣬°üÀ¨ÁË´°¿ÚµÄ³õʼ»¯¡¢Ïú»Ù¡¢ÏÔʾ¡¢ÖØ»æµÈ²Ù×÷ { public: //! \name Constructors & Destructor //@{ - Window() = default; - Window(const Window&) = delete; - virtual ~Window() = default; + Window() = default;// ĬÈϹ¹Ô캯Êý + Window(const Window&) = delete;// ½ûÓÿ½±´¹¹Ô캯Êý + virtual ~Window() = default;// ĬÈÏÎö¹¹º¯Êý //@} - + // ³õʼ»¯´°¿Ú virtual void init(HINSTANCE hInst, HWND parent) { _hInst = hInst; _hParent = parent; } - virtual void destroy() = 0; + virtual void destroy() = 0;// Ïú»Ù´°¿Ú - virtual void display(bool toShow = true) const + virtual void display(bool toShow = true) const// ÏÔʾ»òÒþ²Ø´°¿Ú { ::ShowWindow(_hSelf, toShow ? SW_SHOW : SW_HIDE); } - + // µ÷Õû´°¿Ú´óС²¢Öػ洰¿ÚÄÚÈÝ virtual void reSizeTo(RECT & rc) // should NEVER be const !!! { ::MoveWindow(_hSelf, rc.left, rc.top, rc.right, rc.bottom, TRUE); redraw(); } - + // µ÷Õû´°¿Ú´óС£¨´«Èë¿í¶ÈºÍ¸ß¶È£©²¢Öػ洰¿ÚÄÚÈÝ virtual void reSizeToWH(RECT& rc) // should NEVER be const !!! { ::MoveWindow(_hSelf, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, TRUE); redraw(); } - + // ÖØ»æ´°¿ÚÄÚÈÝ virtual void redraw(bool forceUpdate = false) const { ::InvalidateRect(_hSelf, nullptr, TRUE); @@ -64,24 +67,24 @@ public: ::UpdateWindow(_hSelf); } - + // »ñÈ¡´°¿Ú¿Í»§Çø¾ØÐÎ virtual void getClientRect(RECT & rc) const { ::GetClientRect(_hSelf, &rc); } - + // »ñÈ¡´°¿Ú¾ØÐÎ virtual void getWindowRect(RECT & rc) const { ::GetWindowRect(_hSelf, &rc); } - + // »ñÈ¡´°¿Ú¿í¶È virtual int getWidth() const { RECT rc; ::GetClientRect(_hSelf, &rc); return (rc.right - rc.left); } - + // »ñÈ¡´°¿Ú¸ß¶È virtual int getHeight() const { RECT rc; @@ -90,7 +93,7 @@ public: return (rc.bottom - rc.top); return 0; } - + // Åжϴ°¿ÚÊÇ·ñ¿É¼û virtual bool isVisible() const { return (::IsWindowVisible(_hSelf)?true:false);