[7bb8184] | 1 | /* printwx.h */ |
---|
| 2 | /* Device dependent part of Survex wxWidgets driver */ |
---|
| 3 | /* Copyright (C) 2004 Philip Underwood |
---|
| 4 | * Copyright (C) 2004,2005,2006 Olly Betts |
---|
| 5 | * |
---|
| 6 | * This program is free software; you can redistribute it and/or modify |
---|
| 7 | * it under the terms of the GNU General Public License as published by |
---|
| 8 | * the Free Software Foundation; either version 2 of the License, or |
---|
| 9 | * (at your option) any later version. |
---|
| 10 | * |
---|
| 11 | * This program is distributed in the hope that it will be useful, |
---|
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 14 | * GNU General Public License for more details. |
---|
| 15 | * |
---|
| 16 | * You should have received a copy of the GNU General Public License |
---|
| 17 | * along with this program; if not, write to the Free Software |
---|
| 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
| 19 | */ |
---|
| 20 | |
---|
| 21 | #include "wx.h" |
---|
| 22 | #include <wx/dialog.h> |
---|
| 23 | |
---|
| 24 | #include "avenprcore.h" |
---|
| 25 | |
---|
| 26 | // The Gnome print dialog provides its own preview. I assume Mac OS X does |
---|
| 27 | // too (MarkS made that change). |
---|
| 28 | #if !defined __WXMAC__ && !defined wxUSE_LIBGNOMEPRINT |
---|
| 29 | # define AVEN_PRINT_PREVIEW |
---|
| 30 | #endif |
---|
| 31 | |
---|
| 32 | class MainFrm; |
---|
| 33 | class wxComboBox; |
---|
| 34 | class wxStaticText; |
---|
| 35 | class wxSpinCtrl; |
---|
| 36 | class wxCheckBox; |
---|
| 37 | class wxSpinEvent; |
---|
| 38 | |
---|
| 39 | // This dialog is also use for Export as well as Print. |
---|
| 40 | class svxPrintDlg : public wxDialog { |
---|
| 41 | protected: |
---|
| 42 | layout m_layout; |
---|
| 43 | wxComboBox* m_scale; |
---|
| 44 | wxStaticText* m_printSize; |
---|
| 45 | wxStaticText* m_tilttext; |
---|
| 46 | wxSpinCtrl* m_bearing; |
---|
| 47 | wxSpinCtrl* m_tilt; |
---|
| 48 | wxCheckBox* m_legs; |
---|
| 49 | wxCheckBox* m_stations; |
---|
| 50 | wxCheckBox* m_names; |
---|
| 51 | wxCheckBox* m_borders; |
---|
| 52 | // wxCheckBox* m_blanks; |
---|
| 53 | wxCheckBox* m_infoBox; |
---|
| 54 | wxCheckBox* m_surface; |
---|
| 55 | wxString m_File; |
---|
| 56 | MainFrm* mainfrm; |
---|
| 57 | |
---|
| 58 | void LayoutToUI(); |
---|
| 59 | void UIToLayout(); |
---|
| 60 | void RecalcBounds(); |
---|
| 61 | public: |
---|
| 62 | svxPrintDlg(MainFrm* parent, const wxString & filename, |
---|
| 63 | const wxString & title, const wxString & datestamp, |
---|
| 64 | double angle, double tilt_angle, |
---|
| 65 | bool labels, bool crosses, bool legs, bool surf, |
---|
| 66 | bool printing); |
---|
| 67 | void OnPrint(wxCommandEvent& event); |
---|
| 68 | void OnExport(wxCommandEvent& event); |
---|
| 69 | #ifdef AVEN_PRINT_PREVIEW |
---|
| 70 | void OnPreview(wxCommandEvent& event); |
---|
| 71 | #endif |
---|
| 72 | void OnPlan(wxCommandEvent&); |
---|
| 73 | void OnElevation(wxCommandEvent&); |
---|
| 74 | void OnChangeSpin(wxSpinEvent& event); |
---|
| 75 | void OnChange(wxCommandEvent& event); |
---|
| 76 | void SomethingChanged(); |
---|
| 77 | private: |
---|
| 78 | DECLARE_EVENT_TABLE() |
---|
| 79 | }; |
---|