[79c239e] | 1 | /* printwx.h */ |
---|
[1324d6c] | 2 | /* Device dependent part of Survex wxWidgets driver */ |
---|
[79c239e] | 3 | /* Copyright (C) 2004 Philip Underwood |
---|
[f10cf8f] | 4 | * Copyright (C) 2004,2005,2006,2011,2012,2013,2014 Olly Betts |
---|
[79c239e] | 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 |
---|
[5940815] | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
[79c239e] | 19 | */ |
---|
| 20 | |
---|
| 21 | #include "wx.h" |
---|
| 22 | #include <wx/dialog.h> |
---|
| 23 | |
---|
[f10cf8f] | 24 | #include <time.h> |
---|
| 25 | |
---|
[79c239e] | 26 | #include "avenprcore.h" |
---|
| 27 | |
---|
[2a4e8b7] | 28 | // The Gnome print dialog provides its own preview, as does Mac OS X. |
---|
[cca2ce1] | 29 | #if !defined __WXMAC__ && !defined wxUSE_LIBGNOMEPRINT |
---|
| 30 | # define AVEN_PRINT_PREVIEW |
---|
| 31 | #endif |
---|
| 32 | |
---|
[79c239e] | 33 | class MainFrm; |
---|
| 34 | class wxComboBox; |
---|
| 35 | class wxStaticText; |
---|
| 36 | class wxSpinCtrl; |
---|
| 37 | class wxSpinEvent; |
---|
| 38 | |
---|
[5940815] | 39 | // This dialog is also use for Export as well as Print. |
---|
[79c239e] | 40 | class svxPrintDlg : public wxDialog { |
---|
| 41 | layout m_layout; |
---|
| 42 | wxComboBox* m_scale; |
---|
[7b55ac2] | 43 | wxBoxSizer* m_scalebox; |
---|
| 44 | wxBoxSizer* m_viewbox; |
---|
[583c17d] | 45 | wxChoice* m_format; |
---|
[79c239e] | 46 | wxStaticText* m_printSize; |
---|
| 47 | wxSpinCtrl* m_bearing; |
---|
| 48 | wxSpinCtrl* m_tilt; |
---|
| 49 | // wxCheckBox* m_blanks; |
---|
| 50 | wxString m_File; |
---|
[ce403f1] | 51 | MainFrm* mainfrm; |
---|
[79c239e] | 52 | |
---|
| 53 | void LayoutToUI(); |
---|
| 54 | void UIToLayout(); |
---|
| 55 | void RecalcBounds(); |
---|
[583c17d] | 56 | void SomethingChanged(int control_id); |
---|
[79c239e] | 57 | public: |
---|
| 58 | svxPrintDlg(MainFrm* parent, const wxString & filename, |
---|
[f10cf8f] | 59 | const wxString & title, |
---|
| 60 | const wxString & datestamp, time_t datestamp_numeric, |
---|
[79c239e] | 61 | double angle, double tilt_angle, |
---|
[5940815] | 62 | bool labels, bool crosses, bool legs, bool surf, |
---|
[fdea415] | 63 | bool tubes, bool ents, bool fixes, bool exports, |
---|
| 64 | bool printing); |
---|
[5940815] | 65 | void OnPrint(wxCommandEvent& event); |
---|
| 66 | void OnExport(wxCommandEvent& event); |
---|
[cca2ce1] | 67 | #ifdef AVEN_PRINT_PREVIEW |
---|
[79c239e] | 68 | void OnPreview(wxCommandEvent& event); |
---|
[cca2ce1] | 69 | #endif |
---|
[79c239e] | 70 | void OnPlan(wxCommandEvent&); |
---|
| 71 | void OnElevation(wxCommandEvent&); |
---|
[102ba1d] | 72 | void OnPlanUpdate(wxUpdateUIEvent& e); |
---|
| 73 | void OnElevationUpdate(wxUpdateUIEvent& e); |
---|
[5940815] | 74 | void OnChangeSpin(wxSpinEvent& event); |
---|
| 75 | void OnChange(wxCommandEvent& event); |
---|
[79c239e] | 76 | private: |
---|
| 77 | DECLARE_EVENT_TABLE() |
---|
| 78 | }; |
---|