2 /* Aven printing code */
3 /* Copyright (C) 2004 Philip Underwood
4 * Copyright (C) 2004,2005,2006,2011,2012,2013,2014,2015 Olly Betts
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.
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.
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
22 #include <wx/dialog.h>
23 #include <wx/spinctrl.h>
27 #include "avenprcore.h"
29 // The libgnomeprint and GtkPrint dialogs provide their own preview, as does
31 #if !(defined wxUSE_LIBGNOMEPRINT && wxUSE_LIBGNOMEPRINT) && \
32 !(defined wxUSE_GTKPRINT && wxUSE_GTKPRINT) && \
34 # define AVEN_PRINT_PREVIEW
40 class wxSpinCtrlDouble
;
43 // This dialog is also use for Export as well as Print.
44 class svxPrintDlg
: public wxDialog
{
47 wxBoxSizer
* m_scalebox
;
48 wxBoxSizer
* m_viewbox
;
50 wxStaticText
* m_printSize
;
51 wxSpinCtrlDouble
* m_bearing
;
52 wxSpinCtrlDouble
* m_tilt
;
53 // wxCheckBox* m_blanks;
61 void SomethingChanged(int control_id
);
63 svxPrintDlg(MainFrm
* parent
, const wxString
& filename
,
64 const wxString
& title
, const wxString
& cs_proj
,
65 const wxString
& datestamp
, time_t datestamp_numeric
,
66 double angle
, double tilt_angle
,
67 bool labels
, bool crosses
, bool legs
, bool surf
,
68 bool splays
, bool tubes
, bool ents
, bool fixes
,
69 bool exports
, bool printing
, bool close_after_
= false);
72 if (close_after
) mainfrm
->Close();
75 void OnPrint(wxCommandEvent
& event
);
76 void OnExport(wxCommandEvent
& event
);
77 #ifdef AVEN_PRINT_PREVIEW
78 void OnPreview(wxCommandEvent
& event
);
80 void OnPlan(wxCommandEvent
&);
81 void OnElevation(wxCommandEvent
&);
82 void OnPlanUpdate(wxUpdateUIEvent
& e
);
83 void OnElevationUpdate(wxUpdateUIEvent
& e
);
84 void OnChangeSpin(wxSpinDoubleEvent
& event
);
85 void OnChange(wxCommandEvent
& event
);
86 void OnCancel(wxCommandEvent
& event
);