Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
InstanceDlg.h
1 //
2 // InstanceDlg.h
3 //
4 // Copyright (c) 2003-2011 Virtual Terrain Project
5 // Free for all uses, see license.txt for details.
6 //
7 
8 #ifndef __InstanceDlg_H__
9 #define __InstanceDlg_H__
10 
11 #include "vtui_UI.h"
12 #include "AutoDialog.h"
13 #include "vtdata/Projections.h"
14 #include "vtdata/Content.h"
15 
16 // WDR: class declarations
17 
18 //----------------------------------------------------------------------------
19 // InstanceDlg
20 //----------------------------------------------------------------------------
21 
23 {
24 public:
25  // constructors and destructors
26  InstanceDlg( wxWindow *parent, wxWindowID id, const wxString &title,
27  const wxPoint& pos = wxDefaultPosition,
28  const wxSize& size = wxDefaultSize,
29  long style = wxDEFAULT_DIALOG_STYLE );
30 
31  void ClearContent();
32  void AddContent(vtContentManager *mng);
33 
34  void SetProjection(const vtProjection &proj) { m_proj = proj; }
35  void SetLocation(const DPoint2 &pos);
36 // wxString GetPath() { return GetModelFile()->GetValue(); }
37  vtTagArray *GetTagArray();
38 
39  // WDR: method declarations for InstanceDlg
40  wxTextCtrl* GetLocation() { return (wxTextCtrl*) FindWindow( ID_LOCATION ); }
41  wxButton* GetBrowseModelFile() { return (wxButton*) FindWindow( ID_BROWSE_MODEL_FILE ); }
42  wxTextCtrl* GetModelFile() { return (wxTextCtrl*) FindWindow( ID_MODEL_FILE ); }
43  wxChoice* GetChoiceItem() { return (wxChoice*) FindWindow( ID_CHOICE_ITEM ); }
44  wxChoice* GetChoiceType() { return (wxChoice*) FindWindow( ID_CHOICE_TYPE ); }
45  wxChoice* GetChoiceFile() { return (wxChoice*) FindWindow( ID_CHOICE_FILE ); }
46  wxRadioButton* GetRadioModel() { return (wxRadioButton*) FindWindow( ID_RADIO_MODEL ); }
47  wxRadioButton* GetRadioContent() { return (wxRadioButton*) FindWindow( ID_RADIO_CONTENT ); }
48 
49 private:
50  // WDR: member variable declarations for InstanceDlg
51  DPoint2 m_pos;
52  vtProjection m_proj;
53  bool m_bContent;
54  int m_iManager;
55  int m_iItem;
56  vtTagArray m_dummy;
57 
58 private:
59  // WDR: handler declarations for InstanceDlg
60  void OnLocationText( wxCommandEvent &event );
61  void OnBrowseModelFile( wxCommandEvent &event );
62  void OnChoice( wxCommandEvent &event );
63  void OnChoiceItem( wxCommandEvent &event );
64  void OnRadio( wxCommandEvent &event );
65  void OnInitDialog(wxInitDialogEvent& event);
66 
67  void UpdateLoc();
68  void UpdateEnabling();
69  void UpdateContentItems();
70 
71  std::vector<vtContentManager*> m_contents;
72  vtContentManager *Current();
73 
74 private:
75  DECLARE_EVENT_TABLE()
76 };
77 
78 #endif // __InstanceDlg_H__
79