/*************************************************************************\
* "$RCSfile: CDlgLog.hpp,v $"                                             *
***************************************************************************
* Information by CVS or VSS:                                              *
*     Last check in on: $Date: 2011-10-24 07:56:45 $                      *
*     by                $Author: schluckebier $
*     Revision        : $Revision: 1.11 $                                 *
\*************************************************************************/
/*! \file CDlgLog.hpp
*	\brief Header CDlgLog Class
**************************************************************************/

/*************************************************************************/
/*! @brief Dialog class to view and save the log.

	The user can scroll up and down in the log and can save the log to a
	text file on the SD card.\n
	CDlgLog is modal.
**************************************************************************/
class CDlgLog: public CDlg
{
protected:
	//! @brief Dialog identifier of CDlgLog.
	//!
	//! They are reused as array index together with the INDEX() and ICON() macros.
	enum eDlgLog_ID
	{
		// 0x100 <= ICON <= 0x1FF
		ID_UP = 0x100,	//!< Up button
		ID_DOWN,		//!< Down button
		ID_XXX,			//!< End marker

		ID_OK,			//!< Back button
		ID_SAVE,		//!< Save button
		ID_SB			//!< \e SelectBox which displays the log text
	};

private:
	CDlgLog(int x, int y, int Width, int Height);
	~CDlgLog();
	static CDlgLog *m_pThis;

public:
	static CDlgLog *CreateInstance(int x, int y, int Width, int Height);
	//! Gets CDlgLog instance.
	static CDlgLog *GetInstance() { return m_pThis; }
	static void DisposeInstance();
	int OnUserIO(int nKey);

protected:
	int m_Sel;			//!< Selection of \e SelectBox
};

/*************************************************************************/
