1 /************************************************************************/
2 /*									*/
3 /*  Note related Properties.						*/
4 /*									*/
5 /************************************************************************/
6 
7 #   include	<utilPropMask.h>
8 
9 #   ifndef	DOC_NOTES_PROPERTIES_H
10 #   define	DOC_NOTES_PROPERTIES_H
11 
12 #   define	DPfetFOOT_ONLY		0
13 #   define	DPfetEND_ONLY		1
14 #   define	DPfetFOOT_END_BOTH	2
15 
16 /************************************************************************/
17 /*									*/
18 /*  Placement of notes.							*/
19 /*									*/
20 /*  Experimentation shows that if multiple sections in a document	*/
21 /*  are on the same page, that \sftntj placement places the notes at	*/
22 /*  the bottom of the section and that \sftnbj places them at the	*/
23 /*  bottom of the page.							*/
24 /*									*/
25 /************************************************************************/
26 
27 typedef enum NotesJustification
28     {
29     FTNjustifyBELOW_TEXT= 0,	/*  [s][a]ftntj				*/
30     FTNjustifyPAGE_BOTTOM,	/*  [s][a]ftnbj				*/
31 
32     FTNjustify_COUNT
33     } NotesJustification;
34 
35 typedef enum NotesPlacement
36     {
37 	/**
38 	 * No explicit tag in RTF.
39 	 */
40     FTNplacePAGE_END= 0,
41 	/**
42 	 *  [a]endnotes: No sect variant
43 	 *  The property is ignored for footnotes.
44 	 */
45     FTNplaceSECT_END,
46 	/**
47 	 *  [a]enddoc: No sect variant
48 	 *  The property is ignored for footnotes.
49 	 */
50     FTNplaceDOC_END,
51 
52     FTNplace_COUNT
53     } NotesPlacement;
54 
55 typedef enum NotesRestart
56     {
57     FTN_RST_CONTINUOUS= 0,
58     FTN_RST_PER_SECTION,
59     FTN_RST_PER_PAGE,
60 
61     FTN_RST__COUNT
62     } NotesRestart;
63 
64 typedef enum NotesNumberStyle
65     {
66     FTNstyleNAR= 0,
67     FTNstyleNALC,
68     FTNstyleNAUC,
69     FTNstyleNRLC,
70     FTNstyleNRUC,
71     FTNstyleNCHI,
72 
73     FTNstyle_COUNT
74     } NotesNumberStyle;
75 
76 /**
77  *  Notes properties. Never directly used.
78  *  The document and the section have their own property numbers.
79  */
80 typedef enum NotesProperty
81     {
82     NOTESpropSTARTNR= 0,
83     NOTESpropJUSTIFICATION,
84     NOTESpropPLACEMENT,
85     NOTESpropRESTART,
86     NOTESpropSTYLE,
87 
88     NOTESprop_COUNT
89     } NotesProperty;
90 
91 typedef enum FootEndNotesProperty
92     {
93     FEPpropFOOT_STARTNR= 0,
94     FEPpropFOOT_JUSTIFICATION,
95     FEPpropFOOT_PLACEMENT,
96     FEPpropFOOT_RESTART,
97     FEPpropFOOT_STYLE,
98 
99     FEPpropEND_STARTNR,
100     FEPpropEND_JUSTIFICATION,
101     FEPpropEND_PLACEMENT,
102     FEPpropEND_RESTART,
103     FEPpropEND_STYLE,
104 
105     FEPprop_COUNT
106     } FootEndNotesProperty;
107 
108 typedef struct NotesProperties
109     {
110     int			npStartNumber;
111     unsigned char	npJustification;
112     unsigned char	npPlacement;		/*  Ignored for sect	*/
113     unsigned char	npRestart;
114     unsigned char	npNumberStyle;
115     } NotesProperties;
116 
117 typedef struct FootEndNotesProperties
118     {
119     NotesProperties	fepFootnotesProps;
120     NotesProperties	fepEndnotesProps;
121     } FootEndNotesProperties;
122 
123 /************************************************************************/
124 /*									*/
125 /*  Routine Declarations.						*/
126 /*									*/
127 /************************************************************************/
128 
129 extern int docUpdFootEndNotesProperties(
130 		PropertyMask *			pDoneMask,
131 		FootEndNotesProperties *	fep,
132 		const PropertyMask *		setMask,
133 		const FootEndNotesProperties *	fepSet,
134 		const int			fepPropMap[FEPprop_COUNT] );
135 
136 extern int docFootEndNotesPropertyDifference(
137 		PropertyMask *			pDifMask,
138 		const FootEndNotesProperties *	fep1,
139 		const PropertyMask *		cmpMask,
140 		const FootEndNotesProperties *	fep2,
141 		const int			fepPropMap[FEPprop_COUNT] );
142 
143 extern int docSetNotesProperty(		NotesProperties *	np,
144 					int			prop,
145 					int			val );
146 
147 extern int docGetNotesProperty(		const NotesProperties *	np,
148 					int			prop );
149 
150 extern void docInitNotesProperties(		NotesProperties *	np );
151 extern void docInitFootEndNotesProperties(	FootEndNotesProperties * fep );
152 
153 extern void docDefaultFootNotesProperties(	NotesProperties *	np );
154 extern void docDefaultEndNotesProperties(	NotesProperties *	np );
155 extern void docDefaultFootEndNotesProperties(	FootEndNotesProperties * fep );
156 
157 extern const char * docNotesJustificationStr(	int		val );
158 extern const char * docNotesPlacementStr(	int		val );
159 
160 #   endif	/*  DOC_NOTES_PROPERTIES_H  */
161