-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGS_PLOT.H
215 lines (163 loc) · 6.09 KB
/
GS_PLOT.H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
/*************************************************************************
Name: gs_plot
Module description: File per le definizioni dei tipi
Author: Caterina Gaeta
**************************************************************************/
/*************************************************************************
ONLY ITALIAN indica stringhe eventualmente da tradurre
**************************************************************************/
/*************************************************************************/
/* GS_PLOT.H */
/*************************************************************************/
#ifndef _gs_plot_h
#define _gs_plot_h 1
/*************************************************************************/
/* DEFINES */
/*************************************************************************/
/* -STRINGHE PER LA GESTIONE DELLE IMPOSTAZIONI DI DEFAULT DEL PLOTTAGGIO- */
#define DECIMAL_SYSTEM _T("Metrico") //ONLY ITALIAN
#define ENGLISH_SYSTEM _T("Inglese") //ONLY ITALIAN
/* ------------------------VALORI RESTITUITI DALLE DCL------------------ */
#define DLGPREV 10
#define DLGSELECT_AREA 40
#define DLGCHANGE_VIEW 50
#define DLGWAIT 60
/* --------------------DIMENSIONI DEI FOGLI IN mm ------------------ */
//i valori corrispondono al plotter DJ 650C con Map2000i
//i secondi valori corrispondono al plotter HP 650 con Map2 (i terzi sono le dim reali dei fogli)
#define l_A4 261.41//285.0//297.0
#define h_A4 198.41//198.0//210.0
#define l_A3 408.41//396.0//420.0
#define h_A3 261.41//273.0//297.0
#define l_A2 558.41//570.0//594.0
#define h_A2 408.41//396.0//420.0
#define l_A1 829.41//817.0//841.0
#define h_A1 558.41//570.0//594.0
#define l_A0 1153.41//1165.0//1189.0
#define h_A0 829.41//817.0//841.0
#define l_U 0.00
#define h_U 0.00
/* -----COSTANTE PER LA CORREZIONE DEL CALCOLO DELLE RIGHE IN LEGENDA--- */
#define LINE_CORRECTION 1.5
/* --------COSTANTI PER LA GESTIONE DELLE CLASSI DI ENTITA'------------- */
#define extr_class_index 6 //posizione elemento sottolista dell'elemento
//nella lista della classi selezionate
//che indica se la classe è estratta
/*************************************************************************/
/* TYPEDEFS */
/*************************************************************************/
class geosim_class
{
public:
C_COLOR class_color; // colore della classe
C_STRING class_hatch; // riempimento
C_STRING class_line_type; // tipo linea
C_STRING class_text_style; // stile testo
C_STRING class_layer; // piano
C_STRING class_block; // blocco
double class_width; // larghezza
double class_elevation; // elevazione
double class_scale; // scala
double class_rotation; // rotazione
double class_text_height; // altezza testo
double class_thickness; // spessore
geosim_class();
~geosim_class() {
}
virtual void draw_class_block(ads_point pt, TCHAR *scale, double larg) {}
virtual void write_class_name(ads_point pt, TCHAR *val, C_STRING *name);
};
class geosim_node:public geosim_class
{
public:
geosim_node(resbuf *rt);
void draw_class_block(ads_point pt, TCHAR *scale,double larg);//IN FASE DI CONTROLLO
};
class geosim_text:public geosim_class {
public:
geosim_text(presbuf rt);
void write_class_name(ads_point pt,TCHAR* val, C_STRING *name);
};
class geosim_pol:public geosim_class {
public:
geosim_pol(presbuf rt);
void draw_class_block(ads_point pt,TCHAR* scale,double larg);
};
class geosim_sup:public geosim_class {
public:
geosim_sup(presbuf rt);
void draw_class_block(ads_point pt,TCHAR* scale,double larg);
};
class geosim_spag:public geosim_class {
public:
geosim_spag(presbuf rt);
void draw_class_block(ads_point pt,TCHAR* scale,double larg);
};
/*************************************************************************/
/* CLASSE CLASS_LIST_ITEM */
/*************************************************************************/
//lista classi di entità (indice, nome, nome blocco)
class CLASS_LIST_ITEM:public C_NODE
{
friend class CLASS_LIST;
public:
short ext_class_index;
short class_index;
C_STRING ext_class_name;
C_STRING class_name;
geosim_class * class_ref; //punta alla lista delle caratteristiche
//CLASS_LIST *clnext; //è già in C_NODE next
CLASS_LIST_ITEM();
CLASS_LIST_ITEM(short ext,short cl,TCHAR *ext_name,TCHAR *cl_name,geosim_class *p);
~CLASS_LIST_ITEM();
};
class CLASS_LIST:public C_LIST
{
public:
CLASS_LIST(){
}
virtual ~CLASS_LIST(){
}
};
/*************************************************************************/
/* CLASSE ATTR_LIST_ITEM */
/*************************************************************************/
//lista attributi cartiglio
class ATTR_LIST_ITEM:public C_NODE
{
friend class ATTR_LIST;
public:
short attr_type;
C_STRING attr_value;
ATTR_LIST_ITEM();
ATTR_LIST_ITEM(short type, TCHAR *value);
~ATTR_LIST_ITEM() {
}
};
class ATTR_LIST:public C_LIST
{
public:
ATTR_LIST(){
}
virtual ~ATTR_LIST(){
}
};
//funzioni per l'utente del plottaggio
void gsddplot(void);
void gsdelplot(void);
void gsviewplot(void);
void gsexitplot(void);
int gs_plot_preview();
//funzioni di servizio
DllExport int get_int_value(FILE *file,const TCHAR *sez,const TCHAR *val,int *in);
DllExport int set_echo(short *val);
DllExport int set_menu(short *val);
DllExport int reset_echo(short val);
DllExport int reset_menu(short val);
DllExport int extern_class(resbuf *rb);
DllExport int class_node(resbuf *rb);
DllExport int class_text(resbuf *rb);
DllExport int class_pol(resbuf *rb);
DllExport int class_sup(resbuf *rb);
DllExport int class_spag(resbuf *rb);
#endif