Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
ProfileEditDlg.h
1 //
2 // Name: ProfileEditDlg.h
3 //
4 // Copyright (c) 2006-2011 Virtual Terrain Project
5 // Free for all uses, see license.txt for details.
6 //
7 
8 #ifndef __ProfileEditDlg_H__
9 #define __ProfileEditDlg_H__
10 
11 #include "vtui_UI.h"
12 #include "vtdata/MathTypes.h"
13 
14 class ProfDlgView : public wxScrolledWindow
15 {
16 public:
17  ProfDlgView(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
18  const wxSize& size = wxDefaultSize, long style = wxHSCROLL | wxVSCROLL, const wxString& name = _T(""));
19 
20  void OnSize(wxSizeEvent& event);
21  void NewSize(const wxSize &s);
22  void OnDraw(wxDC &dc);
23  void OnMouseEvent(wxMouseEvent &event);
24 
25  FLine2 m_profile;
26  vtArray<wxPoint> m_screen;
27  wxPoint m_org;
28  float m_scale;
29  int m_mode;
30  bool m_bDragging;
31  int m_iDragging;
32 
33 private:
34  DECLARE_EVENT_TABLE()
35 };
36 
37 //----------------------------------------------------------------------------
38 // ProfileEditDlg
39 //----------------------------------------------------------------------------
40 
42 {
43 public:
44  // constructors and destructors
45  ProfileEditDlg( wxWindow *parent, wxWindowID id, const wxString &title,
46  const wxPoint& pos = wxDefaultPosition,
47  const wxSize& size = wxDefaultSize,
48  long style = wxDEFAULT_DIALOG_STYLE );
49 
50  // WDR: method declarations for ProfileEditDlg
51  void UpdateEnabling();
52  wxButton* GetSave() { return (wxButton*) FindWindow( ID_SAVE_PROF ); }
53 
54  void SetFilename(const char *fname);
55  void CheckClockwisdom();
56 
57 private:
58  // WDR: member variable declarations for ProfileEditDlg
59  ProfDlgView *m_pView;
60  wxString m_strFilename;
61 
62 private:
63  // WDR: handler declarations for ProfileEditDlg
64  void OnOK( wxCommandEvent &event );
65  void OnLoad( wxCommandEvent &event );
66  void OnSaveAs( wxCommandEvent &event );
67  void OnSave( wxCommandEvent &event );
68  void OnRemove( wxCommandEvent &event );
69  void OnMove( wxCommandEvent &event );
70  void OnAdd( wxCommandEvent &event );
71  void OnInitDialog(wxInitDialogEvent& event);
72 
73 private:
74  DECLARE_EVENT_TABLE()
75 };
76 
77 #endif // __ProfileEditDlg_H__