//
//  part_view.h - part view class header file
//
//  $Id: part_view.h 47 2014-02-07 01:02:55Z brian $ 
//
//  Copyright (c) 1999-2014 by Precision Micro Control Corp. All rights reserved.
//
#ifndef PART_VIEW_H
#define PART_VIEW_H

/// <summary>
/// PartView object
/// </summary>
class CPartView : public CEditView
{
	DECLARE_DYNCREATE(CPartView)

protected: 
	/// <summary>Constructor (create from serialization only).</summary>
	CPartView() {}

public:
	/// <summary>Destructor.</summary>
	virtual ~CPartView() {}

	/// <summary>Get document.</summary>
	/// <returns>Pointer to document.</returns>
	CPart*						GetDocument();
	/// <summary>Drawingf handler.</summary>
	/// <param name="pDC">Device context.</param>
	virtual void				OnDraw(CDC* pDC);  // overridden to draw this view

#ifdef _DEBUG
	/// <summary>Debug view check handler.</summary>
	virtual void				AssertValid() const { CEditView::AssertValid(); }
	/// <summary>Debug context dump handler.</summary>
	virtual void				Dump(CDumpContext& dc) const { CEditView::Dump(dc); }
#endif

protected:
	/// <summary>Prepare to print.</summary>
	/// <param name="pInfo">Printer info.</param>
	/// <returns>TRUE on success, FALSE on failure.</returns>
	virtual BOOL				OnPreparePrinting(CPrintInfo* pInfo);
	/// <summary>Begin printing.</summary>
	/// <param name="pDC">Device context.</param>
	/// <param name="pInfo">Printer info.</param>
	virtual void				OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	/// <summary>End printing.</summary>
	/// <param name="pDC">Device context.</param>
	/// <param name="pInfo">Printer info.</param>
	virtual void				OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);

// Generated message map functions
protected:
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in partvw.cpp
	inline CPart*				CPartView::GetDocument() { return reinterpret_cast<CPart*>(m_pDocument); }
#endif

#endif			// PART_VIEW_H
