Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
VegFieldsDlg.h
1 //
2 // Name: VegFieldsDlg.h
3 //
4 // Copyright (c) 2002-2011 Virtual Terrain Project
5 // Free for all uses, see license.txt for details.
6 //
7 
8 #ifndef __VegFieldsDlg_H__
9 #define __VegFieldsDlg_H__
10 
11 #include "VTBuilder_UI.h"
12 #include "vtdata/shapelib/shapefil.h"
13 #include "vtdata/MathTypes.h"
14 #include "VegPointOptions.h"
15 
16 class vtVegLayer;
17 
18 // WDR: class declarations
19 
20 //----------------------------------------------------------------------------
21 // VegFieldsDlg
22 //----------------------------------------------------------------------------
23 
25 {
26 public:
27  // constructors and destructors
28  VegFieldsDlg( wxWindow *parent, wxWindowID id, const wxString &title,
29  const wxPoint& pos = wxDefaultPosition,
30  const wxSize& size = wxDefaultSize,
31  long style = wxDEFAULT_DIALOG_STYLE );
32 
33  void SetShapefileName(const wxString &filename);
34  void SetVegLayer(vtVegLayer *pLayer) { m_pLayer = pLayer; }
35 
36  // WDR: method declarations for VegFieldsDlg
37  wxRadioButton* GetHeightRandom() { return (wxRadioButton*) FindWindow( ID_HEIGHT_RANDOM ); }
38  wxChoice* GetSpeciesChoice() { return (wxChoice*) FindWindow( ID_SPECIES_CHOICE ); }
39  wxRadioButton* GetUseSpecies() { return (wxRadioButton*) FindWindow( ID_USE_SPECIES ); }
40  wxRadioButton* GetBiotypeString() { return (wxRadioButton*) FindWindow( ID_BIOTYPE_STRING ); }
41  wxRadioButton* GetBiotypeInt() { return (wxRadioButton*) FindWindow( ID_BIOTYPE_INT ); }
42  wxRadioButton* GetCommonName() { return (wxRadioButton*) FindWindow( ID_COMMON_NAME ); }
43  wxRadioButton* GetSpeciesName() { return (wxRadioButton*) FindWindow( ID_SPECIES_NAME ); }
44  wxRadioButton* GetSpeciesId() { return (wxRadioButton*) FindWindow( ID_SPECIES_ID ); }
45  wxChoice* GetHeightField() { return (wxChoice*) FindWindow( ID_HEIGHT_FIELD ); }
46  wxChoice* GetSpeciesField() { return (wxChoice*) FindWindow( ID_SPECIES_FIELD ); }
47 
48 public:
49  VegPointOptions m_options;
50 
51 private:
52  // WDR: member variable declarations for VegFieldsDlg
53  vtVegLayer *m_pLayer;
54 
55  SHPHandle m_hSHP;
56  int m_nElem, m_nShapeType;
57  wxString m_filename;
58  uint m_iFields;
59 
60  bool m_bUseSpecies;
61  bool m_bSpeciesUseField;
62  bool m_bHeightRandomize;
63  bool m_bHeightFixed;
64  bool m_bHeightUseField;
65  float m_fFixedHeight;
66 
67  void RefreshEnabled();
68 
69 private:
70  // WDR: handler declarations for VegFieldsDlg
71  void OnRadio( wxCommandEvent &event );
72  void OnOK( wxCommandEvent &event );
73  void OnChoice2( wxCommandEvent &event );
74  void OnChoice1( wxCommandEvent &event );
75  void OnInitDialog(wxInitDialogEvent& event);
76 
77 private:
78  DECLARE_EVENT_TABLE()
79 };
80 
81 #endif // __VegFieldsDlg_H__
82