1 /************************************************************************/
2 /*									*/
3 /*  Paragraph properties.						*/
4 /*									*/
5 /************************************************************************/
6 
7 #   ifndef	DOC_PARA_PROP_H
8 #   define	DOC_PARA_PROP_H
9 
10 #   include	<utilPropMask.h>
11 #   include	"docDocumentAttributeMap.h"
12 
13 /************************************************************************/
14 /*									*/
15 /*  Paragraph properties.						*/
16 /*									*/
17 /*  Unless explicitly stated, all properties except numbers in pixels	*/
18 /*  are properties of the paragraph.					*/
19 /*									*/
20 /*  1)  Tab stops.							*/
21 /*  2)  Indentations.							*/
22 /*  3)  White space above/after the paragraph.				*/
23 /*  4)  Style, List Override ID.					*/
24 /*  5)  Borders.							*/
25 /*  6)  Shading.							*/
26 /*  7)  Frame.							*/
27 /*									*/
28 /************************************************************************/
29 
30 typedef struct ParagraphProperties
31     {
32     /*  1  */
33     short int		ppTabStopListNumber;
34 
35     /*  2  */
36     short int		ppFirstIndentTwips;
37     short int		ppLeftIndentTwips;
38     short int		ppRightIndentTwips;
39 
40     /*  3  */
41     short int		ppSpaceBeforeTwips;
42     short int		ppSpaceAfterTwips;
43     short int		ppLineSpacingTwips;
44 
45     /*  4  */
46     short int		ppStyle;
47     short int		ppListOverride;
48 
49     /*  5  */
50     int			ppTopBorderNumber;
51     int			ppBottomBorderNumber;
52     int			ppLeftBorderNumber;
53     int			ppRightBorderNumber;
54     int			ppBetweenBorderNumber;
55     int			ppBarNumber;
56 
57     /*  6  */
58     int			ppShadingNumber;
59 
60     /*  7  */
61     int			ppFrameNumber;
62     unsigned char	ppTableNesting;			/*  itap	*/
63 
64     unsigned char	ppBreakKind;
65 
66     unsigned char	ppOutlineLevel;			/*  0 .. 9	*/
67 							/*  9= body.	*/
68     unsigned char	ppListLevel; 			/*  ilvl	*/
69 
70     unsigned char	ppAlignment;			/*  (enum)	*/
71 
72     unsigned char	ppLineSpacingIsMultiple;	/*  boolean	*/
73 
74     unsigned char	ppKeepOnPage;			/*  boolean	*/
75     unsigned char	ppKeepWithNext;			/*  boolean	*/
76     unsigned char	ppWidowControl;			/*  boolean	*/
77     unsigned char	ppHyphenateParagraph;		/*  boolean	*/
78 
79 			/**
80 			 * 0: Text in this paragraph will display with
81 			 *	left-to-right precedence (the default)
82 			 * 1: Text in this paragraph will display with
83 			 *	right-to-left precedence
84 			 */
85     unsigned char	ppRToL;
86     } ParagraphProperties;
87 
88 /************************************************************************/
89 /*									*/
90 /*  Numbers of paragraph properies.					*/
91 /*									*/
92 /************************************************************************/
93 
94 typedef enum ParagraphProperty
95     {
96     PPprop_NONE= -1,
97 
98     PPpropSTYLE= 0,
99     PPpropLISTOVERRIDE,
100     PPpropTABLE_NESTING,
101     PPpropLEFT_INDENT,
102     PPpropFIRST_INDENT,
103     PPpropRIGHT_INDENT,
104     PPpropALIGNMENT,
105     PPpropTAB_STOPS,
106     PPpropBREAK_KIND,
107     PPpropWIDCTLPAR,
108     PPpropKEEP,
109     PPpropKEEPN,
110     PPpropSPACE_BEFORE,
111     PPpropSPACE_AFTER,
112     PPpropLINE_SPACING_DIST,
113     PPpropLINE_SPACING_MULT,
114 
115     PPpropTOP_BORDER,
116     PPpropBOTTOM_BORDER,
117     PPpropLEFT_BORDER,
118     PPpropRIGHT_BORDER,
119     PPpropBETWEEN_BORDER,
120     PPpropBAR_BORDER,
121 
122     PPpropSHADING,
123     PPpropFRAME,
124 
125     PPpropOUTLINELEVEL,
126     PPpropLISTLEVEL,
127     PPpropHYPHPAR,
128     PPpropRTOL,
129 
130     PPprop_COUNT,
131 
132     PPprop_IN_TABLE,			/* For read/write/tools only	*/
133 
134     PPprop_IGNORED,
135 
136 	/**
137 	 *  Not real properties. But used for managing the ruler of a
138 	 *  document window.
139 	 */
140     PPprop_COLUMNS,
141     PPprop_TAB_KIND_BUTTON,
142 
143 	/**
144 	 *  Not a real property. But used to support the obsolete \\box tag.
145 	 *
146 	 */
147     PPprop_BOX_BORDER,			/*  Not a real property.	*/
148 					/*  But used to support the	*/
149 					/*  obsolete \\box tag.		*/
150 
151     PPprop_LISB,			/*  ignored.			*/
152     PPprop_LISA,			/*  ignored.			*/
153 
154     PPprop_FULL_COUNT
155     } ParagraphProperty;
156 
157 /************************************************************************/
158 /*									*/
159 /*  Routine declarations.						*/
160 /*									*/
161 /************************************************************************/
162 
163 extern int docUpdParaProperties( PropertyMask *			pPpDonePask,
164 				ParagraphProperties *		pp,
165 				const PropertyMask *		ppSetMask,
166 				const ParagraphProperties *	ppSet,
167 				const DocumentAttributeMap *	dam );
168 
169 extern void docParaPropertyDifference(
170 				PropertyMask *			pDifMask,
171 				const ParagraphProperties *	pp1,
172 				const PropertyMask *		cmpMask,
173 				const ParagraphProperties *	pp2 );
174 
175 extern void docCleanParagraphProperties(	ParagraphProperties *	pp );
176 
177 extern void docInitParagraphProperties(		ParagraphProperties *	pp );
178 
179 extern int docCopyParagraphProperties(
180 				ParagraphProperties *		ppTo,
181 				const ParagraphProperties *	ppFrom );
182 
183 extern int docSetParaProperty(		ParagraphProperties *	pp,
184 					int			prop,
185 					int			arg );
186 
187 extern int docGetParaProperty(		const ParagraphProperties *	pp,
188 					int				prop );
189 
190 #   endif	/*  DOC_PARA_PROP_H	*/
191