/***************************************************************************
**
**    $Header:   D:/ECB2S/SRC/LOG/SPATDOC.H__   1.2.1.4   17 Apr 1997 16:00:08   ZJRD  $
**
**    $Log:   D:/ECB2S/SRC/LOG/SPATDOC.H__  $
** 
**    Rev 1.2.1.4   17 Apr 1997 16:00:08   ZJRD
** No change.
** 
**    Rev 1.2.1.3   16 Apr 1997 10:32:58   ZJRD
** No change.
** 
**    Rev 1.2.1.2   10 Apr 1997 15:42:32   ZJRD
** No change.
** 
**    Rev 1.2.1.1   03 Apr 1997 15:21:16   ZJRD
** No change.
** 
**    Rev 1.2.1.0   28 Mar 1997 10:25:28   ZJRD
** easy pack sld 2.09d
** 
**    Rev 1.1   19 Mar 1997 11:35:26   ZJRD
** No change.
** 
**    Rev 1.0   12 Mar 1997 14:49:56   ZJRD
** Initial revision.
** 
**    Rev 1.0.1.0   11 Nov 1996 12:59:38   ZJRD
** EasyPack/SLD Version 2.01
** 
**    Rev 1.4   09 Sep 1996 13:18:48   ZJRD
** No change.
** 
**    Rev 1.3   05 Sep 1996 11:30:20   ZJRD
** No change.
** 
**    Rev 1.2   02 Sep 1996 09:57:24   ZJRD
** No change.
** 
**    Rev 1.1   28 Aug 1996 15:52:40   ZJRD
** EasyPack/SLD Version 1.9b
** 
**    Rev 1.0   12 Aug 1996 10:56:06   ZJRD
** Initial revision.
** 
****************************************************************************/

/////////////////////////////////////////////////////////////////////////////
//
//  File name: SPATDOC.H
//
//  Description: The header file for the class: CSpaCodeTextDoc.
//
//  Author: Chen Jun
//
//  Date: 06/19/96
//
//  Modification:
//      1. 06/19/96, Initial version of the class: CSpaCodeTextDoc.
//
//  Copyright (C) 1996 Microtek International. All rights reserved.
//
/////////////////////////////////////////////////////////////////////////////
#ifndef _SPATDOC_H_
#define _SPATDOC_H_


/////////////////////////////////////////////////////////////////////////////
// CSpaTextDoc document

class CSpaTextDoc : public CDocument
{
    DECLARE_SERIAL(CSpaTextDoc)
protected:
	CSpaTextDoc();			// protected constructor used by dynamic creation

// Attributes
public:
	CObList* m_pLineList;

private:
	int m_nMaxLine;
	int m_nMaxLength;
	
private:
	COVERAGEGETINFO m_CodeData;

// Operations
public:
	CSize GetTotalSize(void) const;	// cx: max line & cy: max length
	void UpdateDocument(const CString& strFile);
	
public:
	void SetCoverageData(const COVERAGEGETINFO& CodeData);

private:
	BOOL IsGrayedLine(int nLine) const;

// Overrides
public:

protected:
	virtual	BOOL OnNewDocument();

// Implementation
public:
	virtual ~CSpaTextDoc();
	virtual void Serialize(CArchive& ar);	// overridden for document i/o
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	// Generated message map functions
protected:
	//{{AFX_MSG(CSpaTextDoc)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#endif
