Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
RoadDlg.h
1 //
2 // Name: RoadDlg.h
3 //
4 // Copyright (c) 2002-2011 Virtual Terrain Project
5 // Free for all uses, see license.txt for details.
6 //
7 
8 #ifndef __RoadDlg_H__
9 #define __RoadDlg_H__
10 
11 #include "VTBuilder_UI.h"
12 
13 class LinkEdit;
14 class vtRoadLayer;
15 
16 // WDR: class declarations
17 
18 //----------------------------------------------------------------------------
19 // RoadDlg
20 //----------------------------------------------------------------------------
21 
22 class RoadDlg: public RoadDlgBase
23 {
24 public:
25  // constructors and destructors
26  RoadDlg( 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 SetRoad(LinkEdit *pSingleRoad, vtRoadLayer *pLayer);
32  void ClearState();
33  void AccumulateState(LinkEdit *pRoad);
34  void TransferStateToControls();
35  void ApplyState(LinkEdit *pRoad);
36 
37  // WDR: method declarations for RoadDlg
38  wxTextCtrl* GetMarginWidth() { return (wxTextCtrl*) FindWindow( ID_MARGIN_WIDTH ); }
39  wxTextCtrl* GetParkingWidth() { return (wxTextCtrl*) FindWindow( ID_PARKING_WIDTH ); }
40  wxTextCtrl* GetCurbHeight() { return (wxTextCtrl*) FindWindow( ID_CURB_HEIGHT ); }
41  wxTextCtrl* GetSidewalkWidth() { return (wxTextCtrl*) FindWindow( ID_SIDEWALK_WIDTH ); }
42  wxTextCtrl* GetLaneWidth() { return (wxTextCtrl*) FindWindow( ID_LANE_WIDTH ); }
43  wxListBox* GetSurfType() { return (wxListBox*) FindWindow( ID_SURFTYPE ); }
44  wxChoice* GetMargin() { return (wxChoice*) FindWindow( ID_MARGIN ); }
45  wxChoice* GetParking() { return (wxChoice*) FindWindow( ID_PARKING ); }
46  wxChoice* GetSidewalk() { return (wxChoice*) FindWindow( ID_SIDEWALK ); }
47  wxTextCtrl* GetHwyName() { return (wxTextCtrl*) FindWindow( ID_HWYNAME ); }
48  wxTextCtrl* GetNumLanes() { return (wxTextCtrl*) FindWindow( ID_NUMLANES ); }
49 
50 private:
51  // WDR: member variable declarations for RoadDlg
52  LinkEdit *m_pRoad;
53  vtRoadLayer *m_pLayer;
54 
55  // State
56  int m_iLanes;
57  int m_iHwy;
58  int m_iSidewalk;
59  int m_iParking;
60  int m_iMargin;
61  int m_iSurf;
62  float m_fSidewalkWidth;
63  float m_fCurbHeight;
64  float m_fMarginWidth;
65  float m_fLaneWidth;
66  float m_fParkingWidth;
67 
68 private:
69  // WDR: handler declarations for RoadDlg
70  void OnOK( wxCommandEvent &event );
71  void OnInitDialog(wxInitDialogEvent& event);
72 
73 private:
74  DECLARE_EVENT_TABLE()
75 };
76 
77 #endif // __RoadDlg_H__