File: docExternalItem.h

package info (click to toggle)
ted 2.11-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 11,064 kB
  • ctags: 13,935
  • sloc: ansic: 120,446; makefile: 7,469; sh: 253
file content (120 lines) | stat: -rw-r--r-- 3,034 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
/************************************************************************/
/*									*/
/*  Pieces of text, physically implemented as a 'Section' thay are	*/
/*  outside the normal flow of text.					*/
/*									*/
/************************************************************************/

#   ifndef	DOC_EXTERNAL_ITEM_H
#   define	DOC_EXTERNAL_ITEM_H

/************************************************************************/
/*									*/
/*  Forward declarations of structs.					*/
/*									*/
/************************************************************************/

struct BufferDocument;
struct BufferItem;
struct DocumentField;

/************************************************************************/
/*									*/
/*  Kinds of external items.						*/
/*									*/
/************************************************************************/

typedef enum WhatPages
    {
    PAGES_FIRST_PAGE= 0,
    PAGES_SUBSEQUENT_PAGES,
    PAGES_ALL_PAGES,
    PAGES_ODD_PAGES,
    PAGES_EVEN_PAGES,
    PAGES__COUNT
    } WhatPages;

typedef enum DOC_ItemRoot
    {
    DOCinUNKNOWN= 0,

    DOCinBODY,

    DOCinSECT_HEADER,
    DOCinFIRST_HEADER,
    DOCinLEFT_HEADER,
    DOCinRIGHT_HEADER,

    DOCinSECT_FOOTER,
    DOCinFIRST_FOOTER,
    DOCinLEFT_FOOTER,
    DOCinRIGHT_FOOTER,

    DOCinFOOTNOTE,
    DOCinENDNOTE,

    DOCinFTNSEP,
    DOCinFTNSEPC,
    DOCinFTNCN,

    DOCinAFTNSEP,
    DOCinAFTNSEPC,
    DOCinAFTNCN,

    DOCin_COUNT
    } DOC_ItemRoot;

const int DOC_HeaderScopes[PAGES__COUNT];
const int DOC_FooterScopes[PAGES__COUNT];

/************************************************************************/
/*									*/
/*  A structure describing an external iem.				*/
/*									*/
/************************************************************************/

typedef struct ExternalItem
    {
    struct BufferItem *	eiItem;
    int			eiPageFormattedFor;
    int			eiY0UsedTwips;
    int			eiY1UsedTwips;
    int			eiY0ReservedTwips;
    int			eiY1ReservedTwips;

    int			eiPageSelectedUpon;
    } ExternalItem;

/************************************************************************/
/*									*/
/*  A footnote/endnote.							*/
/*									*/
/*  1)  Though the notes are stored with the section, the paragraph	*/
/*	number is relative to the body of the document as a whole.	*/
/*									*/
/************************************************************************/

typedef struct DocumentNote
    {
    ExternalItem	dnExternalItem;
    int			dnNoteNumber;
    int			dnReferringPage;
    int			dnSectNr;
    int			dnParaNr;
    int			dnStroff;
    int			dnReferringColumn;
    int			dnExternalItemKind;
    } DocumentNote;

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

extern void docInitExternalItem(	ExternalItem *		ei );

extern void docCleanExternalItem(	struct BufferDocument *	bd,
					ExternalItem *		ei );

#   endif