source: git/src/printing.h @ b69af0f

RELEASE/1.2debug-cidebug-ci-sanitiserswalls-datawalls-data-hanging-as-warning
Last change on this file since b69af0f was b74755e, checked in by Olly Betts <olly@…>, 5 years ago

Drop special case for wxUSE_LIBGNOMEPRINT

The libgnomeprint library is long obsolete. wxWidgets dropped its
integration for it in 3.0.0, and we don't support anything older now.

  • Property mode set to 100644
File size: 2.5 KB
RevLine 
[4283d6f]1/* printing.h */
2/* Aven printing code */
[79c239e]3/* Copyright (C) 2004 Philip Underwood
[4a66219]4 * Copyright (C) 2004,2005,2006,2011,2012,2013,2014,2015 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>
[cbc9c5e7]23#include <wx/spinctrl.h>
[79c239e]24
[f10cf8f]25#include <time.h>
26
[79c239e]27#include "avenprcore.h"
28
[b74755e]29// The GtkPrint dialog provides its own preview, as does macOS.
30#if !(defined wxUSE_GTKPRINT && wxUSE_GTKPRINT) && \
[a338ef8]31    !defined __WXMAC__
[cca2ce1]32# define AVEN_PRINT_PREVIEW
33#endif
34
[79c239e]35class MainFrm;
36class wxComboBox;
37class wxStaticText;
[4a66219]38class wxSpinCtrlDouble;
[79c239e]39class wxSpinEvent;
40
[5940815]41// This dialog is also use for Export as well as Print.
[79c239e]42class svxPrintDlg : public wxDialog {
43        layout m_layout;
44        wxComboBox* m_scale;
[7b55ac2]45        wxBoxSizer* m_scalebox;
46        wxBoxSizer* m_viewbox;
[583c17d]47        wxChoice* m_format;
[79c239e]48        wxStaticText* m_printSize;
[4a66219]49        wxSpinCtrlDouble* m_bearing;
50        wxSpinCtrlDouble* m_tilt;
[79c239e]51//      wxCheckBox* m_blanks;
52        wxString m_File;
[ce403f1]53        MainFrm* mainfrm;
[4ed8154]54        bool close_after;
[79c239e]55
56        void LayoutToUI();
57        void UIToLayout();
58        void RecalcBounds();
[583c17d]59        void SomethingChanged(int control_id);
[79c239e]60 public:
61        svxPrintDlg(MainFrm* parent, const wxString & filename,
[60d7755]62                    const wxString & title,
[1798716]63                    const wxString & datestamp,
[79c239e]64                    double angle, double tilt_angle,
[5940815]65                    bool labels, bool crosses, bool legs, bool surf,
[ddcf585]66                    bool splays, bool tubes, bool ents, bool fixes,
67                    bool exports, bool printing, bool close_after_ = false);
[4ed8154]68
69        ~svxPrintDlg() {
70            if (close_after) mainfrm->Close();
71        }
72
[5940815]73        void OnPrint(wxCommandEvent& event);
74        void OnExport(wxCommandEvent& event);
[cca2ce1]75#ifdef AVEN_PRINT_PREVIEW
[79c239e]76        void OnPreview(wxCommandEvent& event);
[cca2ce1]77#endif
[79c239e]78        void OnPlan(wxCommandEvent&);
79        void OnElevation(wxCommandEvent&);
[102ba1d]80        void OnPlanUpdate(wxUpdateUIEvent& e);
81        void OnElevationUpdate(wxUpdateUIEvent& e);
[cbc9c5e7]82        void OnChangeSpin(wxSpinDoubleEvent& event);
[5940815]83        void OnChange(wxCommandEvent& event);
[4ed8154]84        void OnCancel(wxCommandEvent& event);
[79c239e]85 private:
86        DECLARE_EVENT_TABLE()
87};
Note: See TracBrowser for help on using the repository browser.