dtcalc: change from obsoleted MAXFLOAT to FLT_MAX from std C
[oweals/cde.git] / cde / lib / DtHelp / CanvasSegP.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: CanvasSegP.h /main/19 1996/10/04 18:30:19 rswiston $ */
24 /*************************************<+>*************************************
25  *****************************************************************************
26  **
27  **  File:   CanvasSegP.h
28  **
29  **  Project:
30  **
31  **  Description:  Public Header file for Canvas Engine
32  **
33  **  (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 Hewlett-Packard Company
34  **
35  **  (c) Copyright 1993, 1994 Hewlett-Packard Company
36  **  (c) Copyright 1993, 1994 International Business Machines Corp.
37  **  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
38  **  (c) Copyright 1993, 1994 Novell, Inc.
39  *******************************************************************
40  *************************************<+>*************************************/
41 #ifndef _DtCanvasSegP_h
42 #define _DtCanvasSegP_h
43
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47
48 /********    Public Defines Declarations    ********/
49 /*****************************************************************************
50  *  Some bits in passed in as a _DtCvFlags and the 'type' in _DtCvSegment
51  *  must match because they are passed straight thought from the segment
52  *  to the application. The following map is to help prevent colisions.
53  *
54  *   (-------------------------> _DtCvEND_OF_LINE
55  *   | (-----------------------> _DtCvSELECTED_FLAG
56  *   | |
57  *   | | (-------------------------> _DtCvAPP_FLAG4 \
58  *   | | | (-----------------------> _DtCvAPP_FLAG3  \
59  *   | | | | (---------------------> _DtCvAPP_FLAG2  / _DtCvAPP_FIELD
60  *   | | | | | (-------------------> _DtCvAPP_FLAG1 /
61  *   | | | | | |  
62  *   | | | | | | (---------------------> _DtCvTRAVERSAL_END
63  *   | | | | | | | (-------------------> _DtCvTRAVERSAL_BEGIN
64  *   | | | | | | | | (-----------------> _DtCvTRAVERSAL_FLAG
65  *   | | | | | | | | |
66  *   | | | | | | | | | (-------------------> _DtCvMARK_ON
67  *   | | | | | | | | | | (-----------------> _DtCvMARK_END
68  *   | | | | | | | | | | | (---------------> _DtCvMARK_BEGIN
69  *   | | | | | | | | | | | | (-------------> _DtCvMARK_FLAG
70  *   | | | | | | | | | | | | |
71  *   | | | | | | | | | | | | | (-------------> _DtCvSEARCH_CURR
72  *   | | | | | | | | | | | | | | (-----------> _DtCvSEARCH_END
73  *   | | | | | | | | | | | | | | | (---------> _DtCvSEARCH_BEGIN
74  *   | | | | | | | | | | | | | | | | (-------> _DtCvSEARCH_FLAG
75  *   | | | | | | | | | | | | | | | | |
76  *   | | | | | | | | | | | | | | | | | (---------> _DtCvLINK_NEW_WINDOW
77  *   | | | | | | | | | | | | | | | | | | (-------> _DtCvLINK_POP_UP
78  *   | | | | | | | | | | | | | | | | | | | (-----> _DtCvLINK_END
79  *   | | | | | | | | | | | | | | | | | | | | (---> _DtCvLINK_BEGIN
80  *   | | | | | | | | | | | | | | | | | | | | | (-> _DtCvLINK_FLAG
81  *   | | | | | | | | | | | | | | | | | | | | | |
82  *   v v v v v v#v v v v v v v v#v v v v v v v v 
83  *   1 0 9 8 7 6#5 4 3 2 1 0 9 8#7 6 5 4 3 2 1 0
84  *  ------------#---------------#----------------
85  *  |.|.|.|.|.|.#.|.|.|.|.|.|.|.#.|.|.|.|.|.|.|.|
86  *  ------------#---------------#----------------
87  *     ^ ^ ^ ^ ^#^ ^ ^ ^ ^ ^ ^ ^#^ ^ ^   ^ ^^^^^
88  *     | | | | | | | | | | | | | | | |   |  \|/
89  *     | | | | | | | | | | | | | | | |   |   |
90  *     | | | | | | | | | | | | | | | |   |   (->  Segment type
91  *     | | | | | | | | | | | | | | | |   (-----> _DtCvWIDE_CHAR
92  *     | | | | | | | | | | | | | | | |
93  *     | | | | | | | | | | | | | | | (-----> _DtCvSEARCH_FLAG
94  *     | | | | | | | | | | | | | | (-------> _DtCvSEARCH_BEGIN
95  *     | | | | | | | | | | | | | (---------> _DtCvSEARCH_END
96  *     | | | | | | | | | | | | (-----------> _DtCvSEARCH_CURR
97  *     | | | | | | | | | | | |
98  *     | | | | | | | | | | | (---------> _DtCvCONTROLLER/_DtCvBLOCK_LINE/
99  *     | | | | | | | | | | |                         _DtCvNEW_LINE
100  *     | | | | | | | | | | (-----------> _DtCvSUB_SCRIPT
101  *     | | | | | | | | | (-------------> _DtCvSUPER_SCRIPT
102  *     | | | | | | | | (---------------> _DtCvGHOST_LINK
103  *     | | | | | | | (-----------------> _DtCvHYPER_TEXT
104  *     | | | | | | (-------------------> _DtCvNON_BREAK
105  *     | | | | | (---------------------> _DtCvIN_LINE
106  *     | | | | |
107  *     | | | | (---------------> _DtCvAPP_FLAG1  \
108  *     | | | (-----------------> _DtCvAPP_FLAG2   \ _DtCvAPP_FIELD
109  *     | | (-------------------> _DtCvAPP_FLAG3   /
110  *     | (---------------------> _DtCvAPP_FLAG4  /
111  *     |
112  *     (------------------> _DtCvPAGE_BREAK
113  *
114  *****************************************************************************/
115 /*
116  * segment types
117  */
118 #define _DtCvNOOP       (0x00)
119 #define _DtCvCONTAINER  (0x01)
120 #define _DtCvLINE       (0x02)
121 #define _DtCvMARKER     (0x03)
122 #define _DtCvREGION     (0x04)
123 #define _DtCvSTRING     (0x05)
124 #define _DtCvTABLE      (0x06)
125
126 #define _DtCvPRIMARY_MASK       (0x07)
127 #define _DtCvSHIFT_PAST_PRIMARY 3
128
129 /*
130  * character size manipulation
131  */
132 #define _DtCvWIDE_CHAR          (0x01 << _DtCvSHIFT_PAST_PRIMARY)
133
134 /*
135  * segment flags
136  */
137 /* leave a gap for the search flags defined in CanvasP.h */
138 #define _DtCvSHIFT_TO_FLAGS     9
139
140 /* container only */
141 #define _DtCvCONTROLLER         (0x01 << (_DtCvSHIFT_TO_FLAGS +  0))
142
143 /* line type */
144 #define _DtCvBLOCK_LINE         (0x01 << (_DtCvSHIFT_TO_FLAGS +  0))
145
146 /* string & region (_DtCvNEW_LINE works on _DtCvNOOP too) */
147 #define _DtCvNEW_LINE           (0x01 << (_DtCvSHIFT_TO_FLAGS +  0))
148 #define _DtCvSUB_SCRIPT         (0x01 << (_DtCvSHIFT_TO_FLAGS +  1))
149 #define _DtCvSUPER_SCRIPT       (0x01 << (_DtCvSHIFT_TO_FLAGS +  2))
150 #define _DtCvGHOST_LINK         (0x01 << (_DtCvSHIFT_TO_FLAGS +  3))
151 #define _DtCvHYPER_TEXT         (0x01 << (_DtCvSHIFT_TO_FLAGS +  4))
152 #define _DtCvNON_BREAK          (0x01 << (_DtCvSHIFT_TO_FLAGS +  5))
153
154 /* region only */
155 #define _DtCvIN_LINE            (0x01 << (_DtCvSHIFT_TO_FLAGS +  6))
156
157 /* application flags - defined in CanvasP.h (starting at 16th bit for 4 bits) */
158
159 /* valid on any segment */
160 #define _DtCvPAGE_BREAK         (0x01 << (_DtCvSHIFT_TO_FLAGS + 11))
161
162 /* highlight macros */
163 #define HILITE_OVERLINE                 0
164 #define HILITE_STRIKETHROUGH            1
165 #define HILITE_UNDERLINE                2
166
167 /********    Public Enum Declarations    ********/
168 enum    _dtCvFrmtOption
169   {
170     _DtCvOPTION_BAD,
171 /*
172  * string breaking types
173  */
174     _DtCvLITERAL,
175     _DtCvDYNAMIC,
176 /*
177  * table border types
178  */
179     _DtCvBORDER_NONE,
180     _DtCvBORDER_FULL,
181     _DtCvBORDER_HORZ,
182     _DtCvBORDER_VERT,
183     _DtCvBORDER_TOP,
184     _DtCvBORDER_BOTTOM,
185     _DtCvBORDER_LEFT,
186     _DtCvBORDER_RIGHT,
187     _DtCvBORDER_TOP_LEFT,
188     _DtCvBORDER_TOP_RIGHT,
189     _DtCvBORDER_BOTTOM_LEFT,
190     _DtCvBORDER_BOTTOM_RIGHT,
191 /*
192  * controller horizontal orientation
193  */
194     _DtCvJUSTIFY_LEFT_CORNER,
195     _DtCvJUSTIFY_LEFT,          /* also container horizontal text placement */
196     _DtCvJUSTIFY_LEFT_MARGIN,
197     _DtCvJUSTIFY_CENTER,        /* also container horiz/vert text placement */
198     _DtCvJUSTIFY_RIGHT_MARGIN,
199     _DtCvJUSTIFY_RIGHT,         /* also container horizontal text placement */
200     _DtCvJUSTIFY_RIGHT_CORNER,
201 /*
202  * extra container horizontal text placement
203  */
204     _DtCvJUSTIFY_NUM,
205     _DtCvJUSTIFY_CHAR,
206 /*
207  * inherit the parent's horizontal text placement
208  */
209     _DtCvINHERIT,
210 /*
211  * controller vertical orientation, includes _DtCvJUSTIFY_CENTER
212  */
213     _DtCvJUSTIFY_TOP,           /* also container vertical text placement */
214     _DtCvJUSTIFY_BOTTOM,        /* also container vertical text placement */
215 /*
216  * controller flow types
217  */
218     _DtCvWRAP,
219     _DtCvWRAP_NONE,
220     _DtCvWRAP_JOIN
221   };
222
223 typedef enum {
224     hilite_overline      = 0x01 << HILITE_OVERLINE,
225     hilite_strikethrough = 0x01 << HILITE_STRIKETHROUGH,
226     hilite_underline     = 0x01 << HILITE_UNDERLINE
227 } text_hilite_t;
228
229 /********    Public Enum Typedef Declarations    ********/
230 typedef enum   _dtCvFrmtOption  _DtCvFrmtOption;
231
232 /********    Public Structures Declarations    ********/
233 typedef struct  _dtCvLine {
234         _DtCvUnit       width;
235         _DtCvPointer    data;
236 } _DtCvLine;
237
238 #ifdef __osf__
239 typedef struct _dtCvSegment  * _DtCvSegmentPointer; 
240 #endif
241
242 typedef struct  _dtCvContainer {
243         char            *id;
244         char            *justify_char;
245         _DtCvFrmtOption  type;
246         _DtCvFrmtOption  border;
247         _DtCvFrmtOption  justify;
248         _DtCvFrmtOption  vjustify;
249         _DtCvFrmtOption  orient;
250         _DtCvFrmtOption  vorient;
251         _DtCvFrmtOption  flow;
252         int              percent;
253         _DtCvUnit        leading;
254         _DtCvUnit        fmargin;
255         _DtCvUnit        lmargin;
256         _DtCvUnit        rmargin;
257         _DtCvUnit        tmargin;
258         _DtCvUnit        bmargin;
259         _DtCvLine        bdr_info;
260 #ifdef __osf__
261         _DtCvSegmentPointer seg_list;
262 #else
263         struct _dtCvSegment    *seg_list;
264 #endif
265 } _DtCvContainer;
266
267 typedef struct  _DtCvString {
268         void            *string;
269         _DtCvPointer     font;
270 } _DtCvString;
271
272 typedef struct  _dtCvRegion {
273         _DtCvPointer    info;
274         _DtCvUnit       width;
275         _DtCvUnit       height;
276         _DtCvUnit       ascent;
277 } _DtCvRegion;
278
279 typedef struct  _dtCvTable {
280         int                       num_cols;
281         char                    **col_w;
282         _DtCvFrmtOption          *col_justify;
283         char                     *justify_chars;
284         char                    **cell_ids;
285         struct _dtCvSegment     **cells;
286 } _DtCvTable;
287
288 typedef union   _dtCvSegHandles {
289         _DtCvContainer   container;
290         _DtCvString      string;
291         _DtCvRegion      region;
292         _DtCvTable       table;
293         _DtCvLine        rule;
294         char            *marker;
295 } _DtCvSegHandles;
296
297 struct  _dtCvSegment {
298         unsigned long            type;
299         int                      link_idx;
300         _DtCvSegHandles          handle;
301         struct _dtCvSegment     *next_seg;
302         struct _dtCvSegment     *next_disp;
303         _DtCvPointer             client_use;
304         _DtCvPointer             internal_use;
305 };
306
307 struct  _dtCvSegPts {
308         struct _dtCvSegment     *segment;
309         int                      offset;
310         int                      len;
311 };
312
313 #ifdef __osf__
314 typedef struct _dtCvLinkDb * _DtCvLinkDbPointer;
315 #endif
316
317 typedef struct  _dtCvTopicInfo {
318         char                     *id_str;
319         struct _dtCvSegment      *seg_list;
320         _DtCvPointInfo          **mark_list;
321 #ifdef __osf__
322         _DtCvLinkDbPointer        link_data;
323 #else
324         struct _dtCvLinkDb       *link_data;
325 #endif
326 } _DtCvTopicInfo;
327
328 typedef struct _dtCvStringClientData {
329         unsigned int vcc;
330         unsigned int vclen;
331
332         unsigned int hilite_type;
333
334         char* bg_color;
335         char* fg_color;
336         unsigned long bg_pixel;
337         unsigned long fg_pixel;
338 } _DtCvStringClientData;
339
340 typedef struct _dtCvRegionClientData {
341         _DtCvPointer GraphicHandle;
342 } _DtCvRegionClientData;
343
344 typedef union _dtCvClientData {
345         _DtCvRegionClientData region;
346         _DtCvStringClientData string;
347 } _DtCvClientData;
348
349 /********    Public Structure Typedef Declarations    ********/
350
351 /********    Public Prototyped Procedures    ********/
352
353 /********    Public Macro Declarations    ********/
354 /*
355  * set segment type
356  */
357 #define _DtCvSetTypeToContainer(x) \
358                         (((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvCONTAINER)
359 #define _DtCvSetTypeToLine(x) \
360                         (((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvLINE)
361 #define _DtCvSetTypeToMarker(x) \
362                         (((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvMARKER)
363 #define _DtCvSetTypeToNoop(x) \
364                         (((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvNOOP)
365 #define _DtCvSetTypeToRegion(x) \
366                         (((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvREGION)
367 #define _DtCvSetTypeToString(x) \
368                         (((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvSTRING)
369 #define _DtCvSetTypeToTable(x) \
370                         (((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvTABLE)
371 /*
372  * set segment flags
373  */
374 #define _DtCvSetTypeToBlockLine(x)      ((x) | _DtCvBLOCK_LINE)
375 #define _DtCvSetTypeToController(x)     ((x) | _DtCvCONTROLLER)
376 #define _DtCvSetTypeToGhostLink(x)      ((x) | _DtCvGHOST_LINK)
377 #define _DtCvSetTypeToHyperText(x)      ((x) | _DtCvHYPER_TEXT)
378 #define _DtCvSetTypeToInLine(x)         ((x) | _DtCvIN_LINE)
379 #define _DtCvSetTypeToNewLine(x)        ((x) | _DtCvNEW_LINE)
380 #define _DtCvSetTypeToNonBreak(x)       ((x) | _DtCvNON_BREAK)
381 #define _DtCvSetTypeToSearch(x)         ((x) | _DtCvSEARCH_FLAG)
382 #define _DtCvSetTypeToSearchBegin(x)    ((x) | _DtCvSEARCH_BEGIN)
383 #define _DtCvSetTypeToSearchEnd(x)      ((x) | _DtCvSEARCH_END)
384 #define _DtCvSetTypeToSubScript(x)      ((x) | _DtCvSUB_SCRIPT)
385 #define _DtCvSetTypeToSuperScript(x)    ((x) | _DtCvSUPER_SCRIPT)
386
387 /*
388  * set character size
389  */
390 #define _DtCvSetTypeToWideChar(x)       ((x) | _DtCvWIDE_CHAR)
391
392 /*
393  * set application flags and/or field
394  */
395 #define _DtCvSetAppFlag1(x)             ((x) | _DtCvAPP_FLAG1)
396 #define _DtCvSetAppFlag2(x)             ((x) | _DtCvAPP_FLAG2)
397 #define _DtCvSetAppFlag3(x)             ((x) | _DtCvAPP_FLAG3)
398 #define _DtCvSetAppFlag4(x)             ((x) | _DtCvAPP_FLAG4)
399 #define _DtCvSetAppField(x,y) \
400                 (((x) & ~(_DtCvAPP_FIELD_MASK)) | \
401                         ((y & _DtCvAPP_FIELD_MASK) << _DtCvAPP_FIELD_OFFSET))
402 #define _DtCvSetAppFieldSmall(x,y) \
403                 (((x) & ~(_DtCvAPP_FIELD_S_MASK)) | \
404                         ((y & _DtCvAPP_FIELD_S_MASK) << _DtCvAPP_FIELD_OFFSET))
405
406 /*
407  * get the application field value
408  */
409 #define _DtCvGetAppField(x) \
410                         (((x) & _DtCvAPP_FIELD_MASK) >> _DtCvAPP_FIELD_OFFSET)
411 #define _DtCvGetAppFieldSmall(x) \
412                         (((x) & _DtCvAPP_FIELD_S_MASK) >> _DtCvAPP_FIELD_OFFSET)
413
414 /********    Semi-Public Macro Declarations    ********/
415 /*
416  * get segment type
417  */
418 #define _DtCvPrimaryTypeOfSeg(x)        ((x->type) & _DtCvPRIMARY_MASK)
419 #define _DtCvIsSegContainer(x) \
420                 (((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvCONTAINER) ? 1 : 0)
421 #define _DtCvIsSegLine(x) \
422                 (((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvLINE) ? 1 : 0)
423 #define _DtCvIsSegMarker(x) \
424                 (((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvMARKER) ? 1 : 0)
425 #define _DtCvIsSegNoop(x) \
426                 (((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvNOOP) ? 1 : 0)
427 #define _DtCvIsSegRegion(x) \
428                 (((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvREGION) ? 1 : 0)
429 #define _DtCvIsSegString(x) \
430                 (((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvSTRING) ? 1 : 0)
431 #define _DtCvIsSegTable(x) \
432                 (((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvTABLE) ? 1 : 0)
433
434 /*
435  * get segment flags
436  */
437 #define _DtCvIsSegController(x) \
438                                 ((((x)->type) & _DtCvCONTROLLER) ? 1 : 0)
439 #define _DtCvIsSegBlockLine(x) \
440                                 ((((x)->type) & _DtCvBLOCK_LINE) ? 1 : 0)
441 #define _DtCvIsSegGhostLink(x) \
442                                 ((((x)->type) & _DtCvGHOST_LINK) ? 1 : 0)
443 #define _DtCvIsSegHyperText(x) \
444                                 ((((x)->type) & _DtCvHYPER_TEXT) ? 1 : 0)
445 #define _DtCvIsSegInLine(x) \
446                                 ((((x)->type) & _DtCvIN_LINE) ? 1 : 0)
447 #define _DtCvIsSegNewLine(x) \
448                                 ((((x)->type) & _DtCvNEW_LINE) ? 1 : 0)
449 #define _DtCvIsSegNonBreakingChar(x) \
450                                 ((((x)->type) & _DtCvNON_BREAK) ? 1 : 0)
451 #define _DtCvIsSegPageBreak(x) \
452                                 ((((x)->type) & _DtCvPAGE_BREAK) ? 1 : 0)
453 #define _DtCvIsSegRegChar(x) \
454                                 ((((x)->type) & _DtCvWIDE_CHAR) ? 0 : 1)
455 #define _DtCvIsSegSubScript(x) \
456                                 ((((x)->type) & _DtCvSUB_SCRIPT) ? 1 : 0)
457 #define _DtCvIsSegSuperScript(x) \
458                                 ((((x)->type) & _DtCvSUPER_SCRIPT) ? 1 : 0)
459 #define _DtCvIsSegWideChar(x) \
460                                 ((((x)->type) & _DtCvWIDE_CHAR) ? 1 : 0)
461 /*
462  * segment access
463  */
464 #define _DtCvNextSeg(x)         ((x)->next_seg)
465 #define _DtCvNextDisp(x)        ((x)->next_disp)
466
467 /*
468  * container access
469  */
470 #define _DtCvContainerOfSeg(x) \
471                                 ((x)->handle.container)
472 #define _DtCvContainerBMarginOfSeg(x) \
473                                 ((x)->handle.container.bmargin)
474 #define _DtCvContainerBorderOfSeg(x) \
475                                 ((x)->handle.container.border)
476 #define _DtCvContainerFlowOfSeg(x) \
477                                 ((x)->handle.container.flow)
478 #define _DtCvContainerFMarginOfSeg(x) \
479                                 ((x)->handle.container.fmargin)
480 #define _DtCvContainerIdOfSeg(x) \
481                                 ((x)->handle.container.id)
482 #define _DtCvContainerJustifyCharOfSeg(x) \
483                                 ((x)->handle.container.justify_char)
484 #define _DtCvContainerJustifyOfSeg(x) \
485                                 ((x)->handle.container.justify)
486 #define _DtCvContainerLeadingOfSeg(x) \
487                                 ((x)->handle.container.leading)
488 #define _DtCvContainerLineWidthOfSeg(x) \
489                                 ((x)->handle.container.bdr_info.width)
490 #define _DtCvContainerLineDataOfSeg(x) \
491                                 ((x)->handle.container.bdr_info.data)
492 #define _DtCvContainerListOfSeg(x) \
493                                 ((x)->handle.container.seg_list)
494 #define _DtCvContainerLMarginOfSeg(x) \
495                                 ((x)->handle.container.lmargin)
496 #define _DtCvContainerOrientOfSeg(x) \
497                                 ((x)->handle.container.orient)
498 #define _DtCvContainerPercentOfSeg(x) \
499                                 ((x)->handle.container.percent)
500 #define _DtCvContainerRMarginOfSeg(x) \
501                                 ((x)->handle.container.rmargin)
502 #define _DtCvContainerTMarginOfSeg(x) \
503                                 ((x)->handle.container.tmargin)
504 #define _DtCvContainerTypeOfSeg(x) \
505                                 ((x)->handle.container.type)
506 #define _DtCvContainerVJustifyOfSeg(x) \
507                                 ((x)->handle.container.vjustify)
508 #define _DtCvContainerVOrientOfSeg(x) \
509                                 ((x)->handle.container.vorient)
510
511 /*
512  * marker access
513  */
514 #define _DtCvIdOfMarkerSeg(x)           ((x)->handle.marker)
515
516 /*
517  * marker access
518  */
519 #define _DtCvDataOfLineSeg(x)           ((x)->handle.rule.data)
520 #define _DtCvWidthOfLineSeg(x)          ((x)->handle.rule.width)
521
522 /*
523  * string access
524  */
525 #define _DtCvStringOfStringSeg(x)       ((x)->handle.string.string)
526 #define _DtCvFontOfStringSeg(x)         ((x)->handle.string.font)
527
528 /*
529  * region access
530  */
531 #define _DtCvInfoOfRegionSeg(x)         ((x)->handle.region.info)
532 #define _DtCvWidthOfRegionSeg(x)        ((x)->handle.region.width)
533 #define _DtCvHeightOfRegionSeg(x)       ((x)->handle.region.height)
534 #define _DtCvAscentOfRegionSeg(x)       ((x)->handle.region.ascent)
535
536 /*
537  * table access
538  */
539 #define _DtCvNumColsOfTableSeg(x)       ((x)->handle.table.num_cols)
540 #define _DtCvColWOfTableSeg(x)          ((x)->handle.table.col_w)
541 #define _DtCvColJustifyOfTableSeg(x)    ((x)->handle.table.col_justify)
542 #define _DtCvJustifyCharsOfTableSeg(x)  ((x)->handle.table.justify_chars)
543 #define _DtCvCellIdsOfTableSeg(x)       ((x)->handle.table.cell_ids)
544 #define _DtCvCellsOfTableSeg(x)         ((x)->handle.table.cells)
545
546 /********    Semi-Public Function Declarations    ********/
547 /********    Public Function Declarations    ********/
548
549 #ifdef __cplusplus
550 }  /* Close scope of 'extern "C"' declaration which encloses file. */
551 #endif
552
553 #endif /* _DtCanvasSegP_h */
554 /* DON'T ADD ANYTHING AFTER THIS #endif */