source: git/src/avenprcore.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.8 KB
RevLine 
[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
[a405bc1]24#include "img_hosted.h"
[5627cbb]25#include <wx.h>
[79c239e]26
27extern bool fBlankPage;
28
[696b35b]29struct border {
[79c239e]30   long x_min, y_min, x_max, y_max;
[696b35b]31};
[79c239e]32
33#define PR_FONT_DEFAULT 0
34#define PR_FONT_LABELS  1
35
36#define PR_COLOUR_TEXT          0
37#define PR_COLOUR_LABELS        1
38#define PR_COLOUR_FRAME         2
39#define PR_COLOUR_LEG           3
40#define PR_COLOUR_CROSS         4
41#define PR_COLOUR_SURFACE_LEG   5
42
43#define PR_FLAG_NOFILEOUTPUT    1
44#define PR_FLAG_NOINI           2
45#define PR_FLAG_CALIBRATE       4
46
47/* 1:<DEFAULT_SCALE> is the default scale */
48#define DEFAULT_SCALE 500
49
50/* Store everything describing the page layout */
51class layout {
52public:
53    /* caller modifiable bits */
[d713e5d]54    int show_mask;
[79c239e]55    bool SkipBlank;
56    bool Border;
57    bool Cutlines;
[256c4c8]58    bool Legend;
[5627cbb]59    wxString title;
[6d3938b]60    wxString cs_proj;
[5627cbb]61    wxString datestamp;
[f10cf8f]62    time_t datestamp_numeric;
[79c239e]63    double Scale;
[4a66219]64    double rot, tilt;
[79c239e]65    enum {PLAN, ELEV, TILT, EXTELEV} view;
66
67    /* internal data, but may be accessed */
68    double scX, scY;
69    double xMin, xMax, yMin, yMax;
70    double PaperWidth, PaperDepth;
71    int pagesX, pagesY, pages;
72    double xOrg, yOrg;
[5627cbb]73    wxString footer;
[79c239e]74
75    layout(wxPageSetupDialogData* data);
76#if 0
77    void make_calibration();
78#endif
79    void pick_scale(int x, int y);
80    void pages_required();
81};
82
83/* things for a back end */
84void drawticks(border clip, int tick_size, int x, int y);
85
86int as_int(const char *v, char *p, int min_val, int max_val);
87unsigned long as_colour(const char *v, char *p);
88int as_bool(const char *v, char *p);
89double as_double(const char *v, char *p, double min_val, double max_val);
90int as_escstring(const char *v, char *s);
91char *as_string(const char *v, char *p);
92
93#if 0
94class MainFrm;
95void print_all(MainFrm *m_parent, layout *l, device *pri);
96void print_page(MainFrm *m_parent, layout *l, int page, int pass, int cPasses);
97int next_page(int *pstate, char **q, int pageLim);
98#endif
99
100#endif
Note: See TracBrowser for help on using the repository browser.