Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
NodeDlg.h
1 //
2 // Name: NodeDlg.h
3 //
4 // Copyright (c) 2002-2011 Virtual Terrain Project
5 // Free for all uses, see license.txt for details.
6 //
7 
8 #ifndef __NodeDlg_H__
9 #define __NodeDlg_H__
10 
11 #include "VTBuilder_UI.h"
12 
13 #include "RoadMapEdit.h"
14 #include "ScaledView.h"
15 
16 // WDR: class declarations
17 
18 class NodeDlgView : public vtScaledView
19 {
20 public:
21  NodeDlgView(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
22  const wxSize& size = wxDefaultSize, long style = wxHSCROLL | wxVSCROLL, const wxString& name = _T("")) :
23  vtScaledView(parent, id, pos, size, style, name) {}
24 
25  NodeEdit *m_pNode;
26 
27  void OnDraw(wxDC &dc);
28 };
29 
30 //----------------------------------------------------------------------------
31 // NodeDlg
32 //----------------------------------------------------------------------------
33 
34 class NodeDlg: public NodeDlgBase
35 {
36 public:
37  // constructors and destructors
38  NodeDlg( wxWindow *parent, wxWindowID id, const wxString &title,
39  const wxPoint& pos = wxDefaultPosition,
40  const wxSize& size = wxDefaultSize,
41  long style = wxDEFAULT_DIALOG_STYLE );
42 
43  void SetScale(float fScale);
44  void SetNode(NodeEdit *pSingleLink, vtRoadLayer *pLayer);
45  void ApplyVisualToNode(NodeEdit *pNode, VisualIntersectionType vitype);
46 
47  // WDR: method declarations for NodeDlg
48  wxListBox* GetBehavior() { return (wxListBox*) FindWindow( ID_BEHAVIOR ); }
49  wxListBox* GetLinkNum() { return (wxListBox*) FindWindow( ID_ROADNUM ); }
50  wxListBox* GetIntType() { return (wxListBox*) FindWindow( ID_INTTYPE ); }
51 
52 private:
53  // WDR: member variable declarations for NodeDlg
54  NodeEdit *m_pNode;
55  vtRoadLayer *m_pLayer;
56  NodeDlgView *m_pView;
57 
58 private:
59  // WDR: handler declarations for NodeDlg
60  void OnBehavior( wxCommandEvent &event );
61  void OnLinkNum( wxCommandEvent &event );
62  void OnIntType( wxCommandEvent &event );
63  void OnOK( wxCommandEvent &event );
64  void OnInitDialog(wxInitDialogEvent& event);
65  void OnDraw(wxDC &dc);
66 
67 private:
68  DECLARE_EVENT_TABLE()
69 };
70 
71 #endif // __NodeDlg_H__
72