Quake-III-Arena

Quake III Arena GPL Source Release
Log | Files | Refs

RadiantView.cpp (3459B)


      1 /*
      2 ===========================================================================
      3 Copyright (C) 1999-2005 Id Software, Inc.
      4 
      5 This file is part of Quake III Arena source code.
      6 
      7 Quake III Arena source code is free software; you can redistribute it
      8 and/or modify it under the terms of the GNU General Public License as
      9 published by the Free Software Foundation; either version 2 of the License,
     10 or (at your option) any later version.
     11 
     12 Quake III Arena source code is distributed in the hope that it will be
     13 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 GNU General Public License for more details.
     16 
     17 You should have received a copy of the GNU General Public License
     18 along with Foobar; if not, write to the Free Software
     19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
     20 ===========================================================================
     21 */
     22 // RadiantView.cpp : implementation of the CRadiantView class
     23 //
     24 
     25 #include "stdafx.h"
     26 #include "Radiant.h"
     27 
     28 #include "RadiantDoc.h"
     29 #include "RadiantView.h"
     30 
     31 #ifdef _DEBUG
     32 #define new DEBUG_NEW
     33 #undef THIS_FILE
     34 static char THIS_FILE[] = __FILE__;
     35 #endif
     36 
     37 /////////////////////////////////////////////////////////////////////////////
     38 // CRadiantView
     39 
     40 IMPLEMENT_DYNCREATE(CRadiantView, CView)
     41 
     42 BEGIN_MESSAGE_MAP(CRadiantView, CView)
     43 	//{{AFX_MSG_MAP(CRadiantView)
     44 		// NOTE - the ClassWizard will add and remove mapping macros here.
     45 		//    DO NOT EDIT what you see in these blocks of generated code!
     46 	//}}AFX_MSG_MAP
     47 	// Standard printing commands
     48 	ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
     49 	ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
     50 	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
     51 END_MESSAGE_MAP()
     52 
     53 /////////////////////////////////////////////////////////////////////////////
     54 // CRadiantView construction/destruction
     55 
     56 CRadiantView::CRadiantView()
     57 {
     58 	// TODO: add construction code here
     59 
     60 }
     61 
     62 CRadiantView::~CRadiantView()
     63 {
     64 }
     65 
     66 BOOL CRadiantView::PreCreateWindow(CREATESTRUCT& cs)
     67 {
     68 	// TODO: Modify the Window class or styles here by modifying
     69 	//  the CREATESTRUCT cs
     70 
     71 	return CView::PreCreateWindow(cs);
     72 }
     73 
     74 /////////////////////////////////////////////////////////////////////////////
     75 // CRadiantView drawing
     76 
     77 void CRadiantView::OnDraw(CDC* pDC)
     78 {
     79 	CRadiantDoc* pDoc = GetDocument();
     80 	ASSERT_VALID(pDoc);
     81 
     82 	// TODO: add draw code for native data here
     83 }
     84 
     85 /////////////////////////////////////////////////////////////////////////////
     86 // CRadiantView printing
     87 
     88 BOOL CRadiantView::OnPreparePrinting(CPrintInfo* pInfo)
     89 {
     90 	// default preparation
     91 	return DoPreparePrinting(pInfo);
     92 }
     93 
     94 void CRadiantView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
     95 {
     96 	// TODO: add extra initialization before printing
     97 }
     98 
     99 void CRadiantView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
    100 {
    101 	// TODO: add cleanup after printing
    102 }
    103 
    104 /////////////////////////////////////////////////////////////////////////////
    105 // CRadiantView diagnostics
    106 
    107 #ifdef _DEBUG
    108 void CRadiantView::AssertValid() const
    109 {
    110 	CView::AssertValid();
    111 }
    112 
    113 void CRadiantView::Dump(CDumpContext& dc) const
    114 {
    115 	CView::Dump(dc);
    116 }
    117 
    118 CRadiantDoc* CRadiantView::GetDocument() // non-debug version is inline
    119 {
    120 	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CRadiantDoc)));
    121 	return (CRadiantDoc*)m_pDocument;
    122 }
    123 #endif //_DEBUG
    124 
    125 /////////////////////////////////////////////////////////////////////////////
    126 // CRadiantView message handlers