From 0ac3cfcb59a87b58d0a21f1e70dba206bbf43795 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Wed, 14 Apr 2004 12:17:44 +0000 Subject: Restructuring to remove the requirement for a printed paragraph to correspond exactly to a source paragraph. Should allow me to create multiple printed paragraphs from the same source paragraph (i.e. a contents entry for each heading in addition to the heading itself), and invent entirely new printed paragraphs of my own (e.g. for index entries). [originally from svn r4068] --- paper.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'paper.h') diff --git a/paper.h b/paper.h index 7c46571..160bff5 100644 --- a/paper.h +++ b/paper.h @@ -123,6 +123,7 @@ enum { */ struct para_data_Tag { + para_data *next; /* * Data about the fonts used in this paragraph. Indices are the * FONT_* constants defined above. @@ -140,6 +141,18 @@ struct para_data_Tag { */ line_data *first; /* first line in paragraph */ line_data *last; /* last line in paragraph */ + /* + * Some paragraphs have associated graphics; currently this is + * nothing more complex than a single black rectangle. + */ + enum { + RECT_NONE, RECT_CHAPTER_UNDERLINE, RECT_RULE + } rect_type; + /* + * For constructing the page outline. + */ + int outline_level; /* 0=title 1=C 2=H 3=S 4=S2... */ + wchar_t *outline_title; }; struct line_data_Tag { @@ -269,7 +282,7 @@ struct rect_Tag { struct outline_element_Tag { int level; /* 0=title 1=C 2=H 3=S 4=S2... */ - paragraph *para; + para_data *pdata; }; /* -- cgit v1.1