source: git/src/avenprcore.h @ 53496ab3

RELEASE/1.2debug-cidebug-ci-sanitisersstereowalls-data
Last change on this file since 53496ab3 was f10cf8f, checked in by Olly Betts <olly@…>, 10 years ago

src/: Pass the numeric datestamp to ExportFilter::header(), and use
it to set a timestamp in exported GPX files.

  • Property mode set to 100644
File size: 2.7 KB
Line 
1/* avenprcore.h
2 * Header file for printer independent parts of Survex printer drivers
3 * Copyright (C) 1994-2002,2004,2005,2012,2013 Olly Betts
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
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19 */
20
21#ifndef survex_included_avenprcore_h
22#define survex_included_avenprcore_h
23
24#include "img_hosted.h"
25#include <wx.h>
26
27extern bool fBlankPage;
28
29struct border {
30   long x_min, y_min, x_max, y_max;
31};
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 */
54    int show_mask;
55    bool SkipBlank;
56    bool Border;
57    bool Cutlines;
58    bool Legend;
59    wxString title;
60    wxString datestamp;
61    time_t datestamp_numeric;
62    double Scale;
63    int rot, tilt;
64    enum {PLAN, ELEV, TILT, EXTELEV} view;
65
66    /* internal data, but may be accessed */
67    double scX, scY;
68    double xMin, xMax, yMin, yMax;
69    double PaperWidth, PaperDepth;
70    int pagesX, pagesY, pages;
71    double xOrg, yOrg;
72    wxString footer;
73
74    layout(wxPageSetupDialogData* data);
75#if 0
76    void make_calibration();
77#endif
78    void pick_scale(int x, int y);
79    void pages_required();
80};
81
82/* things for a back end */
83void drawticks(border clip, int tick_size, int x, int y);
84
85int as_int(const char *v, char *p, int min_val, int max_val);
86unsigned long as_colour(const char *v, char *p);
87int as_bool(const char *v, char *p);
88double as_double(const char *v, char *p, double min_val, double max_val);
89int as_escstring(const char *v, char *s);
90char *as_string(const char *v, char *p);
91
92#if 0
93class MainFrm;
94void print_all(MainFrm *m_parent, layout *l, device *pri);
95void print_page(MainFrm *m_parent, layout *l, int page, int pass, int cPasses);
96int next_page(int *pstate, char **q, int pageLim);
97#endif
98
99#endif
Note: See TracBrowser for help on using the repository browser.