// BemStreamDoc.h : interface of the CBemStreamDoc class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_BEMSTREAMDOC_H__D0F571ED_2718_11D3_AB1D_C28AB2B45E0B__INCLUDED_)
#define AFX_BEMSTREAMDOC_H__D0F571ED_2718_11D3_AB1D_C28AB2B45E0B__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CNode;
class CElement;
class CIntPoint;
class CIntElem;
class CWell;
class CStrPoint;
class CStream;
class CStamp;

class CBemStreamDoc : public CDocument
{
protected: // create from serialization only
	CBemStreamDoc();
	DECLARE_DYNCREATE(CBemStreamDoc)

// Attributes
public:
	CIntElem* GetIntElem(int i);
	CIntPoint* GetIntPt(int i);
	CElement* GetElement(int i);
	CNode* GetNode(int i);
	CWell* GetWell(int i);
	void PlotIntPt (CDC* pDC,int sz,BOOL IsNum);
	void PlotNod (CDC* pDC,int sz,BOOL IsNum);
	void PlotWells(CDC *td,int sz);
	void PlotElem (CDC *td,BOOL IsNum);
	int TestWells (CStrPoint* pt,int nwl);
	void Stream (CDC& td,CStream* str,float orient);
	void Veloc (double& vx,double& vy,float xb,float yb);
	void InVel (double xp,double yp,double x1,double y1,double x2,double y2,double& hx,double& hy,double& gx,double& gy,double tt);
	CSize GetDocSize();

// Operations
public:
	CObArray Nodes,Elems,TriElems,IntNods,Wells,Streams,Stamps;
	LOGFONT lfnt;
	CString name;
	float kx,ky,thick,efpo,precip,gcb[6],rprec,tx,ty,txy,tt,tp,delt;
	int nel,nwl,ntri;
	CSize m_size;

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CBemStreamDoc)
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	virtual void DeleteContents();
	virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
	//}}AFX_VIRTUAL

// Implementation
public:
	void ChangeFont();
	void ReadStamps (CFile* hf);
	void InpStamp();
	void PlotStream (CDC* pDC,int iscz,int iscc,int sz);
	void AddStreamWell(CDC& dc,CPoint pt,int nstr);
	void ScaleNodes(CRect rc);
	CStamp* GetStamp(int i);
	CStamp* AddStamp(float x,float y,float tm);
	CStamp* AddStamp(CStamp *st);
	CStream* GetStream(int i);
	CStream* AddStream (CPoint p,int iw);
	CStream* AddStream(float x,float y,int iw);
	virtual ~CBemStreamDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CBemStreamDoc)
	afx_msg void OnSaveStream();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_BEMSTREAMDOC_H__D0F571ED_2718_11D3_AB1D_C28AB2B45E0B__INCLUDED_)
