~registry/texmacs/trunk

« back to all changes in this revision

Viewing changes to src/src/Typeset/Format/format.cpp

  • Committer: mgubi
  • Date: 2009-06-04 15:13:41 UTC
  • Revision ID: svn-v4:64cb5145-927a-446d-8aed-2fb7b4773692:trunk:2717
Support for X11 TeXmacs.app on Mac

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
/******************************************************************************
3
 
* MODULE     : format.cpp
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
 
#include "Format/format.hpp"
13
 
 
14
 
bool
15
 
format_none_rep::equal (format fm) {
16
 
  return (fm->type == type);
17
 
}
18
 
 
19
 
format_none_rep::operator tree () { return "none"; }
20
 
 
21
 
bool
22
 
format_width_rep::equal (format fm) {
23
 
  if (fm->type != type) return false;
24
 
  format_width fw= (format_width) fm;
25
 
  return (fw->width == width);
26
 
}
27
 
 
28
 
format_width_rep::operator tree () {
29
 
  return tuple ("format width", as_string (width));
30
 
}
31
 
 
32
 
bool
33
 
format_cell_rep::equal (format fm) {
34
 
  if (fm->type != type) return false;
35
 
  format_cell fw= (format_cell) fm;
36
 
  return
37
 
    (fw->width == width) && (fw->vpos == vpos) &&
38
 
    (fw->depth == depth) && (fw->height == height);
39
 
}
40
 
 
41
 
format_cell_rep::operator tree () {
42
 
  return tuple ("format cell", as_string (width));
43
 
}
44
 
 
45
 
bool
46
 
format_vstream_rep::equal (format fm) {
47
 
  if (fm->type != type) return false;
48
 
  format_vstream fw= (format_vstream) fm;
49
 
  return
50
 
    (fw->width == width) && (fw->before == before) && (fw->after == after);
51
 
}
52
 
 
53
 
format_vstream_rep::operator tree () {
54
 
  return tuple ("format vstream");
55
 
}
56
 
 
57
 
bool
58
 
query_vstream_width_rep::equal (format fm) {
59
 
  if (fm->type != type) return false;
60
 
  query_vstream_width fw= (query_vstream_width) fm;
61
 
  return (fw->before == before) && (fw->after == after);
62
 
}
63
 
 
64
 
query_vstream_width_rep::operator tree () {
65
 
  return tuple ("query vstream width");
66
 
}