File: docParaProperties.h

package info (click to toggle)
ted 2.16-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 13,944 kB
  • ctags: 20,273
  • sloc: ansic: 167,980; makefile: 12,518; sh: 263
file content (173 lines) | stat: -rw-r--r-- 4,636 bytes parent folder | download
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
/************************************************************************/
/*									*/
/*  Paragraph properties.						*/
/*									*/
/************************************************************************/

#   ifndef	DOC_PARA_PROP_H
#   define	DOC_PARA_PROP_H

#   include	<utilDocFont.h>
#   include	"utilPropMask.h"
#   include	"docPropVal.h"
#   include	"docTabStop.h"
#   include	"docBorderProperties.h"
#   include	"docItemShading.h"
#   include	"docParaNumber.h"
#   include	"docFrameProperties.h"

/************************************************************************/
/*									*/
/*  Paragraph properties.						*/
/*									*/
/*  Unless explicitly stated, all properties except numbers in pixels	*/
/*  are properties of the paragraph.					*/
/*									*/
/*  1)  Tab stops.							*/
/*  2)  Indentations.							*/
/*  3)  White space above/after the paragraph.				*/
/*  4)  Style, List Override ID.					*/
/*  5)  Borders.							*/
/*  6)  Shading.							*/
/*									*/
/************************************************************************/

typedef struct ParagraphProperties
    {
    /*  1  */
    TabStopList		ppTabStopList;

    /*  2  */
    short int		ppFirstIndentTwips;
    short int		ppLeftIndentTwips;
    short int		ppRightIndentTwips;

    /*  3  */
    short int		ppSpaceBeforeTwips;
    short int		ppSpaceAfterTwips;
    short int		ppLineSpacingTwips;

    /*  4  */
    short int		ppStyle;
    short int		ppListOverride;

    /*  5  */
    BorderProperties	ppTopBorder;
    BorderProperties	ppBottomBorder;
    BorderProperties	ppLeftBorder;
    BorderProperties	ppRightBorder;
    BorderProperties	ppBoxBorder;
    BorderProperties	ppBetweenBorder;
    BorderProperties	ppBar;

    /*  6  */
    ItemShading		ppShading;

    unsigned int	ppOutlineLevel:4;
    unsigned int	ppListLevel:4; 			/*  ilvl	*/

    unsigned int	ppAlignment:3;			/*  (enum)	*/

    unsigned int	ppStartsOnNewPage:1;
    unsigned int	ppInTable:1;
    unsigned int	ppLineSpacingIsMultiple:1;

    unsigned int	ppKeepOnPage:1;
    unsigned int	ppKeepWithNext:1;
    unsigned int	ppWidowControl:1;
    unsigned int	ppHyphenateParagraph:1;
    } ParagraphProperties;

/************************************************************************/
/*									*/
/*  Numbers of paragraph properies.					*/
/*									*/
/************************************************************************/

typedef enum ParagraphProperty
    {
    PPprop_NONE= -1,

    PPpropSTYLE= 0,
    PPpropLISTOVERRIDE,
    PPpropIN_TABLE,
    PPpropLEFT_INDENT,
    PPpropFIRST_INDENT,
    PPpropRIGHT_INDENT,
    PPpropALIGNMENT,
    PPpropTAB_STOPS,
    PPpropNEWPAGE,
    PPpropWIDCTLPAR,
    PPpropKEEP,
    PPpropKEEPN,
    PPpropSPACE_BEFORE,
    PPpropSPACE_AFTER,
    PPpropLINE_SPACING_DIST,
    PPpropLINE_SPACING_MULT,

    PPpropTOP_BORDER,
    PPpropBOTTOM_BORDER,
    PPpropLEFT_BORDER,
    PPpropRIGHT_BORDER,
    PPpropBOX_BORDER,
    PPpropBETWEEN_BORDER,
    PPpropBAR_BORDER,

    PPpropSHADE_FORE_COLOR,
    PPpropSHADE_BACK_COLOR,
    PPpropSHADE_LEVEL,
    PPpropSHADE_PATTERN,

    PPpropOUTLINELEVEL,
    PPpropLISTLEVEL,
    PPpropHYPHPAR,

    PPpropCOLUMNS,			/*  Not a real property.	*/
					/*  But used for managing the	*/
					/*  ruler of a document window.	*/

    PPprop_COUNT
    } ParagraphProperty;

/************************************************************************/
/*									*/
/*  Routine declarations.						*/
/*									*/
/************************************************************************/

extern int docParaAddTab(	ParagraphProperties *	pp,
				const TabStop *		tsNew );

extern void docParaDeleteTab(	ParagraphProperties *	pp,
				int			n );

extern int docUpdParaProperties( PropertyMask *			pPpChgPask,
				ParagraphProperties *		pp,
				const PropertyMask *		ppUpdMask,
				const ParagraphProperties *	ppNew,
				const int *			colorMap,
				const int *			listStyleMap );

extern void docParaPropertyDifference(
				PropertyMask *			pChgMask,
				const ParagraphProperties *	pp1,
				const ParagraphProperties *	pp2,
				const PropertyMask *		updMask );

extern void docCleanParagraphProperties(	ParagraphProperties *	pp );

extern void docInitParagraphProperties(		ParagraphProperties *	pp );

extern int docCopyParagraphProperties(
				ParagraphProperties *		ppTo,
				const ParagraphProperties *	ppFrom );

extern void docShadingMaskToParagraphMask(
					PropertyMask *		ppPropMask,
					const PropertyMask *	isPropMask );

extern void docShadingMaskFromParagraphMask(
					PropertyMask *		ppPropMask,
					const PropertyMask *	isPropMask );

#   endif	/*  DOC_PARA_PROP_H	*/