1 /************************************************************************/
2 /*									*/
3 /*  Notes tool:								*/
4 /*									*/
5 /************************************************************************/
6 
7 #   ifndef	TED_NOTES_TOOL_H
8 #   define	TED_NOTES_TOOL_H
9 
10 #   include	<appFrame.h>
11 #   include	<appInspector.h>
12 #   include	<docBuf.h>
13 #   include	<docSelectionDescription.h>
14 
15 /************************************************************************/
16 /*									*/
17 /*  A notes tool, i.e. the 'Notes' page of the format tool.		*/
18 /*									*/
19 /************************************************************************/
20 
21 typedef struct NotesPageResources
22     {
23     const char *	nprFootnotesText;
24     const char *	nprEndnotesText;
25 
26     const char *	nprFirstNumberText;
27     const char *	nprJustifyText;
28     const char *	nprPositionText;
29     const char *	nprRestartText;
30     const char *	nprStyleText;
31 
32     const char *	nprJustifyMenuTexts[FTNjustify_COUNT];
33     const char *	nprPlacementMenuTexts[FTNplace_COUNT];
34     const char *	nprRestartMenuTexts[FTN_RST__COUNT];
35     const char *	nprNumberStyleMenuTexts[FTNstyle_COUNT];
36 
37     const char *	nprRevertSelectionText;
38     const char *	nprChangeSelectionText;
39     } NotesPageResources;
40 
41 typedef struct NotesTool
42     {
43     EditApplication *		ntApplication;
44     AppInspector *		ntInspector;
45     const NotesPageResources *	ntPageResources;
46 
47     unsigned int		ntNoteTreeType;
48 
49     unsigned char		ntCanChangeSelection;
50     unsigned char		ntCanChangeDocument;
51     int				ntInProgrammaticChange;
52 
53     FootEndNotesProperties	ntNotesPropertiesSetDocument;
54     FootEndNotesProperties	ntNotesPropertiesSetSelection;
55     FootEndNotesProperties	ntNotesPropertiesChosen;
56 
57     APP_WIDGET			ntRevertSelectionWidget;
58     APP_WIDGET			ntChangeSelectionWidget;
59 
60 
61     APP_WIDGET			ntJustifyRow;
62     APP_WIDGET			ntJustifyLabel;
63 				/*  Not all positions used!	*/
64     AppOptionmenu		ntJustifyOptionmenu;
65     APP_WIDGET			ntJustifyOptions[FTNjustify_COUNT];
66 
67     APP_WIDGET			ntPlacementRow;
68     APP_WIDGET			ntPlacementLabel;
69 				/*  Not all positions used!	*/
70     AppOptionmenu		ntPlacementOptionmenu;
71     APP_WIDGET			ntPlacementOptions[FTNplace_COUNT];
72 
73     APP_WIDGET			ntRestartRow;
74     APP_WIDGET			ntRestartLabel;
75 				/*  Not all positions used!	*/
76     AppOptionmenu		ntRestartOptionmenu;
77     APP_WIDGET			ntRestartOptions[FTN_RST__COUNT];
78 
79     APP_WIDGET			ntStyleRow;
80     APP_WIDGET			ntStyleLabel;
81     AppOptionmenu		ntStyleOptionmenu;
82     APP_WIDGET			ntStyleOptions[FTNstyle_COUNT];
83 
84     APP_WIDGET			ntStartNumberRow;
85     APP_WIDGET			ntStartNumberLabel;
86     APP_WIDGET			ntStartNumberText;
87     } NotesTool;
88 
89 /************************************************************************/
90 /*									*/
91 /*  Routine Declarations.						*/
92 /*									*/
93 /************************************************************************/
94 
95 extern void tedFormatToolGetNotesResourceTable( EditApplication *	ea,
96 					NotesPageResources *		spr,
97 					InspectorSubjectResources *	isr );
98 
99 extern void tedRefreshNotesTool( NotesTool *			nt,
100 				int *				pEnabled,
101 				int *				pPref,
102 				InspectorSubject *		is,
103 				const DocumentSelection *	ds,
104 				const SelectionDescription *	sd,
105 				BufferDocument *		bd,
106 				const unsigned char *		cmdEnabled );
107 
108 extern void tedFormatCleanNotesTool(	NotesTool *		nt );
109 
110 extern void tedFormatInitNotesTool(	NotesTool *		nt );
111 
112 extern void tedFormatFillNotesChoosers(	NotesTool *			nt,
113 					const NotesPageResources *	npr );
114 
115 extern void tedFormatFinishNotesPage(	NotesTool *			nt,
116 					const NotesPageResources *	npr );
117 
118 extern void tedFormatFillNotesPage( NotesTool *			nt,
119 				const NotesPageResources *	npr,
120 				InspectorSubject *		is,
121 				APP_WIDGET			pageWidget,
122 				const InspectorSubjectResources * isr,
123 				int				treeType );
124 
125 #   endif	/*  TED_NOTES_TOOL_H */
126