| 1 | /* |
| 2 | * Descent 3 |
| 3 | * Copyright (C) 2024 Parallax Software |
| 4 | * |
| 5 | * This program is free software: you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation, either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | |
| 18 | --- HISTORICAL COMMENTS FOLLOW --- |
| 19 | |
| 20 | * $Logfile: /descent3/main/editor/GrWnd.h $ |
| 21 | * $Revision: 1.1.1.1 $ |
| 22 | * $Date: 2003-08-26 03:57:38 $ |
| 23 | * $Author: kevinb $ |
| 24 | * |
| 25 | * Base class of all GrWnds. |
| 26 | * |
| 27 | * $Log: not supported by cvs2svn $ |
| 28 | * |
| 29 | * 10 2/03/97 5:58p Matt |
| 30 | * Added missing include |
| 31 | * |
| 32 | * 9 1/30/97 6:26p Samir |
| 33 | * Attempt to implement change in caption bar drawing. |
| 34 | * |
| 35 | * 8 1/23/97 4:56p Samir |
| 36 | * Added Static window style constant |
| 37 | * |
| 38 | * 7 1/21/97 12:47p Samir |
| 39 | * Added OnSize and GRWND_STYLE constant to adjust window look. |
| 40 | * |
| 41 | * $NoKeywords: $ |
| 42 | */ |
| 43 | |
| 44 | #ifndef M_GRWND_H |
| 45 | #define M_GRWND_H |
| 46 | |
| 47 | #include "gr.h" |
| 48 | #include "stdafx.h" |
| 49 | |
| 50 | const DWORD GRWND_STYLE = WS_VISIBLE | WS_CHILD | WS_CAPTION | WS_CLIPSIBLINGS | WS_THICKFRAME | WS_SYSMENU; |
| 51 | const DWORD GRWND_STATIC_STYLE = WS_VISIBLE | WS_CHILD | WS_BORDER; |
| 52 | |
| 53 | ///////////////////////////////////////////////////////////////////////////// |
| 54 | // CGrWnd window |
| 55 | |
| 56 | class CGrWnd : public CWnd { |
| 57 | // Construction |
| 58 | public: |
| 59 | CGrWnd(const char *name); |
| 60 | |
| 61 | // Attributes |
| 62 | public: |
| 63 | // Operations |
| 64 | public: |
| 65 | // Overrides |
| 66 | // ClassWizard generated virtual function overrides |
| 67 | //{{AFX_VIRTUAL(CGrWnd) |
| 68 | protected: |
| 69 | virtual BOOL PreCreateWindow(CREATESTRUCT &cs); |
| 70 | //}}AFX_VIRTUAL |
| 71 | |
| 72 | // Implementation |
| 73 | public: |
| 74 | virtual ~CGrWnd(); |
| 75 | |
| 76 | // Generated message map functions |
| 77 | protected: |
| 78 | //{{AFX_MSG(CGrWnd) |
| 79 | afx_msg void OnDestroy(); |
| 80 | afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); |
| 81 | afx_msg void OnMove(int x, int y); |
| 82 | afx_msg void OnSize(UINT nType, int cx, int cy); |
| 83 | afx_msg BOOL OnNcActivate(BOOL bActive); |
| 84 | afx_msg void OnNcPaint(); |
| 85 | afx_msg void OnChildActivate(); |
| 86 | //}}AFX_MSG |
| 87 | DECLARE_MESSAGE_MAP() |
| 88 | |
| 89 | // Variables |
| 90 | protected: |
| 91 | grScreen *m_grScreen; // screen belonging to window |
| 92 | grViewport *m_grViewport; // Viewport belonging to window |
| 93 | char m_Name[32]; // screen window name |
| 94 | |
| 95 | BOOL m_grCreated; // Create/Destroyed window |
| 96 | BOOL m_Active; // is it active? |
| 97 | |
| 98 | private: |
| 99 | void DrawCaption(BOOL active); |
| 100 | }; |
| 101 | |
| 102 | ///////////////////////////////////////////////////////////////////////////// |
| 103 | #endif |