Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
SampleImageDlg.h
1 //
2 // Name: SampleImageDlg.h
3 //
4 // Copyright (c) 2003-2011 Virtual Terrain Project
5 // Free for all uses, see license.txt for details.
6 //
7 
8 #ifndef __SampleImageDlg_H__
9 #define __SampleImageDlg_H__
10 
11 #include "VTBuilder_UI.h"
12 #include "vtdata/MathTypes.h"
13 #include "TileDlg.h"
14 
15 class BuilderView;
16 
17 // WDR: class declarations
18 
19 //----------------------------------------------------------------------------
20 // SampleImageDlg
21 //----------------------------------------------------------------------------
22 
24 {
25 public:
26  // constructors and destructors
27  SampleImageDlg( wxWindow *parent, wxWindowID id, const wxString &title,
28  const wxPoint& pos = wxDefaultPosition,
29  const wxSize& size = wxDefaultSize,
30  long style = wxDEFAULT_DIALOG_STYLE );
31 
32  // WDR: method declarations for SampleImageDlg
33  wxButton* GetDotDotDot() { return (wxButton*) FindWindow( ID_DOTDOTDOT ); }
34  wxButton* GetTileOptions() { return (wxButton*) FindWindow( ID_TILE_OPTIONS ); }
35  wxTextCtrl* GetTextToFile() { return (wxTextCtrl*) FindWindow( ID_TEXT_TO_FILE ); }
36  wxTextCtrl* GetTextTileInfo() { return (wxTextCtrl*) FindWindow( ID_TEXT_TILE_INFO ); }
37  wxRadioButton* GetRadioToFile() { return (wxRadioButton*) FindWindow( ID_RADIO_TO_FILE ); }
38  wxRadioButton* GetRadioCreateNew() { return (wxRadioButton*) FindWindow( ID_RADIO_CREATE_NEW ); }
39  wxTextCtrl* GetSpacingY() { return (wxTextCtrl*) FindWindow( ID_SPACINGY ); }
40  wxTextCtrl* GetSpacingX() { return (wxTextCtrl*) FindWindow( ID_SPACINGX ); }
41  wxTextCtrl* GetSizeY() { return (wxTextCtrl*) FindWindow( ID_SIZEY ); }
42  wxTextCtrl* GetSizeX() { return (wxTextCtrl*) FindWindow( ID_SIZEX ); }
43  wxButton* GetBigger() { return (wxButton*) FindWindow( ID_BIGGER ); }
44  wxButton* GetSmaller() { return (wxButton*) FindWindow( ID_SMALLER ); }
45  wxCheckBox* GetConstrain() { return (wxCheckBox*) FindWindow( ID_CONSTRAIN ); }
46 
47  void SetView(BuilderView *pView) { m_pView = pView; }
48  void RecomputeSize();
49  void FormatTilingString();
50  void EnableBasedOnConstraint();
51 
52  bool m_bNewLayer;
53  bool m_bToFile;
54  bool m_bToTiles;
55  wxString m_strToFile;
56  wxString m_strTileInfo;
57 
58  double m_fSpacingX;
59  double m_fSpacingY;
60  int m_iSizeX;
61  int m_iSizeY;
62  bool m_bConstraint;
63 
64  double m_fAreaX;
65  double m_fAreaY;
66  double m_fEstX;
67  double m_fEstY;
68 
69  DRECT m_area;
70  int m_power;
71  bool m_bSetting;
72 
73  TilingOptions m_tileopts;
74 
75 private:
76  // WDR: member variable declarations for SampleImageDlg
77  BuilderView *m_pView;
78 
79 private:
80  // WDR: handler declarations for SampleImageDlg
81  void OnRadioOutput( wxCommandEvent &event );
82  void OnTileOptions( wxCommandEvent &event );
83  void OnDotDotDot( wxCommandEvent &event );
84  void OnSpacingXY( wxCommandEvent &event );
85  void OnSizeXY( wxCommandEvent &event );
86  void OnConstrain( wxCommandEvent &event );
87  void OnBigger( wxCommandEvent &event );
88  void OnSmaller( wxCommandEvent &event );
89  void OnInitDialog(wxInitDialogEvent& event);
90 
91 private:
92  DECLARE_EVENT_TABLE()
93 };
94 
95 #endif // __SampleImageDlg_H__
96