// BemInpDoc.h : interface of the CBemInpDoc class
//
/////////////////////////////////////////////////////////////////////////////
class CNode;
class CElement;
class CIntPoint;
class CIntElem;
class CWell;

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

// Attributes
public:
	void NewNods();
	CNode* AddNode (float x,float y);
	CNode* AddNode (CPoint p);
	CIntPoint* AddIntPt (float x,float y);
	CIntPoint* AddIntPt (CPoint p);
	CIntElem* GetIntElm(int i);
	CIntPoint* GetIntPt(int i);
	CElement* GetElement(int i);
	CNode* GetNode(int i);
	CWell* GetWell(int i);
	CSize GetDocSize();
	void PlotNod (CDC* pDC,int sz,BOOL IsNum);
	void PlotIntPt (CDC* pDC,int sz,BOOL IsNum);

// Operations
public:
	CSize m_size;
	CObArray Nodes,Elems,TriElems,IntNods,Wells;
	LOGFONT lfnt;
	CString name;
	float gcb[6],kx,ky,thick,precip;

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

// Implementation
public:
	void NewPoint();
	int FindWell(CPoint pt);
	void PlotWells (CDC *pDC,int sz);
	void DelElem(int in);
	int FindElem (CPoint p);
	void OpenPoints();
	void PlotElem(CDC* pDC,BOOL IsNum);
	CWell* AddWell (CString nam,float x,float y,float dis,float diam);
	CWell* AddWell (CString nam,CPoint pt,float dis,float diam);
	CElement* AddElement(int n1,int n2);
	void DelNode(int in);
	void DelWell(int in);
	void DelIntPt(int in);
	int FindNode(CPoint p);
	int FindIntPt(CPoint p);
	void OpenNods();
	void ScaleNods (CRect rc);
	virtual ~CBemInpDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CBemInpDoc)
	afx_msg void OnGeomCoef();
	afx_msg void OnGeomNodeSave();
	afx_msg void OnUpdateGeomNodeSave(CCmdUI* pCmdUI);
	afx_msg void OnInterSave();
	afx_msg void OnUpdateInterSave(CCmdUI* pCmdUI);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

	// Generated OLE dispatch map functions
	//{{AFX_DISPATCH(CBemInpDoc)
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_DISPATCH
	DECLARE_DISPATCH_MAP()
	DECLARE_INTERFACE_MAP()
};

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