Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
FeatureTableDlg.h
1 //
2 // Name: FeatureTableDlg.h
3 //
4 // Copyright (c) 2002-2011 Virtual Terrain Project
5 // Free for all uses, see license.txt for details.
6 //
7 
8 #ifndef __FeatureTableDlg_H__
9 #define __FeatureTableDlg_H__
10 
11 #include "vtui_UI.h"
12 #include "AutoDialog.h"
13 #include "vtdata/Features.h"
14 
15 class vtFeatures;
16 
17 // WDR: class declarations
18 
19 //----------------------------------------------------------------------------
20 // FeatInfoDlg
21 //----------------------------------------------------------------------------
22 
24 {
25 public:
26  // constructors and destructors
27  FeatureTableDlg( wxWindow *parent, wxWindowID id, const wxString &title,
28  const wxPoint& pos = wxDefaultPosition,
29  const wxSize& size = wxDefaultSize,
30  long style = wxDEFAULT_DIALOG_STYLE );
31 
32  void SetFeatureSet(vtFeatureSet *pFeatures);
33  vtFeatureSet *GetFeatureSet() { return m_pFeatures; }
34  void Clear();
35  void ShowSelected();
36  void ShowPicked();
37  void ShowAll();
38  void ShowFeature(int iFeat);
39  void UpdateFeatureText(int iItem, int iFeat);
40  void RefreshItems();
41  bool EditValue(int iFeature, int iColumn);
42 
43  virtual void OnModified() {}
44  virtual void RefreshViz() {}
45  virtual void OnFeatureDelete(vtFeature *f) {}
46  virtual void OnFieldEdited(uint iIndex) {}
47  virtual void OnEditEnd() {}
48 
49  // WDR: method declarations for FeatInfoDlg
50  wxStaticText* GetTextVertical() { return (wxStaticText*) FindWindow( ID_TEXT_VERTICAL ); }
51  wxButton* GetDelHigh() { return (wxButton*) FindWindow( ID_DEL_HIGH ); }
52  wxChoice* GetChoiceVertical() { return (wxChoice*) FindWindow( ID_CHOICE_VERTICAL ); }
53  wxChoice* GetChoiceShow() { return (wxChoice*) FindWindow( ID_CHOICE_SHOW ); }
54  wxListCtrl* GetList() { return (wxListCtrl*) FindWindow( ID_LIST ); }
55 
56 protected:
57  void UpdateTitle();
58 
59  // WDR: member variable declarations for FeatInfoDlg
60  vtFeatureSet *m_pFeatures;
61  int m_iShow;
62  int m_iVUnits;
63  int m_iCoordColumns;
64 
65  bool m_bGeo; // true if coordinates are geographic (lon-lat)
66 
67 private:
68  // WDR: handler declarations for FeatInfoDlg
69  void OnItemRightClick( wxListEvent &event );
70  void OnLeftDClick( wxMouseEvent &event );
71  void OnDeleteHighlighted( wxCommandEvent &event );
72  void OnChoiceVertical( wxCommandEvent &event );
73  void OnChoiceShow( wxCommandEvent &event );
74  void OnListRightClick( wxListEvent &event );
75  void OnItemSelected( wxListEvent &event );
76  void OnInitDialog(wxInitDialogEvent& event);
77 
78 private:
79  DECLARE_EVENT_TABLE()
80 };
81 
82 #endif // __FeatureTableDlg_H__
83