Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
 
3
class FakeTableCellBox extends TableCellBox {
4
  var $colspan;
5
  var $rowspan;
6
 
7
  function create(&$pipeline) {
8
    $box =& new FakeTableCellBox;
9
 
10
    $css_state =& $pipeline->get_current_css_state();
11
    $css_state->pushDefaultState();
12
 
13
    $box->readCSS($css_state);
14
 
15
    $nullbox =& new NullBox;
16
    $nullbox->readCSS($css_state);
17
    $box->add_child($nullbox);
18
 
19
    $box->readCSS($css_state);
20
 
21
    $css_state->popState();
22
 
23
    return $box;
24
  }
25
 
26
  function FakeTableCellBox() {
27
    // Required to reset any constraints initiated by CSS properties
28
    $this->colspan = 1;
29
    $this->rowspan = 1;
30
    $this->GenericContainerBox();
31
 
32
    $this->setCSSProperty(CSS_DISPLAY, 'table-cell');
33
    $this->setCSSProperty(CSS_VERTICAL_ALIGN, VA_MIDDLE);
34
  }
35
 
36
  function show(&$viewport) {
37
    return true;
38
  }
39
 
40
  function is_fake() {
41
    return true;
42
  }
43
 
44
  function get_width_constraint() {
45
    return new WCNone();
46
  }
47
 
48
  function get_height_constraint() {
49
    return new HCConstraint(null, null, null);
50
  }
51
 
52
  function get_height() {
53
    return 0;
54
  }
55
 
56
  function get_top_margin() {
57
    return 0;
58
  }
59
 
60
  function get_full_height() {
61
    return 0;
62
  }
63
 
64
  function get_max_width() {
65
    return 0;
66
  }
67
 
68
  function get_min_width() {
69
    return 0;
70
  }
71
}
72
 
73
?>