File: tedNotesTool.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 (116 lines) | stat: -rw-r--r-- 3,275 bytes parent folder | download | duplicates (2)
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
/************************************************************************/
/*									*/
/*  Notes tool:								*/
/*									*/
/************************************************************************/

#   ifndef	TED_NOTES_TOOL_H
#   define	TED_NOTES_TOOL_H

/************************************************************************/
/*									*/
/*  A notes tool, i.e. the 'Notes' page of the format tool.		*/
/*									*/
/************************************************************************/

typedef struct NotesPageResources
    {
    char *		nprCurrentNoteText;
    char *		nprFootnoteText;
    char *		nprEndnoteText;
    char *		nprFixedTextText;
    char *		nprToNoteRefText;
    char *		nprToNoteText;
    char *		nprRevertNoteText;
    char *		nprChangeNoteText;

    char *		nprFootnotesText;
    char *		nprEndnotesText;

    char *		nprFirstNumberText;
    char *		nprPositionText;
    char *		nprRestartText;
    char *		nprStyleText;

    char *		nprPositionMenuTexts[FTN_POS__COUNT];
    char *		nprRestartMenuTexts[FTN_RST__COUNT];
    char *		nprNumberStyleMenuTexts[FTNstyle_COUNT];
    } NotesPageResources;

typedef struct NotePropertiesTool
    {
    APP_WIDGET			nptFrame;
    APP_WIDGET			nptPaned;
    APP_WIDGET			nptStartNumberText;

				/*  Not all positions used!	*/
    AppOptionmenu		nptPositionOptionmenu;
    APP_WIDGET			nptPositionOptions[FTN_POS__COUNT];

				/*  Not all positions used!	*/
    AppOptionmenu		nptRestartOptionmenu;
    APP_WIDGET			nptRestartOptions[FTN_RST__COUNT];

    AppOptionmenu		nptStyleOptionmenu;
    APP_WIDGET			nptStyleOptions[FTNstyle_COUNT];
    } NotePropertiesTool;

typedef struct NotesTool
    {
    EditApplication *		ntApplication;
    AppInspector *		ntInspector;
    const NotesPageResources *	ntPageResources;

    int				ntNoteNumber;
    int				ntNoteKindChosen;
    int				ntNoteKindSet;
    int				ntFixedTextChosen;
    int				ntFixedTextSet;
    int				ntInsideNote;

    unsigned char		ntNoteTextSet[20+1];
    unsigned char		ntNoteTextChosen[20+1];

    DocumentProperties		ntPropertiesChosen;
    DocumentProperties		ntPropertiesSet;

    /****/
    APP_WIDGET			ntCurrentNoteFrame;
    APP_WIDGET			ntCurrentNotePaned;
    APP_WIDGET			ntFootnoteToggle;
    APP_WIDGET			ntEndnoteToggle;
    APP_WIDGET			ntFixedTextToggle;
    APP_WIDGET			ntFixedTextText;

    APP_WIDGET			ntToNoteRefButton;
    APP_WIDGET			ntToNoteButton;

    APP_WIDGET			ntRevertNoteButton;
    APP_WIDGET			ntChangeNoteButton;

    /****/
    NotePropertiesTool		ntFootnotePropertiesTool;
    NotePropertiesTool		ntEndnotePropertiesTool;
    } NotesTool;

/************************************************************************/
/*									*/
/*  Routine Declarations.						*/
/*									*/
/************************************************************************/

extern void tedFormatToolGetNotesResourceTable( EditApplication *	ea,
					NotesPageResources *		spr,
					InspectorSubjectResources *	isr );

extern void tedFormatToolRefreshNotesTool(
				NotesTool *			nt,
				int *				pEnabled,
				int *				pPref,
				InspectorSubject *		is,
				const DocumentSelection *	ds,
				BufferDocument *		bd );

extern void tedFormatCleanNotesTool(	NotesTool *		nt );

#   endif	/*  TED_NOTES_TOOL_H */