Descent3/editor/GrWnd.h

104 lines
2.7 KiB
C
Raw Normal View History

/*
2024-06-15 18:12:48 +00:00
* Descent 3
* Copyright (C) 2024 Parallax Software
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
--- HISTORICAL COMMENTS FOLLOW ---
* $Logfile: /descent3/main/editor/GrWnd.h $
* $Revision: 1.1.1.1 $
* $Date: 2003-08-26 03:57:38 $
* $Author: kevinb $
*
2024-06-15 18:12:48 +00:00
* Base class of all GrWnds.
*
* $Log: not supported by cvs2svn $
2024-06-15 18:12:48 +00:00
*
* 10 2/03/97 5:58p Matt
* Added missing include
2024-06-15 18:12:48 +00:00
*
* 9 1/30/97 6:26p Samir
* Attempt to implement change in caption bar drawing.
2024-06-15 18:12:48 +00:00
*
* 8 1/23/97 4:56p Samir
* Added Static window style constant
2024-06-15 18:12:48 +00:00
*
* 7 1/21/97 12:47p Samir
2024-06-15 18:12:48 +00:00
* Added OnSize and GRWND_STYLE constant to adjust window look.
*
* $NoKeywords: $
*/
#ifndef M_GRWND_H
#define M_GRWND_H
#include "gr.h"
#include "stdafx.h"
2024-06-15 18:12:48 +00:00
const DWORD GRWND_STYLE = WS_VISIBLE | WS_CHILD | WS_CAPTION | WS_CLIPSIBLINGS | WS_THICKFRAME | WS_SYSMENU;
const DWORD GRWND_STATIC_STYLE = WS_VISIBLE | WS_CHILD | WS_BORDER;
/////////////////////////////////////////////////////////////////////////////
// CGrWnd window
2024-06-15 18:12:48 +00:00
class CGrWnd : public CWnd {
// Construction
public:
2024-06-15 18:12:48 +00:00
CGrWnd(const char *name);
2024-06-15 18:12:48 +00:00
// Attributes
public:
2024-06-15 18:12:48 +00:00
// Operations
public:
2024-06-15 18:12:48 +00:00
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CGrWnd)
protected:
virtual BOOL PreCreateWindow(CREATESTRUCT &cs);
//}}AFX_VIRTUAL
2024-06-15 18:12:48 +00:00
// Implementation
public:
2024-06-15 18:12:48 +00:00
virtual ~CGrWnd();
2024-06-15 18:12:48 +00:00
// Generated message map functions
protected:
2024-06-15 18:12:48 +00:00
//{{AFX_MSG(CGrWnd)
afx_msg void OnDestroy();
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnMove(int x, int y);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg BOOL OnNcActivate(BOOL bActive);
afx_msg void OnNcPaint();
afx_msg void OnChildActivate();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
// Variables
protected:
2024-06-15 18:12:48 +00:00
grScreen *m_grScreen; // screen belonging to window
grViewport *m_grViewport; // Viewport belonging to window
char m_Name[32]; // screen window name
2024-06-15 18:12:48 +00:00
BOOL m_grCreated; // Create/Destroyed window
BOOL m_Active; // is it active?
private:
2024-06-15 18:12:48 +00:00
void DrawCaption(BOOL active);
};
/////////////////////////////////////////////////////////////////////////////
#endif