Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
SceneGraphDlg.h
1 //
2 // Name: SceneGraphDlg.h
3 //
4 // Copyright (c) 2001-2011 Virtual Terrain Project
5 // Free for all uses, see license.txt for details.
6 //
7 
8 #ifndef __SceneGraphDlg_H__
9 #define __SceneGraphDlg_H__
10 
11 #include "wx/imaglist.h"
12 #include "wxosg_UI.h"
13 
14 // WDR: class declarations
15 
16 //----------------------------------------------------------------------------
17 // SceneGraphDlg
18 //----------------------------------------------------------------------------
19 
21 {
22 public:
23  // constructors and destructors
24  SceneGraphDlg( wxWindow *parent, wxWindowID id, const wxString &title,
25  const wxPoint& pos = wxDefaultPosition,
26  const wxSize& size = wxDefaultSize,
27  long style = wxDEFAULT_DIALOG_STYLE );
28  ~SceneGraphDlg();
29 
30  void RefreshTreeContents();
31 
32 protected:
33  // WDR: method declarations for SceneGraphDlg
34  wxButton* GetZoomto() { return (wxButton*) FindWindow( ID_ZOOMTO ); }
35  wxCheckBox* GetEnabled() { return (wxCheckBox*) FindWindow( ID_ENABLED ); }
36  wxTreeCtrl* GetScenetree() { return (wxTreeCtrl*) FindWindow( ID_SCENETREE ); }
37 
38  void CreateImageList(int size = 16);
39  void AddNodeItemsRecursively(wxTreeItemId hParentItem, osg::Node *pNode, int depth);
40  void AddEnginesRecursively(wxTreeItemId hParentItem, vtEngine *pEng, int depth);
41 private:
42  // WDR: member variable declarations for SceneGraphDlg
43  wxImageList *m_imageListNormal;
44  wxButton *m_pZoomTo;
45  wxCheckBox *m_pEnabled;
46  wxTreeCtrl *m_pTree;
47  vtEngine *m_pSelectedEngine;
48  osg::Node *m_pSelectedNode;
49 
50 private:
51  // WDR: handler declarations for SceneGraphDlg
52  void OnInitDialog(wxInitDialogEvent& event);
53  void OnRefresh( wxCommandEvent &event );
54  void OnLog( wxCommandEvent &event );
55  void OnZoomTo( wxCommandEvent &event );
56  void OnEnabled( wxCommandEvent &event );
57  void OnTreeSelChanged( wxTreeEvent &event );
58  void OnChar(wxKeyEvent& event);
59 
60  bool m_bFirst;
61 
62 private:
63  DECLARE_EVENT_TABLE()
64 };
65 
66 #endif // __SceneGraphDlg_H__
67