SmaugWizard/Backup/
SmaugWizard/Backup/L/
SmaugWizard/Boards/
SmaugWizard/Building/
SmaugWizard/Corpses/
SmaugWizard/Councils/
SmaugWizard/Deity/
SmaugWizard/Gods/
SmaugWizard/MudProgs/
SmaugWizard/Player/L/
SmaugWizard/Src/
SmaugWizard/Src/res/
/****************************************************************************
 * [S]imulated [M]edieval [A]dventure multi[U]ser [G]ame      |				*
 * -----------------------------------------------------------|   \\._.//	*
 * SmaugWizard (C) 1998 by Russ Pillsbury (Windows NT version)|   (0...0)	*
 * -----------------------------------------------------------|    ).:.(	*
 * SMAUG (C) 1994, 1995, 1996 by Derek Snider                 |    {o o}	*
 * -----------------------------------------------------------|   / ' ' \	*
 * SMAUG code team: Thoric, Altrag, Blodkai, Narn, Haus,      |~'~.VxvxV.~'~*
 * Scryn, Swordbearer, Rennard, Tricops, and Gorog.           |				*
 * ------------------------------------------------------------------------ *
 * Merc 2.1 Diku Mud improvments copyright (C) 1992, 1993 by Michael        *
 * Chastain, Michael Quan, and Mitchell Tse.                                *
 * Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer,          *
 * Michael Seifert, Hans Henrik Staerfeldt, Tom Madsen, and Katja Nyboe.    *
 * ------------------------------------------------------------------------ *
 *			    SmaugWizView Interface file									*
 ****************************************************************************/

class	CAutoStart;			// forward declaration

class CSmaugWizView : public CScrollView
{
protected: // create from serialization only
	CSmaugWizView();
	DECLARE_DYNCREATE(CSmaugWizView)

// Attributes
public:
	CSmaugWizDoc* GetDocument();

// Operations
public:
	CRect	RowToWndRect (CDC* pDC, int nRow);

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSmaugWizView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual void OnInitialUpdate();
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
	virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
	//}}AFX_VIRTUAL

// Implementation
public:
				~CSmaugWizView ();
	void		CalculateRowMetrics (CDC* pDC)
				{ GetRowWidthHeight (pDC, m_nRowWidth, m_nRowHeight); }
	void		UpdateScrollSizes ();
	void		GetRowWidthHeight (CDC* pDC, int& Width, int& Height);
	int			RowToYPos(int nRow) { return (nRow * m_nRowHeight); }
	void		OnDrawRow (CDC* pDC, int Row, int y);
	void		RectLPtoRowRange(const CRect& rect, int& FirstRow,
								 int& LastRow,
								 BOOL bIncludePartiallyShownRows);

	int		m_nPrevRowCount;
	int		m_nRowWidth;            // width of row in current device units
	int		m_nRowHeight;           // height of row in current device untis
	CAutoStart	*m_pTimerDlg;

#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CSmaugWizView)
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in SmaugWizView.cpp
inline CSmaugWizDoc* CSmaugWizView::GetDocument()
   { return (CSmaugWizDoc*)m_pDocument; }
#endif

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