Back to index

texmacs  1.0.7.15
stack_border.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : stack_border.hpp
00004 * DESCRIPTION: Border properties of a stack of page items
00005 * COPYRIGHT  : (C) 1999  Joris van der Hoeven
00006 *******************************************************************************
00007 * This software falls under the GNU general public license version 3 or later.
00008 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
00009 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
00010 ******************************************************************************/
00011 
00012 #ifndef STACK_BORDER_H
00013 #define STACK_BORDER_H
00014 #include "space.hpp"
00015 
00016 class stack_border_rep: public concrete_struct {
00017 public:
00018   SI    height;  // default distance between successive base lines
00019   SI    sep;     // (~~PAR_SEP) sep-ver_sep is maximal amount of shoving
00020   SI    hor_sep; // min. hor. ink sep. when lines are shoved into each other
00021   SI    ver_sep; // minimal separation of ink
00022   SI    bot;     // logical bottom of lines
00023   SI    top;     // logical top of lines
00024 
00025   SI    height_before;
00026   SI    sep_before;
00027   SI    hor_sep_before;
00028   SI    ver_sep_before;
00029 
00030   space vspc_before, vspc_after;
00031   bool  nobr_before, nobr_after;
00032 
00033   inline stack_border_rep ():
00034     height (0), sep (0), hor_sep (0), ver_sep (0), bot (0), top (0),
00035     height_before (0), sep_before (0), hor_sep_before (0), ver_sep_before (0),
00036     vspc_before (0), vspc_after (0),
00037     nobr_before (false), nobr_after (false) {}
00038 };
00039 
00040 class stack_border {
00041   CONCRETE(stack_border);
00042   inline stack_border (): rep (tm_new<stack_border_rep> ()) {}
00043 };
00044 CONCRETE_CODE(stack_border);
00045 
00046 inline tm_ostream&
00047 operator << (tm_ostream& out, stack_border sb) {
00048   return out << "[Before: " << sb->vspc_before
00049             << ", " << sb->nobr_before << "; "
00050             << "After: " << sb->vspc_after
00051             << ", " << sb->nobr_after << "]";
00052 }
00053 
00054 #endif // defined STACK_BORDER_H