1 /************************************************************************/
2 /*									*/
3 /*  Text Editor Buffer structure of a paragraph.			*/
4 /*									*/
5 /************************************************************************/
6 
7 #   ifndef	DOC_PARA_NODE_H
8 #   define	DOC_PARA_NODE_H
9 
10 #   include	<docParaProperties.h>
11 #   include	<docObject.h>
12 
13 /************************************************************************/
14 /*									*/
15 /*  A Paragraph.							*/
16 /*									*/
17 /************************************************************************/
18 
19 typedef struct ParaNode
20     {
21     MemoryBuffer		btStringBuffer;
22 
23     int				btParticuleCount;
24     struct TextParticule *	btParticules;
25 
26     int				btLineCount;
27     struct TextLine *		btLines;
28 
29     ParagraphProperties		btProperties;
30 
31     int				btMajorityFontAscY0;
32     int				btMajorityFontDescY1;
33     int				btMajorityFontSize;
34 					/********************************/
35 					/*  Also used to find out	*/
36 					/*  whether the line extents	*/
37 					/*  must be recalculated.	*/
38 					/********************************/
39 
40     int				btBorderNrAbove;
41     int				btBorderNrBelow;
42     int				btTopInset;
43     int				btBottomInset;
44     } ParaNode;
45 
46 /************************************************************************/
47 /*									*/
48 /*  Shortcut defines through the BufferItem union.			*/
49 /*									*/
50 /************************************************************************/
51 
52 #	define	biParaString		BIU.biuPara.btStringBuffer.mbBytes
53 #	define	docParaStrlen( bi )	((bi)->BIU.biuPara.btStringBuffer.mbSize+0)
54 #	define	biParaStringBuffer      BIU.biuPara.btStringBuffer
55 #	define	docParaSetStrlen( bi, l ) \
56 	    utilMemoryBufferSetSize( &((bi)->BIU.biuPara.btStringBuffer), (l) );
57 #	define	docParaString( bi, fr )	((bi)->BIU.biuPara.btStringBuffer.mbBytes+(fr))
58 
59 #	define	biParaParticuleCount	BIU.biuPara.btParticuleCount
60 #	define	biParaParticules	BIU.biuPara.btParticules
61 #	define	biParaLineCount		BIU.biuPara.btLineCount
62 #	define	biParaLines		BIU.biuPara.btLines
63 
64 #	define	biParaMajorityFontAscY0		BIU.biuPara.btMajorityFontAscY0
65 #	define	biParaMajorityFontDescY1	BIU.biuPara.btMajorityFontDescY1
66 #	define	biParaMajorityFontSize	BIU.biuPara.btMajorityFontSize
67 
68 #	define	biParaTopInset		BIU.biuPara.btTopInset
69 #	define	biParaBottomInset	BIU.biuPara.btBottomInset
70 #	define	biParaFlags		BIU.biuPara.btFlags
71 					/********************************/
72 					/*  Also used to find out	*/
73 					/*  whether the line extents	*/
74 					/*  must be recalculated.	*/
75 					/********************************/
76 
77 #	define	biParaBorderNrAbove	BIU.biuPara.btBorderNrAbove
78 #	define	biParaBorderNrBelow	BIU.biuPara.btBorderNrBelow
79 
80 #	define	biParaProperties	BIU.biuPara.btProperties
81 
82 #	define	biParaTableNesting	biParaProperties.ppTableNesting
83 #	define	biParaLineSpacingIsMultiple \
84 					biParaProperties.ppLineSpacingIsMultiple
85 #	define	biParaBreakKind		biParaProperties.ppBreakKind
86 #	define	biParaFirstIndentTwips	biParaProperties.ppFirstIndentTwips
87 #	define	biParaLeftIndentTwips	biParaProperties.ppLeftIndentTwips
88 #	define	biParaRightIndentTwips	biParaProperties.ppRightIndentTwips
89 #	define	biParaSpaceBeforeTwips	biParaProperties.ppSpaceBeforeTwips
90 #	define	biParaSpaceAfterTwips	biParaProperties.ppSpaceAfterTwips
91 #	define	biParaLineSpacingTwips	biParaProperties.ppLineSpacingTwips
92 #	define	biParaAlignment		biParaProperties.ppAlignment
93 #	define	biParaTabStopListNumber	biParaProperties.ppTabStopListNumber
94 #	define	biParaKeepOnPage	biParaProperties.ppKeepOnPage
95 #	define	biParaKeepWithNext	biParaProperties.ppKeepWithNext
96 #	define	biParaShadingNumber	biParaProperties.ppShadingNumber
97 #	define	biParaFrameNumber	biParaProperties.ppFrameNumber
98 #	define	biParaOutlineLevel	biParaProperties.ppOutlineLevel
99 #	define	biParaListLevel		biParaProperties.ppListLevel
100 #	define	biParaTopBorderNumber	biParaProperties.ppTopBorderNumber
101 #	define	biParaBottomBorderNumber \
102 					biParaProperties.ppBottomBorderNumber
103 #	define	biParaLeftBorderNumber	biParaProperties.ppLeftBorderNumber
104 #	define	biParaRightBorderNumber	biParaProperties.ppRightBorderNumber
105 #	define	biParaBetweenBorderNumber \
106 					biParaProperties.ppBetweenBorderNumber
107 #	define	biParaBarNumber		biParaProperties.ppBarNumber
108 #	define	biParaStyle		biParaProperties.ppStyle
109 #	define	biParaListOverride	biParaProperties.ppListOverride
110 #	define	biParaWidowControl	biParaProperties.ppWidowControl
111 
112 #   endif
113