#if !defined(AFX_LIGHTWND_H__E6569C80_83ED_11D3_8E25_00105A17BC83__INCLUDED_)
#define AFX_LIGHTWND_H__E6569C80_83ED_11D3_8E25_00105A17BC83__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// LightWnd.h : header file
//

#include <MLR\MLRLight.hpp>

class EditorLight;
/////////////////////////////////////////////////////////////////////////////
// CLightWnd dialog

class CLightWnd : public CDialog
{
// Construction
public:
	CLightWnd(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CLightWnd)
	enum { IDD = IDD_LIGHTDLG };
	CSpinButtonCtrl	m_AngleSpin;
	CEdit	m_AngleEdit;
	CSpinButtonCtrl	m_OuterRadiusSpin;
	CSpinButtonCtrl	m_ZSpin;
	CSpinButtonCtrl	m_YawSpin;
	CSpinButtonCtrl	m_YSpin;
	CSpinButtonCtrl	m_XSpin;
	CSpinButtonCtrl	m_RollSpin;
	CSpinButtonCtrl	m_PitchSpin;
	CSpinButtonCtrl	m_InnerRadiusSpin;
	CEdit	m_OuterRadius;
	CEdit	m_ZEdit;
	CEdit	m_RollEdit;
	CEdit	m_YawEdit;
	CEdit	m_YEdit;
	CEdit	m_XEdit;
	CEdit	m_PitchEdit;
	CEdit	m_InnerRadiusEdit;
	CSliderCtrl	m_RedSlider;
	CSliderCtrl	m_GreenSlider;
	CSliderCtrl	m_BlueSlider;
	CEdit	m_RedEdit;
	CEdit	m_GreenEdit;
	CEdit	m_BlueEdit;
	//}}AFX_DATA

	Scalar
		oldRed;
	Scalar
		oldGreen;
	Scalar
		oldBlue;

	Scalar
		curRed;
	Scalar
		curGreen;
	Scalar
		curBlue;

	LinearMatrix4D
		worldMatrix;


	void SetLight(EditorLight* Light);
	EditorLight* GetLight() {return light;}

	void SetWorldMatrix();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CLightWnd)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	EditorLight*
		light;

	void UpdateControls();

	// Generated message map functions
	//{{AFX_MSG(CLightWnd)
	afx_msg void OnMyok();
	virtual void OnCancel();
	afx_msg void OnReleasedcaptureRedslider(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnReleasedcaptureGreenslider(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnReleasedcaptureBlueslider(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnReset();
	virtual BOOL OnInitDialog();
	afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnKillfocusEditinnerradius();
	afx_msg void OnKillfocusEditlightpitch();
	afx_msg void OnKillfocusEditlightroll();
	afx_msg void OnKillfocusEditlightx();
	afx_msg void OnKillfocusEditlighty();
	afx_msg void OnKillfocusEditlightyaw();
	afx_msg void OnKillfocusEditlightz();
	afx_msg void OnKillfocusEditoutterradius();
	afx_msg void OnDeltaposSpininnerradius(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDeltaposSpinlightpitch(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDeltaposSpinlightroll(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDeltaposSpinlightx(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDeltaposSpinlighty(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDeltaposSpinlightyaw(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDeltaposSpinlightz(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDeltaposSpinouterradius(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDeltaposSpinangle(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnKillfocusEditangle();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_LIGHTWND_H__E6569C80_83ED_11D3_8E25_00105A17BC83__INCLUDED_)
