Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
DriveDlg.h
Go to the documentation of this file.
1 //
2 // Name: DriveDlg.h
3 //
4 // Copyright (c) 2011 Virtual Terrain Project
5 // Free for all uses, see license.txt for details.
6 //
7 
8 #ifndef __DriveDlg__
9 #define __DriveDlg__
10 
16 #include "EnviroUI.h"
17 #include "vtlib/core/CarEngine.h"
18 
20 
22 class DriveDlg : public DriveDlgBase
23 {
24 protected:
25  // Handlers for DriveDlgBase events.
26  void OnLeftDown( wxMouseEvent& event );
27  void OnLeftUp( wxMouseEvent& event );
28  void OnMotion( wxMouseEvent& event );
29  void OnLeftDClick( wxMouseEvent& event );
30  void OnAreaPaint( wxPaintEvent& event );
31  void OnFollow( wxCommandEvent& event );
32  void OnScroll( wxScrollEvent& event );
33 
34 public:
36  DriveDlg( wxWindow* parent );
38 
39  void SetCarEngine(CarEngine *eng) { m_Engine = eng; }
40  CarEngine *GetCarEngine() { return m_Engine.get(); }
41 
42 protected:
43  void MouseToMotion(int mx, int my);
44 
45  float m_fSpeed;
46  float m_fTurn;
47  bool m_bFollow;
48 
49  CarEnginePtr m_Engine;
50  bool m_bMouseDown;
51 };
52 
53 #endif // __DriveDlg__