#if !defined(AFX_DLGTIMESERIES_H__B67A1924_FFDD_4596_A894_F588FD47732A__INCLUDED_)
#define AFX_DLGTIMESERIES_H__B67A1924_FFDD_4596_A894_F588FD47732A__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DlgTimeSeries.h : header file
//

#include "6046DryEnd.h"
#include "SplitWnd.h"
#include "DlgSimpleInput.h"

/////////////////////////////////////////////////////////////////////////////
// CDlgTimeSeries dialog

class CDlgTimeSeries : public CDialog
{
// Construction
public:
	CDlgTimeSeries(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CDlgTimeSeries)
	enum { IDD = IDD_DLG_TIMESERIES };
	CComboBox	m_ctrlUpdateRate;
	CButton	m_ctrlChkRollRt;
	CButton	m_ctrlChkRoll;
	CButton	m_ctrlChkPitchRt;
	CButton	m_ctrlChkPitch;
	CButton	m_ctrlChkNorthRt;
	CButton	m_ctrlChkEastRt;
	CButton	m_ctrlChkDepthRt;
	CStatic	m_ctrlRollRt;
	CStatic	m_ctrlRoll;
	CStatic	m_ctrlPitchRt;
	CStatic	m_ctrlPitch;
	CStatic	m_ctrlColorNorthRt;
	CStatic	m_ctrlColorEastRt;
	CStatic	m_ctrlColorDepthRt;
	//}}AFX_DATA

	CxSplitterWnd			m_wndSplitter;
	CMenu					m_AttitudeMenu;

	
	CAttitudeCtrl			*m_pTimeSeries1;
	CAttitudeCtrl			*m_pTimeSeries2;
	
	int						angle;
	
	void					AddRoll				(	float	roll );
	void					AddPitch			(	float	pitch );
	void					AddRollRate			(	float	rollRate );
	void					AddPitchRate		(	float	pitchRate );
	void					AddEastRate			(	float	eastRate );
	void					AddNorthRate		(	float	northRate );
	void					AddDepthRate		(	float	depthRate );

	void					AddGroup			(	NBlueFin7kMessages::PBLUEFINRECORDTYPEHEADER	pRecHdr,
													NBlueFin7kMessages::PBLUEFINNAVIGATIONMESSAGE   pNavFrame );

	BOOL					bRoll;
	BOOL					bPitch;
	BOOL					bRollRate;
	BOOL					bPitchRate;
	BOOL					bEastRate;
	BOOL					bNorthRate;
	BOOL					bDepthRate;


	//PBLUEFINRECORDTYPEHEADER	m_pBlueFinRecHeader;
	//PBLUEFINNAVIGATIONFRAME	m_pBlueFinNavFrame;
	//BLUEFINNAVIGATIONMESSAGE	msgBlue;

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDlgTimeSeries)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CDlgTimeSeries)
	virtual BOOL OnInitDialog();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
	afx_msg void OnColorsettingsPitchdisplayAxes();
	afx_msg void OnColorsettingsPitchdisplayBackground();
	afx_msg void OnScalePitchdisplay5();
	afx_msg void OnScalePitchdisplay15();
	afx_msg void OnScalePitchdisplay30();
	afx_msg void OnScalePitchdisplay45();
	afx_msg void OnScalePitchdisplay90();
	afx_msg void OnScalePitchdisplay180();
	afx_msg void OnSettingsRolldisplayAxes();
	afx_msg void OnSettingsRolldisplayBackground();
	afx_msg void OnScaleRolldisplay5();
	afx_msg void OnScaleRolldisplay15();
	afx_msg void OnScaleRolldisplay30();
	afx_msg void OnScaleRolldisplay45();
	afx_msg void OnScaleRolldisplay90();
	afx_msg void OnScaleRolldisplay180();
	afx_msg void OnScalePitchdisplayOther();
	afx_msg void OnScaleRolldisplayOther();
	afx_msg void OnColorsettingsPitchdisplayText();
	afx_msg void OnColorsettingsRolldisplayText();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnDestroy();
	afx_msg void OnPaint();
	afx_msg void OnColorsettingsRolldisplayHistoryPitch();
	afx_msg void OnColorsettingsRolldisplayHistoryPitchrate();
	afx_msg void OnColorsettingsRolldisplayHistoryRoll();
	afx_msg void OnColorsettingsRolldisplayHistoryRollrate();
	afx_msg void OnColorsettingsTimeseries2HistoryDepthrate();
	afx_msg void OnColorsettingsTimeseries2HistoryEastingrate();
	afx_msg void OnColorsettingsTimeseries2HistoryNorthingrate();
	afx_msg void OnCheckdepthrt();
	afx_msg void OnCheckeastrt();
	afx_msg void OnChecknorthrt();
	afx_msg void OnCheckpitch();
	afx_msg void OnCheckpitchrt();
	afx_msg void OnCheckroll();
	afx_msg void OnCheckrollrt();
	afx_msg void OnSelchangeComboUpdaterate();
	afx_msg void OnClose();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

	CRect			m_rWndStart, m_rWndSized, m_rCtrlStart;
	CSize			m_szDeltas; 
	POINT			m_ptMinWndSize; //MIN SIZE FOR WINDOW

private:
	
	CSystemConfig	*m_pConfig;

	COLORREF		m_clrTS1_Line1;
	COLORREF		m_clrTS1_Line2;
	COLORREF		m_clrTS1_Line3;
	COLORREF		m_clrTS1_Line4;
	COLORREF		m_clrTS2_Line1;
	COLORREF		m_clrTS2_Line2;
	COLORREF		m_clrTS2_Line3;
	COLORREF		m_clrTS1_BK;
	COLORREF		m_clrTS1_AXIS;
	COLORREF		m_clrTS1_FONT;	
	COLORREF		m_clrTS2_BK;
	COLORREF		m_clrTS2_AXIS;
	COLORREF		m_clrTS2_FONT;

	UINT			m_uiTS1_Scale;
	UINT			m_uiTS2_Scale;

	DWORD			m_dwLastCheckScale1;
	DWORD			m_dwLastCheckScale2;


	NBlueFin7kMessages::BLUEFINRECORDTYPEHEADER	   m_RecHdr;
	NBlueFin7kMessages::BLUEFINNAVIGATIONMESSAGE   m_NavFrame; 
	
	void			SaveSettings			(	void );

	void			LoadSettings			(	void );

	void			SetColorIndicators		(	void );

	void			ClearAllMenusChecks		(	void );
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DLGTIMESERIES_H__B67A1924_FFDD_4596_A894_F588FD47732A__INCLUDED_)
