PageRenderTime 15ms CodeModel.GetById 7ms app.highlight 6ms RepoModel.GetById 0ms app.codeStats 1ms

/TeXmacs-1.0.7.11-src/src/Typeset/Format/format.hpp

#
C++ Header | 96 lines | 73 code | 14 blank | 9 comment | 0 complexity | 4c20214a9da1cdf10c788c22f9a649c0 MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0, MPL-2.0-no-copyleft-exception
 1
 2/******************************************************************************
 3* MODULE     : format.hpp
 4* DESCRIPTION: standard formats for placing material
 5* COPYRIGHT  : (C) 1999  Joris van der Hoeven
 6*******************************************************************************
 7* This software falls under the GNU general public license version 3 or later.
 8* It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
 9* in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
10******************************************************************************/
11
12#ifndef FORMAT_H
13#define FORMAT_H
14#include "formatter.hpp"
15#include "Format/line_item.hpp"
16
17struct format_none_rep: public format_rep {
18  format_none_rep ():
19    format_rep (FORMAT_NONE) {}
20  format_none_rep (format_type ft):
21    format_rep (ft) {}
22  bool equal (format fm);
23  operator tree ();
24};
25
26struct format_none {
27  EXTEND_NULL(format,format_none);
28};
29EXTEND_NULL_CODE(format,format_none);
30
31struct format_width_rep: public format_rep {
32  SI width;
33  format_width_rep (SI width2): format_rep (FORMAT_WIDTH), width (width2)
34  { ref_count= 1; }
35  bool equal (format fm);
36  operator tree ();
37};
38
39struct format_width {
40  EXTEND_NULL(format,format_width);
41};
42EXTEND_NULL_CODE(format,format_width);
43
44struct format_cell_rep: public format_rep {
45  SI  width;
46  int vpos;
47  SI  depth;
48  SI  height;
49  format_cell_rep (SI w2, int v2, SI d2, SI h2):
50    format_rep (FORMAT_CELL),
51    width (w2), vpos (v2), depth (d2), height (h2)
52  { ref_count= 1; }
53  bool equal (format fm);
54  operator tree ();
55};
56
57struct format_cell {
58  EXTEND(format,format_cell);
59};
60EXTEND_CODE(format,format_cell);
61
62struct format_vstream_rep: public format_rep {
63  SI width;
64  array<line_item> before;
65  array<line_item> after;
66  format_vstream_rep (SI w2, array<line_item> bef2, array<line_item> aft2):
67    format_rep (FORMAT_VSTREAM), width (w2), before (bef2), after (aft2)
68  { ref_count= 1; }
69  bool equal (format fm);
70  operator tree ();
71};
72
73struct format_vstream {
74  EXTEND(format,format_vstream);
75};
76EXTEND_CODE(format,format_vstream);
77
78struct query_vstream_width_rep: public format_rep {
79  array<line_item> before;
80  array<line_item> after;
81  query_vstream_width_rep (array<line_item> bef2, array<line_item> aft2):
82    format_rep (QUERY_VSTREAM_WIDTH), before (bef2), after (aft2)
83  { ref_count= 1; }
84  bool equal (format fm);
85  operator tree ();
86};
87
88struct query_vstream_width {
89  EXTEND(format,query_vstream_width);
90};
91EXTEND_CODE(format,query_vstream_width);
92
93format make_format_vstream (SI w, array<line_item> bef, array<line_item> aft);
94format make_query_vstream_width (array<line_item> bef, array<line_item> aft);
95
96#endif // defined FORMAT_H