0022627: Change OCCT memory management defaults
[occt.git] / src / CGM / cgmstruc.h
1 #ifndef CGMSTRUCT_H
2 #define CGMSTRUCT_H
3
4 /*  Include all files on which this is dependent.  */
5
6 #include "cgmtypes.h"
7 #include "cgmelem.h"
8 #include "cgmpar.h"
9
10 /*  Define real precision structure (character encoding) */
11
12 struct real_prec {
13    Prec prec, min, defexp, expald;
14 };
15
16 /*  CGM element codes for clear text input and output */
17
18 struct commands {
19      Code code;
20      char *string;
21   };
22
23 /*   Encoding Specific defaults   */
24
25 struct char_defaults{
26       Prec int_prec, index_prec, vdcint_prec;
27       struct real_prec real, vdc;
28       Prec col_prec, colind_prec;
29       struct colour min_rgb, max_rgb;
30       long ring_angres, ring_int, ring_real;
31 };
32
33 struct text_defaults{
34       long min_int, max_int, min_index, max_index;
35       float min_real, max_real;
36       Prec real_digits;
37       struct vdc min_vdc, max_vdc;
38       Prec vdc_digits, colind_prec, col_prec;
39       struct colour min_rgb, max_rgb;
40 };
41
42 struct bin_defaults{
43       Prec int_prec, index_prec, vdcint_prec;
44       Enum real_type, vdc_type;
45       Prec real_whole, real_fraction, vdc_whole, vdc_fraction;
46       Prec col_prec, colind_prec;
47       struct colour min_rgb, max_rgb;
48 };
49
50 struct defaults {
51
52 /*  Encoding independent defaults        */
53
54       Index max_colind;
55       Enum vdc_type, transparency, clip_ind;
56       Enum color_mode, scale_mode;
57       float scale_factor;
58       Enum linewidth_mode, markersize_mode, edgewidth_mode;
59       struct colour back, aux;
60       struct rect vdc_extent, clip_rect;
61
62 /*  Retain encoding defaults for common access  */
63
64       Prec int_bits,     /*  integer prec in bits */
65            index_bits,   /*  index prec in bits  */
66            vdcint_bits,  /*  vdc integer precision in bits */
67            real_bits,    /*  real prec in bits */
68            real_places,  /*  binary bits after decimal place */
69            vdc_bits,     /*  vdc prec in bits  */
70            vdc_places,   /*  binary bits after decimal place */
71            col_bits,     /*  colour prec in bits  */
72            colind_bits;  /*  colour index prec in bits */
73       float min_real,   /*  min real value */
74             max_real,   /*  max real value */
75             realmin,    /*  smallest real value  */
76             min_vdc,    /*  min real vdc value   */
77             max_vdc,    /*  max real vdc value   */
78             vdcmin;     /*  smallest vdc real value */
79       Prec  real_defexp, /* Real default exponent */
80             real_expald, /* Real exponenet allowed */
81             vdc_defexp,  /* VDC default exponent */
82             vdc_expald;   /* VDC exponenet allowed */
83       struct colour min_rgb,  /* integer values: index/RGB */
84                     max_rgb;  /* integer values: index/RGB */
85       Logical colprec_flag,   /* Flag to show if colour precision set */
86               colval_flag;    /* Flag to show if colour value extent set */
87   };
88
89 /*  Graphics attributes  */
90
91 struct attributes {
92       Index line_ind, mark_ind, text_ind, fill_ind, edge_ind;
93       Index line_type, mark_type, text_font, edge_type;
94       struct vdc line_width, mark_size, edge_width;
95       struct colour line, marker, text, fill, edge;
96       Enum text_prec, text_path, text_halign, text_valign, edge_vis;
97       float text_hcont, text_vcont;
98       Index char_set, altchar_set;
99       float char_exp, char_space;
100       struct point char_up, char_base;
101       struct vdc char_height;
102       Enum int_style;
103       Index hatch_ind, pat_ind;
104       struct point fill_ref;
105       struct rect pat_size;
106       Enum asf[ASFS];
107 /*  Flags for VDC dependent defaults */
108       Logical linewidth_flag, markersize_flag, edgewidth_flag,
109               charheight_flag, cliprect_flag;
110   };
111
112
113 /* Structure for attribute change flags  */
114
115 struct flags {
116   Logical line_index, line_type, line_width, line_color;
117   Logical mark_index, mark_type, mark_size, mark_color;
118   Logical text_index, text_font, text_prec, char_expan, char_space,
119           text_color, char_height, char_orient, char_set,
120           altchar_set, text_path, text_align;
121   Logical fill_index, int_style, hatch_ind,
122           pat_ind, pat_size, fill_color, fill_ref;
123   Logical edge_index, edge_type, edge_width, edge_color, edge_vis;
124 };
125
126 /*  structure for random frame searching */
127
128  struct data_frame
129  {
130     fpos_t disk_addr;
131     char *cur_ptr, *end_ptr;
132     union {
133        int meta;
134        int frame;
135     } index;
136  };
137
138      /*  Basic data held about CGM character sets and CGM fonts, as
139          provided in CGM CHARACTERSETLIST and FONTLIST elements.
140      */
141
142 struct cgmfont
143
144    { char **names;
145      int    count;
146    };
147
148 struct cgmcset
149
150    { char **names;
151      int *types;
152      int    count;
153    };
154
155 #endif  /* end of cgmstruc.h */