Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
ImportStructDlg.h
1 //
2 // Name: ImportStructDlg.h
3 //
4 // Copyright (c) 2003-2011 Virtual Terrain Project
5 // Free for all uses, see license.txt for details.
6 //
7 
8 #ifndef __ImportStructDlg_H__
9 #define __ImportStructDlg_H__
10 
11 #include "VTBuilder_UI.h"
12 #include "vtdata/StructArray.h"
13 
14 // WDR: class declarations
15 
16 //----------------------------------------------------------------------------
17 // ImportStructDlg
18 //----------------------------------------------------------------------------
19 
21 {
22 public:
23  // constructors and destructors
24  ImportStructDlg( 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 ImportStructDlg
30  wxRadioButton* GetRadioColorFixed() { return (wxRadioButton*) FindWindow( ID_RADIO_COLOR_FIXED ); }
31  wxRadioButton* GetRadioColorDefault() { return (wxRadioButton*) FindWindow( ID_RADIO_COLOR_DEFAULT ); }
32  wxButton* GetColorBuilding() { return (wxButton*) FindWindow( ID_SET_COLOR1 ); }
33  wxButton* GetColorRoof() { return (wxButton*) FindWindow( ID_SET_COLOR2 ); }
34  wxStaticBitmap* GetColorBitmapBuilding() { return (wxStaticBitmap*) FindWindow( ID_COLOR3 ); }
35  wxStaticBitmap* GetColorBitmapRoof() { return (wxStaticBitmap*) FindWindow( ID_COLOR4 ); }
36  wxSpinCtrl* GetEdgeDeg() { return (wxSpinCtrl*) FindWindow( ID_SLOPECNTR ); }
37  wxChoice* GetChoiceRoofField() { return (wxChoice*) FindWindow( ID_CHOICE_ROOF_FIELD ); }
38  wxChoice* GetChoiceRoofType() { return (wxChoice*) FindWindow( ID_CHOICE_ROOF_TYPE ); }
39  wxRadioButton* GetRadioRoofField() { return (wxRadioButton*) FindWindow( ID_RADIO_ROOF_FIELD ); }
40  wxRadioButton* GetRadioRoofSingle() { return (wxRadioButton*) FindWindow( ID_RADIO_ROOF_SINGLE ); }
41  wxRadioButton* GetRadioRoofDefault() { return (wxRadioButton*) FindWindow( ID_RADIO_ROOF_DEFAULT ); }
42  wxChoice* GetChoiceHeightType() { return (wxChoice*) FindWindow( ID_CHOICE_HEIGHT_TYPE ); }
43  wxChoice* GetChoiceHeightField() { return (wxChoice*) FindWindow( ID_CHOICE_HEIGHT_FIELD ); }
44  wxChoice* GetChoiceFileField() { return (wxChoice*) FindWindow( ID_CHOICE_FILE_FIELD ); }
45  wxRadioButton* GetTypeInstance() { return (wxRadioButton*) FindWindow( ID_TYPE_INSTANCE ); }
46  wxRadioButton* GetTypeLinear() { return (wxRadioButton*) FindWindow( ID_TYPE_LINEAR ); }
47  wxRadioButton* GetTypeFootprint() { return (wxRadioButton*) FindWindow( ID_TYPE_FOOTPRINT ); }
48  wxRadioButton* GetTypeCenter() { return (wxRadioButton*) FindWindow( ID_TYPE_CENTER ); }
49  void SetFileName(const wxString &str) { m_filename = str; }
50  void CopyToOptions();
51  void UpdateEnables();
52  bool GetRadio(int id);
53  void UpdateColorControl(bool select);
54 
55  int m_nShapeType;
56  int m_iType; // 0 = linear, 1 = instance, 2 = center, 3 = footprint
57  int m_iHeightType; // 0 = stories, 1 = meters, 2 = feet
58  int m_iRoofType; // 0 = flat, 1 = shed, 2 = gable, 3 = hip
59  int m_iRoofMode; // 0 = default, 1 = single, 2 = from field
60 
61 public:
62  StructImportOptions m_opt;
63 
64 private:
65  // WDR: member variable declarations for ImportStructDlg
66  wxString m_filename;
67  wxString m_defaults_filename;
68 
69 private:
70  // WDR: handler declarations for ImportStructDlg
71  void OnChoiceFileField( wxCommandEvent &event );
72  void OnChoiceHeightField( wxCommandEvent &event );
73  void OnChoiceHeightType( wxCommandEvent &event );
74  void OnChoiceRoofType( wxCommandEvent &event );
75  void OnChoiceRoofField( wxCommandEvent &event );
76  void OnRadio( wxCommandEvent &event );
77  void OnInitDialog(wxInitDialogEvent& event);
78 
79  wxStaticBitmap *m_pColorBitmapRoof;
80  wxStaticBitmap *m_pColorBitmapBuilding;
81  wxColour m_ColorR;
82  wxColour m_ColorB;
83 
84  void OnChoiceSlopeType( wxCommandEvent &event );
85  void OnTextRoofDegrees( wxCommandEvent &event );
86  void OnSpinRoofDegrees( wxSpinEvent &event );
87  void OnColorRoof( wxCommandEvent &event );
88  void OnColorBuilding( wxCommandEvent &event );
89 
90 private:
91  DECLARE_EVENT_TABLE()
92 };
93 
94 #endif
95