Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
ResampleDlg.h
1 //
2 // Name: ResampleDlg.h
3 //
4 // Copyright (c) 2001-2011 Virtual Terrain Project
5 // Free for all uses, see license.txt for details.
6 //
7 
8 #ifndef __ResampleDlg_H__
9 #define __ResampleDlg_H__
10 
11 #include "VTBuilder_UI.h"
12 #include "vtdata/MathTypes.h"
13 #include "vtui/AutoDialog.h"
14 #include "TileDlg.h"
15 #include "ElevDrawOptions.h"
16 
17 class BuilderView;
18 
19 // WDR: class declarations
20 
21 //----------------------------------------------------------------------------
22 // ResampleDlg
23 //----------------------------------------------------------------------------
24 
26 {
27 public:
28  // constructors and destructors
29  ResampleDlg( wxWindow *parent, wxWindowID id, const wxString &title,
30  const wxPoint& pos = wxDefaultPosition,
31  const wxSize& size = wxDefaultSize,
32  long style = wxDEFAULT_DIALOG_STYLE );
33 
34  // WDR: method declarations for ResampleDlg
35  wxButton* GetDotdotdot2() { return (wxButton*) FindWindow( ID_DOTDOTDOT2 ); }
36  wxTextCtrl* GetTextToImageFile() { return (wxTextCtrl*) FindWindow( ID_TEXT_TO_IMAGE_FILE ); }
37  wxButton* GetRenderingOptions() { return (wxButton*) FindWindow( ID_RENDERING_OPTIONS ); }
38  wxCheckBox* GetDerivedImages() { return (wxCheckBox*) FindWindow( ID_DERIVED_IMAGES ); }
39  wxButton* GetDotDotDot() { return (wxButton*) FindWindow( ID_DOTDOTDOT ); }
40  wxButton* GetTileOptions() { return (wxButton*) FindWindow( ID_TILE_OPTIONS ); }
41  wxTextCtrl* GetTextToFile() { return (wxTextCtrl*) FindWindow( ID_TEXT_TO_FILE ); }
42  wxTextCtrl* GetTextTileInfo() { return (wxTextCtrl*) FindWindow( ID_TEXT_TILE_INFO ); }
43  wxRadioButton* GetRadioToFile() { return (wxRadioButton*) FindWindow( ID_RADIO_TO_FILE ); }
44  wxRadioButton* GetRadioCreateNew() { return (wxRadioButton*) FindWindow( ID_RADIO_CREATE_NEW ); }
45  wxRadioButton* GetShorts() { return (wxRadioButton*) FindWindow( ID_SHORTS ); }
46  wxTextCtrl* GetVUnits() { return (wxTextCtrl*) FindWindow( ID_VUNITS ); }
47  wxTextCtrl* GetSpacingY() { return (wxTextCtrl*) FindWindow( ID_SPACINGY ); }
48  wxTextCtrl* GetSpacingX() { return (wxTextCtrl*) FindWindow( ID_SPACINGX ); }
49  wxTextCtrl* GetSizeY() { return (wxTextCtrl*) FindWindow( ID_SIZEY ); }
50  wxTextCtrl* GetSizeX() { return (wxTextCtrl*) FindWindow( ID_SIZEX ); }
51  wxButton* GetBigger() { return (wxButton*) FindWindow( ID_BIGGER ); }
52  wxButton* GetSmaller() { return (wxButton*) FindWindow( ID_SMALLER ); }
53  wxCheckBox* GetConstrain() { return (wxCheckBox*) FindWindow( ID_CONSTRAIN ); }
54 
55  void SetView(BuilderView *pView) { m_pView = pView; }
56  void RecomputeSize();
57  void FormatTilingString();
58  void EnableBasedOnConstraint();
59 
60  bool m_bNewLayer;
61  bool m_bToFile;
62  bool m_bToTiles;
63  wxString m_strToFile;
64  wxString m_strTileInfo;
65 
66  double m_fSpacingX;
67  double m_fSpacingY;
68  int m_iSizeX;
69  int m_iSizeY;
70  bool m_bConstraint;
71 
72  double m_fAreaX;
73  double m_fAreaY;
74  double m_fEstX;
75  double m_fEstY;
76 
77  bool m_bFloats;
78  float m_fVUnits;
79 
80  DRECT m_area;
81  bool m_bFillGaps;
82 
83  // Where to write the derived image tiles, if we will create them.
84  wxString m_strToFileImages;
85 
86  TilingOptions m_tileopts;
87 
88 private:
89  // WDR: member variable declarations for ResampleDlg
90  wxNumericValidator *spacing1, *spacing2;
91  BuilderView *m_pView;
92  int m_power;
93  bool m_bSetting;
94 
95 private:
96  // WDR: handler declarations for ResampleDlg
97  void OnDotDotDot2( wxCommandEvent &event );
98  void OnRenderingOptions( wxCommandEvent &event );
99  void OnCheckDerivedImages( wxCommandEvent &event );
100  void OnTileOptions( wxCommandEvent &event );
101  void OnDotDotDot( wxCommandEvent &event );
102  void OnRadioOutput( wxCommandEvent &event );
103  void OnShorts( wxCommandEvent &event );
104  void OnFloats( wxCommandEvent &event );
105  void OnSpacingXY( wxCommandEvent &event );
106  void OnSizeXY( wxCommandEvent &event );
107  void OnConstrain( wxCommandEvent &event );
108  void OnBigger( wxCommandEvent &event );
109  void OnSmaller( wxCommandEvent &event );
110  void OnTextToImageFile( wxCommandEvent &event );
111  void OnInitDialog(wxInitDialogEvent& event);
112 
113 private:
114  DECLARE_EVENT_TABLE()
115 };
116 
117 #endif // __ResampleDlg_H__
118