//
//  status_display.h - status display header file
//
//  $Id: status_display.h 50 2014-02-07 02:18:02Z brian $ 
//
//  Copyright (c) 1999-2014 by Precision Micro Control Corp. All rights reserved.
//
#ifndef STATUS_DISPLAY_H
#define STATUS_DISPLAY_H

/// <summary>
/// Status display class
/// </summary>
class CStatusDisplay : public CFormView
{
	DECLARE_DYNCREATE(CStatusDisplay)

protected:
	/// <summary>Constructor (used by dynamic creation).</summary>
	CStatusDisplay();
	/// <summary>Destructor.</summary>
	virtual ~CStatusDisplay();

public:
	/// <summary>Update handler.</summary>
	/// <param name="pSender">Sender.</param>
	/// <param name="lHint">Hint data.</param>
	/// <param name="pHint">Hint object.</param>
	void						OnInitialUpdate();
	/// <summary>Initial update handler.</summary>
	void						OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
	
// Implementation
protected:
	/// <summary>DDX/DDV support.</summary>
	/// <param name="pDX">DDX/DDV data.</param>
	virtual void				DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	/// <summary>OnTimer message handler.</summary>
	/// <param name="nIDEvent">Timer ID.</param>
	afx_msg void				OnTimer(UINT nIDEvent);

// Form Data
public:
	enum { IDD = IDD_STATUS_DISPLAY };

private:
	CString						m_file_position;				///< file position
	CString						m_program_number;				///< program number
	CString						m_repeat_count;					///< repeat count
	CString						m_sequence_number;				///< sequence number
	CString						m_tool_number;					///< tool number

	CButton						m_mode_absolute;				///< absolute mode
	CButton						m_mode_incremental;				///< incremental mode
	
	CButton						m_option_block_skip;			///< block skip option
	CButton						m_option_dryrun;				///< dry run option

	CButton						m_status_program_error;			///< program error status
	CButton						m_status_estop;					///< estop status
	CButton						m_status_ext_estop;				///< external estop status
	CButton						m_status_drive_fault;			///< drive fault status
	CButton						m_status_motor_error;			///< motor error status
	
protected:
	DECLARE_MESSAGE_MAP()
};

#endif			// STATUS_DISPLAY_H
