306 lines
8.3 KiB
C++
306 lines
8.3 KiB
C++
/*
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
// Description : LightDia.hpp
|
|
//
|
|
// Dialog edition the waypoints
|
|
//
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
//
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
// Creation date: 11 feb 1997 Author: J Thénoz
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
// Modification date: Author:
|
|
//
|
|
//
|
|
//
|
|
//
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
*/
|
|
|
|
|
|
#ifndef LIGHTDIA_HPP
|
|
#define LIGHTDIA_HPP
|
|
|
|
class Light;
|
|
class Light_Interface;
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// DiaLight dialog
|
|
|
|
class DiaLight : public CFormView
|
|
{
|
|
protected:
|
|
Light* m_poLight;
|
|
Light_Interface* m_pInterface;
|
|
BOOL m_bUpdate; // to avoid several dialog that check the validity of the edit control
|
|
BOOL m_bNearHasFocus;
|
|
BOOL m_bFarHasFocus;
|
|
BOOL m_bNearFarTab;
|
|
BOOL m_bNameEditHasFocus;
|
|
BOOL m_bIntensityEditHasFocus;
|
|
BOOL m_bREditHasFocus;
|
|
BOOL m_bGEditHasFocus;
|
|
BOOL m_bBEditHasFocus;
|
|
BOOL m_bAEditHasFocus;
|
|
//CHINA WFQ (MT) 16/02/98 {
|
|
BOOL m_bMaxXHasFocus;
|
|
BOOL m_bMinXHasFocus;
|
|
BOOL m_bMaxYHasFocus;
|
|
BOOL m_bMinYHasFocus;
|
|
BOOL m_bMaxZHasFocus;
|
|
BOOL m_bMinZHasFocus;
|
|
BOOL m_bInterExtraTab;
|
|
BOOL m_bAlphaTab;
|
|
//ENDCHINA WFQ }
|
|
|
|
//ANNECY jt {
|
|
BOOL m_bFogNearHasFocus;
|
|
BOOL m_bFogFarHasFocus;
|
|
BOOL m_bFogInfiniteHasFocus;
|
|
BOOL m_bFogBlendNearHasFocus;
|
|
BOOL m_bFogBlendFarHasFocus;
|
|
//ENDANNECY }
|
|
|
|
// Construction
|
|
public:
|
|
DiaLight(CWnd* pParent = NULL); // standard constructor
|
|
DECLARE_DYNCREATE ( DiaLight );
|
|
|
|
void fn_vInitDialog (Light_Interface* pInterface); // jack's function to init the dialog
|
|
//ROMTEAM BlendRLI (Ionut Grozea 24/02/98)
|
|
void fn_vInitType();
|
|
//ENDROMTEAM BlendRLI (Ionut Grozea)
|
|
void fn_vEdit (Light* poLight);
|
|
Light* fn_pGetEditLight (void) { return m_poLight; }
|
|
BOOL fn_bIsEditSpot (Light* poLight) { return m_poLight==poLight; }
|
|
void fn_vRefreshDialog (void);
|
|
void fn_vSetColor (void);
|
|
void fn_vGetColor (void);
|
|
void fn_vSetOnOff (Light* poLight);
|
|
void fn_vClicSector (CPA_BaseObject* poSector);
|
|
void fn_vInitOnOff (void);
|
|
// Dialog Data
|
|
//{{AFX_DATA(DiaLight)
|
|
enum { IDD = IDD_SPOT_DIALOG };
|
|
CStatic m_cMin_Z;
|
|
CStatic m_cMin_Y;
|
|
CStatic m_cMin_X;
|
|
CStatic m_cMax_Z;
|
|
CStatic m_cMax_Y;
|
|
CStatic m_cMax_X;
|
|
CSliderCtrl m_oASlider;
|
|
CSliderCtrl m_oIntensitySlider;
|
|
CStatic m_oNearStatic;
|
|
CStatic m_oFarStatic;
|
|
CTabCtrl m_oTabControl;
|
|
CSliderCtrl m_oFarSlider;
|
|
CSliderCtrl m_oNearSlider;
|
|
CButton m_oSee;
|
|
CButton m_oDisplayAllControl;
|
|
CListBox m_SectorList;
|
|
CSliderCtrl m_oBSlider;
|
|
CSliderCtrl m_oRSlider;
|
|
CSliderCtrl m_oGSlider;
|
|
float m_fBValue;
|
|
float m_fGValue;
|
|
float m_fRValue;
|
|
CString m_csEditName;
|
|
float m_fFarValue;
|
|
float m_fNearValue;
|
|
float m_fIntensity;
|
|
float m_fAValue;
|
|
float m_Max_X;
|
|
float m_Max_Z;
|
|
float m_Max_Y;
|
|
float m_Min_X;
|
|
float m_Min_Y;
|
|
float m_Min_Z;
|
|
float m_Get_Max_x;
|
|
float m_Get_Max_y;
|
|
float m_Get_Max_z;
|
|
float m_Get_Max_X;
|
|
float m_Get_Max_Y;
|
|
float m_Get_Max_Z;
|
|
float m_Get_Min_x;
|
|
float m_Get_Min_y;
|
|
float m_Get_Min_z;
|
|
float m_Get_Min_X;
|
|
float m_Get_Min_Y;
|
|
float m_Get_Min_Z;
|
|
float m_Get_Min_I;
|
|
float m_Get_Max_I;
|
|
float m_fFogBlendFar;
|
|
float m_fFogBlendNear;
|
|
float m_fFogFar;
|
|
float m_fFogInfinite;
|
|
float m_fFogNear;
|
|
//}}AFX_DATA
|
|
|
|
|
|
// Overrides
|
|
// ClassWizard generated virtual function overrides
|
|
//{{AFX_VIRTUAL(DiaLight)
|
|
protected:
|
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
|
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
|
|
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext);
|
|
virtual void OnDestroy();
|
|
//}}AFX_VIRTUAL
|
|
|
|
// Implementation
|
|
protected:
|
|
HICON m_hIcon;
|
|
// BOOL OnCommand(WPARAM wParam, LPARAM lParam);
|
|
|
|
// Generated message map functions
|
|
//{{AFX_MSG(DiaLight)
|
|
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
|
|
afx_msg void OnPaint();
|
|
afx_msg HCURSOR OnQueryDragIcon();
|
|
afx_msg void OnKillfocusLightBEdit();
|
|
afx_msg void OnKillfocusLightGEdit();
|
|
afx_msg void OnKillfocusLightREdit();
|
|
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
|
|
afx_msg void OnLightColorDefinition();
|
|
afx_msg void OnLightAmbientButton();
|
|
afx_msg void OnLightDisplayAll();
|
|
afx_msg void OnLightAffectAll();
|
|
afx_msg void OnSelchangeLightSectorList();
|
|
afx_msg void OnLightSEE();
|
|
afx_msg void OnLightDefault();
|
|
afx_msg void OnKillfocusLightNameEdit();
|
|
afx_msg void OnKillfocusLightFarEdit();
|
|
afx_msg void OnKillfocusLightNearEdit();
|
|
afx_msg void OnSetfocusLightFarEdit();
|
|
afx_msg void OnSetfocusLightNearEdit();
|
|
afx_msg void OnSelchangeLightTab(NMHDR* pNMHDR, LRESULT* pResult);
|
|
afx_msg void OnLightRealRadio();
|
|
afx_msg void OnLightRliRadio();
|
|
afx_msg void OnSetfocusLightNameEdit();
|
|
afx_msg void OnLightOnRadio();
|
|
afx_msg void OnLightOffRadio();
|
|
afx_msg void OnKillfocusLightIntensityEdit();
|
|
afx_msg void OnSetfocusLightIntensityEdit();
|
|
afx_msg void OnKillfocusLightAEdit();
|
|
afx_msg void OnLightActiveOffRadio();
|
|
afx_msg void OnLightActiveOnRadio();
|
|
afx_msg void OnSetfocusLightAEdit();
|
|
afx_msg void OnSetfocusLightBEdit();
|
|
afx_msg void OnSetfocusLightGEdit();
|
|
afx_msg void OnSetfocusLightREdit();
|
|
afx_msg void OnMapOffRadio();
|
|
afx_msg void OnMapOnRadio();
|
|
afx_msg void OnSetfocusMaxXEdit();
|
|
afx_msg void OnSetfocusMaxYEdit();
|
|
afx_msg void OnSetfocusMaxZEdit();
|
|
afx_msg void OnSetfocusMinXEdit();
|
|
afx_msg void OnSetfocusMinYEdit();
|
|
afx_msg void OnSetfocusMinZEdit();
|
|
afx_msg void OnKillfocusMinZEdit();
|
|
afx_msg void OnKillfocusMinYEdit();
|
|
afx_msg void OnKillfocusMinXEdit();
|
|
afx_msg void OnKillfocusMaxZEdit();
|
|
afx_msg void OnKillfocusMaxYEdit();
|
|
afx_msg void OnKillfocusMaxXEdit();
|
|
afx_msg void OnButtonNormal();
|
|
afx_msg void OnButtonPaint();
|
|
afx_msg void OnButtonBack();
|
|
afx_msg void OnButtonRealLight();
|
|
afx_msg void OnKillfocusBlendFarEdit();
|
|
afx_msg void OnSetfocusBlendFarEdit();
|
|
afx_msg void OnKillfocusBlendNearEdit();
|
|
afx_msg void OnSetfocusBlendNearEdit();
|
|
afx_msg void OnKillfocusFarEdit();
|
|
afx_msg void OnSetfocusFarEdit();
|
|
afx_msg void OnKillfocusInfiniteEdit();
|
|
afx_msg void OnSetfocusInfiniteEdit();
|
|
afx_msg void OnKillfocusNearEdit();
|
|
afx_msg void OnSetfocusNearEdit();
|
|
afx_msg void OnButtonComputeAll();
|
|
//ROMTEAM color lights Ionut Grozea 10-08-1998
|
|
afx_msg void OnButtonMode();
|
|
//ENDROMTEAM color lights Ionut Grozea 10-08-1998
|
|
afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
|
|
//}}AFX_MSG
|
|
DECLARE_MESSAGE_MAP()
|
|
void fn_vInitSlider (void);
|
|
void fn_vInitTabControl (void);
|
|
void fn_vInitNearFarValue (void);
|
|
void fn_vCheckLimit (void);
|
|
//CHINA WFQ (MT) 16/02/98 {
|
|
void fn_vInitAlphaValue(void);
|
|
void fn_vInitInternalValue(void);
|
|
void fn_vInitExternalValue(void);
|
|
void fn_vInitIntensityValue(void);
|
|
//ENDCHINA WFQ }
|
|
|
|
//ANNECY jt {
|
|
void fn_vInitFogValue (void);
|
|
//ENDANNECY jt }
|
|
|
|
// sector management
|
|
void fn_vRefreshSectorList (void);
|
|
void fn_vChangeSectorList (void);
|
|
|
|
// intensity
|
|
void fn_vSetIntensity (void);
|
|
|
|
// name edit
|
|
void fn_vInitEditName (void);
|
|
|
|
float fn_iSlider2Value ( int iSlider );
|
|
int fn_lValue2Slider ( float fValue );
|
|
void fn_vSetNearFar (void);
|
|
|
|
//CHINA WFQ (MT) 16/02/98 {
|
|
void fn_vSetMaxXYZ (void);
|
|
void fn_vSetMaxxyz (void);
|
|
void fn_vSetMinXYZ (void);
|
|
void fn_vSetMinxyz (void);
|
|
void fn_vSetMinMaxI (void);
|
|
//ENDCHINA WFQ }
|
|
//ROMTEAM parallel box Ionut Grozea 1-08-1998
|
|
void fn_vSetxyzXYZ (void);
|
|
//ROMTEAM parallel box Ionut Grozea 1-08-1998
|
|
// icons
|
|
void fn_vDisplayIcon (void);
|
|
|
|
protected:
|
|
void fn_vDisplayFogControl (BOOL bState);
|
|
void fn_vSwapLightTab();
|
|
void fn_vDisplayInternalExternalControls(BOOL _bShow );
|
|
void fn_vDisplayNearFarControls(BOOL _bShow );
|
|
void fn_vDisplayCommonControls(BOOL _bShow );
|
|
void fn_vDisplayCommonIcons(int _iState );
|
|
|
|
};
|
|
|
|
|
|
|
|
//ROMTEAM Color edition Ionut Grozea 1-08-1998
|
|
class DiaColor : public CColorDialog
|
|
{
|
|
public:
|
|
DiaColor(DiaLight * pDiaLight){ ::CColorDialog();m_pDiaLight=pDiaLight;};
|
|
DiaLight *m_pDiaLight;
|
|
void RestoreDefaultColor();
|
|
//{{AFX_VIRTUAL(DiaColor)
|
|
protected:
|
|
virtual BOOL OnInitDialog();
|
|
virtual void OnOK();
|
|
//}}AFX_MSG
|
|
|
|
};
|
|
|
|
|
|
//ROMTEAM Color edition Ionut Grozea 1-08-1998
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|