source: git/src/avenprcore.h @ ecbc6c18

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

src/: Update FSF address in licence notices.

git-svn-id: file:///home/survex-svn/survex/branches/survex-1_1@3417 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

  • 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 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.h"
25#include <wx.h>
26
27extern bool fBlankPage;
28
29typedef struct {
30   long x_min, y_min, x_max, y_max;
31} border;
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    bool Labels;
55    bool Crosses;
56    bool Shots;
57    bool Surface;
58    bool SkipBlank;
59    bool Border;
60    bool Cutlines;
61    bool Raw;
62    wxString title;
63    wxString datestamp;
64    double Scale;
65    int rot, tilt;
66    enum {PLAN, ELEV, TILT, EXTELEV} view;
67
68    /* internal data, but may be accessed */
69    double scX, scY;
70    double xMin, xMax, yMin, yMax;
71    double PaperWidth, PaperDepth;
72    int pagesX, pagesY, pages;
73    double xOrg, yOrg;
74    wxString footer;
75
76    layout(wxPageSetupDialogData* data);
77#if 0
78    void make_calibration();
79#endif
80    void pick_scale(int x, int y);
81    void pages_required();
82};
83
84/* things for a back end */
85void drawticks(border clip, int tick_size, int x, int y);
86
87int as_int(const char *v, char *p, int min_val, int max_val);
88unsigned long as_colour(const char *v, char *p);
89int as_bool(const char *v, char *p);
90double as_double(const char *v, char *p, double min_val, double max_val);
91int as_escstring(const char *v, char *s);
92char *as_string(const char *v, char *p);
93
94#if 0
95class MainFrm;
96void print_all(MainFrm *m_parent, layout *l, device *pri);
97void print_page(MainFrm *m_parent, layout *l, int page, int pass, int cPasses);
98int next_page(int *pstate, char **q, int pageLim);
99#endif
100
101#endif
Note: See TracBrowser for help on using the repository browser.