source: git/src/printwx.h @ 4a66219

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

src/avenprcore.h,src/printwx.cc,src/printwx.h: Don't round bearing
and tilt angles to integers when printing and exporting.

  • Property mode set to 100644
File size: 2.7 KB
RevLine 
[79c239e]1/* printwx.h */
[1324d6c]2/* Device dependent part of Survex wxWidgets driver */
[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>
23
[f10cf8f]24#include <time.h>
25
[79c239e]26#include "avenprcore.h"
27
[a338ef8]28// The libgnomeprint and GtkPrint dialogs provide their own preview, as does
29// Mac OS X.
30#if !(defined wxUSE_LIBGNOMEPRINT && wxUSE_LIBGNOMEPRINT) && \
31    !(defined wxUSE_GTKPRINT && wxUSE_GTKPRINT) && \
32    !defined __WXMAC__
[cca2ce1]33# define AVEN_PRINT_PREVIEW
34#endif
35
[79c239e]36class MainFrm;
37class wxComboBox;
38class wxStaticText;
[4a66219]39class wxSpinCtrlDouble;
[79c239e]40class wxSpinEvent;
41
[5940815]42// This dialog is also use for Export as well as Print.
[79c239e]43class svxPrintDlg : public wxDialog {
44        layout m_layout;
45        wxComboBox* m_scale;
[7b55ac2]46        wxBoxSizer* m_scalebox;
47        wxBoxSizer* m_viewbox;
[583c17d]48        wxChoice* m_format;
[79c239e]49        wxStaticText* m_printSize;
[4a66219]50        wxSpinCtrlDouble* m_bearing;
51        wxSpinCtrlDouble* m_tilt;
[79c239e]52//      wxCheckBox* m_blanks;
53        wxString m_File;
[ce403f1]54        MainFrm* mainfrm;
[4ed8154]55        bool close_after;
[79c239e]56
57        void LayoutToUI();
58        void UIToLayout();
59        void RecalcBounds();
[583c17d]60        void SomethingChanged(int control_id);
[79c239e]61 public:
62        svxPrintDlg(MainFrm* parent, const wxString & filename,
[6d3938b]63                    const wxString & title, const wxString & cs_proj,
[f10cf8f]64                    const wxString & datestamp, time_t datestamp_numeric,
[79c239e]65                    double angle, double tilt_angle,
[5940815]66                    bool labels, bool crosses, bool legs, bool surf,
[fdea415]67                    bool tubes, bool ents, bool fixes, bool exports,
[4ed8154]68                    bool printing, bool close_after_ = false);
69
70        ~svxPrintDlg() {
71            if (close_after) mainfrm->Close();
72        }
73
[5940815]74        void OnPrint(wxCommandEvent& event);
75        void OnExport(wxCommandEvent& event);
[cca2ce1]76#ifdef AVEN_PRINT_PREVIEW
[79c239e]77        void OnPreview(wxCommandEvent& event);
[cca2ce1]78#endif
[79c239e]79        void OnPlan(wxCommandEvent&);
80        void OnElevation(wxCommandEvent&);
[102ba1d]81        void OnPlanUpdate(wxUpdateUIEvent& e);
82        void OnElevationUpdate(wxUpdateUIEvent& e);
[5940815]83        void OnChangeSpin(wxSpinEvent& event);
84        void OnChange(wxCommandEvent& event);
[4ed8154]85        void OnCancel(wxCommandEvent& event);
[79c239e]86 private:
87        DECLARE_EVENT_TABLE()
88};
Note: See TracBrowser for help on using the repository browser.