Back to index

texmacs  1.0.7.15
page_item.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : page_item.hpp
00004 * DESCRIPTION: A typesetted document consists of an array of page_items.
00005 *              Each page item contains spacing and page breaking information.
00006 * COPYRIGHT  : (C) 1999  Joris van der Hoeven
00007 *******************************************************************************
00008 * This software falls under the GNU general public license version 3 or later.
00009 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
00010 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
00011 ******************************************************************************/
00012 
00013 #ifndef PAGE_ITEM_H
00014 #define PAGE_ITEM_H
00015 #include "boxes.hpp"
00016 #include "formatter.hpp"
00017 
00018 #define PAGE_LINE_ITEM      0
00019 #define PAGE_HIDDEN_ITEM    1
00020 #define PAGE_CONTROL_ITEM   2
00021 
00022 class page_item;
00023 class page_item_rep: public concrete_struct {
00024 public:
00025   int          type;    // type of the page item
00026 
00027   box          b;       // the box
00028   space        spc;     // separation space
00029   int          penalty; // penalty for a linebreak after this page_item
00030 
00031   array<lazy>  fl;      // floating objects attached to this item
00032   int          nr_cols; // number of columns
00033   tree         t;       // for page control items
00034 
00035   page_item_rep (box b, array<lazy> fl, int nr_cols);
00036   page_item_rep (tree t, int nr_cols);
00037   page_item_rep (int type, box b, space spc, int pen,
00038                array<lazy> fl, int nr_cols, tree t);
00039 };
00040 
00041 class page_item {
00042   CONCRETE_NULL(page_item);
00043   page_item (box b, array<lazy> fl= 0, int nr_cols= 1);
00044   page_item (tree t, int nr_cols);
00045   page_item (int type, box b, space spc, int penalty,
00046             array<lazy> fl, int nr_cols, tree t);
00047   bool operator == (page_item item2);
00048   bool operator != (page_item item2);
00049   friend page_item copy (page_item l);
00050 };
00051 CONCRETE_NULL_CODE(page_item);
00052 
00053 tm_ostream& operator << (tm_ostream& out, page_item item);
00054 
00055 #endif // defined PAGE_ITEM_H