1 // S52utils.h: utility
2 //
3 // Project:  OpENCview
4 
5 /*
6     This file is part of the OpENCview project, a viewer of ENC
7     Copyright (C) 2000-2004  Sylvain Duclos sduclos@users.sourceforgue.net
8 
9     This program is free software; you can redistribute it and/or modify
10     it under the terms of the GNU General Public License as published by
11     the Free Software Foundation; either version 2 of the License, or
12     (at your option) any later version.
13 
14     This program is distributed in the hope that it will be useful,
15     but WITHOUT ANY WARRANTY; without even the implied warranty of
16     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17     GNU General Public License for more details.
18 
19     You should have received a copy of the GNU General Public License
20     along with this program; if not, write to the Free Software
21     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,  USA.
22 */
23 
24 
25 #ifndef __S52UTILS_H__
26 #define __S52UTILS_H__
27 
28 //#include <stdio.h>  // printf()
29 
30 #ifdef SOLARIS
31 // well should be cc
32 #define PRINTF    printf(__FILE__":%i: : ", __LINE__),printf
33 #else
34 #define PRINTF    printf(__FILE__":%i: %s(): ", __LINE__, __FUNCTION__),printf
35 #endif
36 
37 // valid label in .conf file
38 #define CONF_CATALOG  "CATALOG"
39 #define CONF_PLIB     "PLIB"
40 #define CONF_CHART    "CHART"
41 #define CONF_RGB      "DUMMY_RGB_BRIGHT"
42 
43 // global parameter for mariners' selection
44 typedef enum _S52_MAR_param_t {
45     S52_MAR_NONE            = 0,    // default
46     S52_MAR_SHOW_TEXT       = 1,    // view group 23
47     S52_MAR_TWO_SHADES      = 2,    // flag indicating selection of two depth shades (on/off) [default ON]
48     S52_MAR_SAFETY_CONTOUR  = 3,    // selected safety contour (meters) [IMO PS 3.6]
49     S52_MAR_SAFETY_DEPTH    = 4,    // selected safety depth (meters) [IMO PS 3.7]
50     S52_MAR_SHALLOW_CONTOUR = 5,    // selected shallow water contour (meters) (optional)
51     S52_MAR_DEEP_CONTOUR    = 6,    // selected deepwatercontour (meters) (optional)
52     S52_MAR_SHALLOW_PATTERN = 7,    // flag indicating selection of shallow water highlight (on/off)(optional) [default OFF]
53     S52_MAR_SHIPS_OUTLINE   = 8,    // flag indicating selection of ship scale symbol (on/off) [IMO PS 8.4]
54     S52_MAR_DISTANCE_TAGS   = 9,    // selected spacing of "distance to run" tags at a route (nm)
55     S52_MAR_TIME_TAGS       = 10,   // selected spacing of time tags at the pasttrack (min)
56     S52_MAR_FULL_SECTORS    = 11,   // show full length light sector lines
57     S52_MAR_SYMBOLIZED_BND  = 12,   // symbolized area boundaries
58 
59     S52_MAR_SYMPLIFIED_PNT  = 13,   // simplified point
60 
61     S52_MAR_DISP_CATEGORY   = 14,   // display category
62 
63     S52_MAR_COLOR_PALETTE   = 15,   // color palette
64 
65     S52_MAR_NUM             = 16    // number of parameters
66 } S52_MAR_param_t;
67 
68 extern double S52_getMarinerParam(S52_MAR_param_t param);
69 extern int    S52_setMarinerParam(S52_MAR_param_t param, double val);
70 #endif
71