/[cvs]/nfo/php/libs/org.netfrag.glib/utils/InfoBox.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.glib/utils/InfoBox.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by joko, Tue May 13 16:22:22 2003 UTC revision 1.2 by joko, Fri Jun 6 04:22:11 2003 UTC
# Line 4  Line 4 
4   * $Id$   * $Id$
5   *   *
6   * $Log$   * $Log$
7     * Revision 1.2  2003/06/06 04:22:11  joko
8     * modifications to be a more advanced abstract base class
9     *
10   * Revision 1.1  2003/05/13 16:22:22  joko   * Revision 1.1  2003/05/13 16:22:22  joko
11   * initial commit   * initial commit
12   *   *
# Line 29  class InfoBox { Line 32  class InfoBox {
32    
33    function InfoBox($args = array()) {    function InfoBox($args = array()) {
34      $this->_args = $args;      $this->_args = $args;
35        $this->settings();
36      $this->build_default();      $this->build_default();
37    }    }
38    
# Line 36  class InfoBox { Line 40  class InfoBox {
40      return $this->_box->render();      return $this->_box->render();
41    }    }
42    
43      function settings() {
44        $this->SETTINGS = array(
45          font_family => 'Verdana',
46          font_size => '12',
47          background => 'lightblue',
48          width => '450',
49          padding => 8
50        );
51      }
52    
53    function build_default() {    function build_default() {
54      $this->_box = html_div();      $this->_box = html_div();
55      $this->_box->set_style("border: 1px groove black; padding:2px; width: 450px; background:lightblue; font-size:12px;");      extract($this->SETTINGS);
56        $line_height = $font_size + $padding - 1;
57        $this->_box->set_style("border: 1px groove black; padding: {$padding}px; line-height: {$line_height}px; background: $background; color: $color; width: {$width}px; font-size: {$font_size}px; font-family: $font_family; font-weight: $font_weight;");
58      $this->_box->add($this->_args[payload]);      $this->_box->add($this->_args[payload]);
59    }    }
60    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed