[79c239e] | 1 | /* avenprcore.h |
---|
| 2 | * Header file for printer independent parts of Survex printer drivers |
---|
[4a66219] | 3 | * Copyright (C) 1994-2002,2004,2005,2012,2013,2014,2015 Olly Betts |
---|
[79c239e] | 4 | * Copyright (C) 2004 Philip Underwood |
---|
| 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 |
---|
[ecbc6c18] | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
[79c239e] | 19 | */ |
---|
| 20 | |
---|
| 21 | #ifndef survex_included_avenprcore_h |
---|
| 22 | #define survex_included_avenprcore_h |
---|
| 23 | |
---|
[5627cbb] | 24 | #include <wx.h> |
---|
[4049a36] | 25 | #include "export.h" |
---|
[79c239e] | 26 | |
---|
| 27 | /* 1:<DEFAULT_SCALE> is the default scale */ |
---|
| 28 | #define DEFAULT_SCALE 500 |
---|
| 29 | |
---|
[44272ef] | 30 | /* Height of our footer in mm. */ |
---|
| 31 | #define FOOTER_HEIGHT_MM 10 |
---|
| 32 | |
---|
[442ec34] | 33 | class wxPageSetupDialogData; |
---|
| 34 | |
---|
[79c239e] | 35 | /* Store everything describing the page layout */ |
---|
| 36 | class layout { |
---|
| 37 | public: |
---|
| 38 | /* caller modifiable bits */ |
---|
[d713e5d] | 39 | int show_mask; |
---|
[79c239e] | 40 | bool SkipBlank; |
---|
| 41 | bool Border; |
---|
| 42 | bool Cutlines; |
---|
[256c4c8] | 43 | bool Legend; |
---|
[5627cbb] | 44 | wxString title; |
---|
| 45 | wxString datestamp; |
---|
[79c239e] | 46 | double Scale; |
---|
[4a66219] | 47 | double rot, tilt; |
---|
[79c239e] | 48 | enum {PLAN, ELEV, TILT, EXTELEV} view; |
---|
| 49 | |
---|
| 50 | /* internal data, but may be accessed */ |
---|
| 51 | double scX, scY; |
---|
| 52 | double xMin, xMax, yMin, yMax; |
---|
| 53 | double PaperWidth, PaperDepth; |
---|
| 54 | int pagesX, pagesY, pages; |
---|
| 55 | double xOrg, yOrg; |
---|
| 56 | |
---|
[fd4f6ff] | 57 | explicit layout(wxPageSetupDialogData* data); |
---|
[79c239e] | 58 | #if 0 |
---|
| 59 | void make_calibration(); |
---|
| 60 | #endif |
---|
| 61 | void pick_scale(int x, int y); |
---|
| 62 | void pages_required(); |
---|
[4049a36] | 63 | int get_effective_show_mask() const { |
---|
| 64 | int result = show_mask; |
---|
[35b5fa9] | 65 | if (view == tilt) { |
---|
[4049a36] | 66 | result &= ~(XSECT|WALLS|PASG); |
---|
| 67 | } |
---|
| 68 | return result; |
---|
| 69 | } |
---|
[79c239e] | 70 | }; |
---|
| 71 | |
---|
| 72 | #endif |
---|