source: git/src/avenprcore.h @ 6d3938b

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

lib/survex.pot,src/: If the 3d file specifies a coordinate system,
then use it for exporting to formats which need to know (currently
GPX). If the input file doesn't specify, allow the user to enter
one in the export dialog.

  • Property mode set to 100644
File size: 2.8 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,2014 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 cs_proj;
61    wxString datestamp;
62    time_t datestamp_numeric;
63    double Scale;
64    int rot, tilt;
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;
73    wxString footer;
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.