Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
PropDlg.h
1 //
2 // Name: PropDlg.h
3 //
4 // Copyright (c) 2002-2011 Virtual Terrain Project
5 // Free for all uses, see license.txt for details.
6 //
7 
8 #ifndef __PropDlg_H__
9 #define __PropDlg_H__
10 
11 #include "CManager_UI.h"
12 #include "vtdata/vtString.h"
13 
14 class vtItem;
15 class vtModel;
16 
17 // WDR: class declarations
18 
19 //----------------------------------------------------------------------------
20 // PropPanel
21 //----------------------------------------------------------------------------
22 
23 class PropPanel: public PropPanelBase
24 {
25 public:
26  // constructors and destructors
27  PropPanel( wxWindow *parent, wxWindowID id = -1,
28  const wxPoint& pos = wxDefaultPosition,
29  const wxSize& size = wxDefaultSize,
30  long style = wxTAB_TRAVERSAL | wxNO_BORDER );
31 
32  // WDR: method declarations for PropDlg
33  wxListCtrl* GetTaglist() { return (wxListCtrl*) FindWindow( ID_TAGLIST ); }
34  wxChoice* GetTypeChoice() { return (wxChoice*) FindWindow( ID_TYPECHOICE ); }
35  wxChoice* GetSubtypeChoice() { return (wxChoice*) FindWindow( ID_SUBTYPECHOICE ); }
36  void SetCurrentItem(vtItem *item);
37  void UpdateFromControls();
38  void UpdateTagList();
39  void UpdateSubtypes();
40 
41 private:
42  // WDR: member variable declarations for PropDlg
43  struct Pair { vtString type, subtype; };
44  std::vector<Pair> m_types;
45 
46  wxString m_strItem;
47  wxString m_strType, m_strSubtype;
48  vtItem *m_pCurrentItem;
49  wxListCtrl *m_pTagList;
50  wxChoice *m_pTypeChoice;
51  wxChoice *m_pSubtypeChoice;
52  bool m_bUpdating;
53 
54 private:
55  // WDR: handler declarations for PropDlg
56  void OnTagEdit( wxCommandEvent &event );
57  void OnRemoveTag( wxCommandEvent &event );
58  void OnAddTag( wxCommandEvent &event );
59  void OnChoiceType( wxCommandEvent &event );
60  void OnChoiceSubtype( wxCommandEvent &event );
61  void OnTextItem( wxCommandEvent &event );
62  void OnInitDialog(wxInitDialogEvent& event);
63 
64 private:
65  DECLARE_EVENT_TABLE()
66 };
67 
68 #endif // __PropDlg_H__