RadiantView.cpp 3.4 KB

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