#if !defined(AFX_DLGWATERFALL_H__71C2DF86_90DB_44D6_8E3E_53999C29914D__INCLUDED_)
#define AFX_DLGWATERFALL_H__71C2DF86_90DB_44D6_8E3E_53999C29914D__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DlgWaterfall.h : header file
//
#include <afxmt.h>
#include <deque>
#include "6046DryEnd.h"
#include "DSDib.h"
#include "WaterfallDisplay.h"
#include "DlgWFProperties.h"
using namespace std;

#define MAX_PING_BYTES 65536

/////////////////////////////////////////////////////////////////////////////
// CDlgWaterfall dialog

class CDlgWaterfall : public CDialog
{
// Construction
public:
	
	CDlgWaterfall(CWnd* pParent = NULL);   // standard constructor
	
	BOOL				AddNewProfile				(	BYTE				*data, 
														int					size );
	
	void				SetType						(	DISPLAY_TYPE		type );

	void				Refresh						(	void );
	void				Cleanup						(	void );

	CWaterfallDisplay	m_SSWindow;
	CDlgWFProperties	m_dlgProperties;
	CMenu				m_wndMenu;

	UINT				m_uiBrightness;
	UINT				m_uiContrast;

// Dialog Data
	//{{AFX_DATA(CDlgWaterfall)
	enum { IDD = IDD_DLG_WATERFALL };
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDlgWaterfall)
	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(CDlgWaterfall)
	afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
	afx_msg void OnDestroy();
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnPaletteBlue();
	afx_msg void OnPaletteGreen();
	afx_msg void OnPaletteRed();
	afx_msg void OnPaletteGreyscale();
	afx_msg void OnPaletteInversegrey();
	afx_msg void OnPaletteMix2();
	afx_msg void OnPaletteOther();
	afx_msg void OnPaletteRust();
	afx_msg void OnImageBrightness();
	afx_msg void OnScalingMean();
	afx_msg void OnScalingPeak();
	afx_msg void OnScalingRms();
	afx_msg void OnUpdateScalingMean(CCmdUI* pCmdUI);
	afx_msg void OnPaletteSoil();
	afx_msg void OnClose();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

	CRect				m_rWndStart, m_rWndSized,  m_rCtrlStart, m_rCtrlSized;
	CSize				m_szDeltas;

private:
	void				SaveSettings				(	void );
	void				LoadSettings				(	void );
	void				RampColor					(	void );

	void				SyncPaletteMenu				(	void );
	void				SyncScalingMenu				(	void );

	BYTE				buff[510];
	
	BOOL				m_bProperties;
	BOOL				m_bSizing;
	POINT				m_ptMinWndSize;

	CSystemConfig		*pConfig;
	
	DISPLAY_TYPE		m_InternalID;
	EPaletteType		m_Palette;
	EScalingMode		m_Scaling;
	//POINT				m_ptUpperLeft;
	CRect				m_WindowRect;
	
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DLGWATERFALL_H__71C2DF86_90DB_44D6_8E3E_53999C29914D__INCLUDED_)
