2 /******************************************************************************
3 * MODULE : page_item.hpp
4 * DESCRIPTION: A typesetted document consists of an array of page_items.
5 * Each page item contains spacing and page breaking information.
6 * COPYRIGHT : (C) 1999 Joris van der Hoeven
7 *******************************************************************************
8 * This software falls under the GNU general public license version 3 or later.
9 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
10 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
11 ******************************************************************************/
16 #include "formatter.hpp"
18 #define PAGE_LINE_ITEM 0
19 #define PAGE_HIDDEN_ITEM 1
20 #define PAGE_CONTROL_ITEM 2
23 class page_item_rep
: public concrete_struct
{
25 int type
; // type of the page item
28 space spc
; // separation space
29 int penalty
; // penalty for a linebreak after this page_item
31 array
<lazy
> fl
; // floating objects attached to this item
32 int nr_cols
; // number of columns
33 tree t
; // for page control items
35 page_item_rep (box b
, array
<lazy
> fl
, int nr_cols
);
36 page_item_rep (tree t
, int nr_cols
);
37 page_item_rep (int type
, box b
, space spc
, int pen
,
38 array
<lazy
> fl
, int nr_cols
, tree t
);
42 CONCRETE_NULL(page_item
);
43 page_item (box b
, array
<lazy
> fl
= 0, int nr_cols
= 1);
44 page_item (tree t
, int nr_cols
);
45 page_item (int type
, box b
, space spc
, int penalty
,
46 array
<lazy
> fl
, int nr_cols
, tree t
);
47 bool operator == (page_item item2
);
48 bool operator != (page_item item2
);
49 friend page_item
copy (page_item l
);
51 CONCRETE_NULL_CODE(page_item
);
53 tm_ostream
& operator << (tm_ostream
& out
, page_item item
);
55 #endif // defined PAGE_ITEM_H