// AsOptionListWnd.h : header file
//
#if !defined(_ASOPTIONLISTWND_H_)
#define _ASOPTIONLISTWND_H_

#include "AsOptionList.h"
#include "AsFontInfo.h"
#include "IAsOptionListListener.h"
#include "cmString.h"

class ICellListener;

/////////////////////////////////////////////////////////////////////////////
// CAsOptionListWnd window

class CAsOptionListWnd : public CWnd,
						 public IAsOptionListListener
{
// Construction
public:
	CAsOptionListWnd();

	// implementation of IAsOptionListListener
	//
	void OnInfoUpdate(const cmString& caption, const cmString& description);

// Attributes
public:

// Operations
public:
	CAsOptionList* GetOptionList();
	void SetFontInfo(const CAsFontInfo& fontInfo);
	void SetFontInfo(const cmString& fontName, int fontSize, bool fontBold);

	void SetCellListener(ICellListener* cellListener);

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CAsOptionListWnd)
	public:
	virtual BOOL Create(const RECT& rect, CWnd* pParentWnd, UINT nID = -1) ;
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CAsOptionListWnd();

	// Generated message map functions
protected:
	//{{AFX_MSG(CAsOptionListWnd)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnPaint();
	afx_msg void OnSetFocus(CWnd* pOldWnd);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP();

	void UpdateWindowSize();
	void DrawBackground(CDC* pDC);
	void DrawInfo(CDC* pDC);

	CAsOptionList* optionList_;
	CAsFontInfo* fontInfo_;

	COLORREF bkColor_;
	COLORREF borderColor_;

	CRect infoRect_;

	cmString caption_;
	cmString description_;

	ICellListener* cellListener_;
};

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

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

#endif // !defined(_ASOPTIONLISTWND_H_)
