Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
EphemDlg.h
1 //
2 // Name: EphemDlg.h
3 //
4 // Copyright (c) 2007-2011 Virtual Terrain Project
5 // Free for all uses, see license.txt for details.
6 //
7 
8 #ifndef __EphemDlg_H__
9 #define __EphemDlg_H__
10 
11 #include "EnviroUI.h"
12 #include "vtui/AutoDialog.h"
13 
14 // WDR: class declarations
15 
16 //----------------------------------------------------------------------------
17 // EphemDlg
18 //----------------------------------------------------------------------------
19 
20 class EphemDlg: public EphemDlgBase
21 {
22 public:
23  // constructors and destructors
24  EphemDlg( wxWindow *parent, wxWindowID id, const wxString &title,
25  const wxPoint& pos = wxDefaultPosition,
26  const wxSize& size = wxDefaultSize,
27  long style = wxDEFAULT_DIALOG_STYLE );
28 
29  // WDR: method declarations for EphemDlg
30  wxSlider* GetSliderDarkness() { return (wxSlider*) FindWindow( ID_SLIDER_AMBIENT_BIAS ); }
31  wxTextCtrl* GetDarkness() { return (wxTextCtrl*) FindWindow( ID_AMBIENT_BIAS ); }
32  wxCheckBox* GetShadows() { return (wxCheckBox*) FindWindow( ID_SHADOWS ); }
33  wxSlider* GetSliderFogDistance() { return (wxSlider*) FindWindow( ID_SLIDER_FOG_DISTANCE ); }
34  wxTextCtrl* GetFogDistance() { return (wxTextCtrl*) FindWindow( ID_FOG_DISTANCE ); }
35  wxComboBox* GetSkyTexture() { return (wxComboBox*) FindWindow( ID_SKYTEXTURE ); }
36  wxCheckBox* GetFog() { return (wxCheckBox*) FindWindow( ID_FOG ); }
37  wxStaticBitmap* GetColorBitmap() { return (wxStaticBitmap*) FindWindow( ID_COLOR3 ); }
38 
39  void UpdateEnableState();
40  void UpdateColorControl();
41  void ValuesToSliders();
42  void SlidersToValues();
43  void SetSliderControls();
44  void SetToScene();
45 
46  bool m_bSky;
47  wxString m_strSkyTexture;
48  bool m_bOceanPlane;
49  float m_fOceanPlaneLevel;
50  bool m_bHorizon;
51  // fog
52  bool m_bFog;
53  float m_fFogDistance;
54  // shadows
55  bool m_bShadows;
56  float m_fDarkness;
57  int m_iDarkness;
58  bool m_bShadowsEveryFrame;
59  bool m_bShadowLimit;
60  float m_fShadowRadius;
61 
62  wxColor m_BgColor;
63  int m_iWindDir;
64  float m_fWindSpeed;
65 
66 private:
67  // WDR: member variable declarations for EphemDlg
68  bool m_bSetting;
69 
70  int m_iFogDistance;
71  int m_iWindDirSlider;
72  int m_iWindSpeedSlider;
73 
74 private:
75  // WDR: handler declarations for EphemDlg
76  void OnSkyTexture( wxCommandEvent &event );
77  void OnFogDistance( wxCommandEvent &event );
78  void OnDarkness( wxCommandEvent &event );
79  void OnShadowLimit( wxCommandEvent &event );
80  void OnOceanPlaneOffset( wxCommandEvent &event );
81  void OnSliderFogDistance( wxCommandEvent &event );
82  void OnSliderDarkness( wxCommandEvent &event );
83  void OnSliderWindSpeed( wxCommandEvent &event );
84  void OnSliderWindDirection( wxCommandEvent &event );
85  void OnWindSpeed( wxCommandEvent &event );
86  void OnWindDirection( wxCommandEvent &event );
87  void OnBgColor( wxCommandEvent &event );
88  void OnCheckBox( wxCommandEvent &event );
89  void OnInitDialog(wxInitDialogEvent& event);
90 
91 private:
92  DECLARE_EVENT_TABLE()
93 };
94 
95 #endif