/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/widgets/ButtonPanel.inc
ViewVC logotype

Annotation of /nfo/php/libs/com.newsblob.phphtmllib/widgets/ButtonPanel.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Thu May 6 16:57:34 2004 UTC (20 years, 3 months ago) by jonen
Branch: MAIN
CVS Tags: HEAD
 updated all to v2.4.1 - Apr 01, 2004

1 jonen 1.1 <?php
2     /**
3     * $Id: ButtonPanel.inc,v 1.1 2003/09/29 22:29:23 hemna Exp $
4     *
5     * a button panel for a dialog box window
6     *
7     * @author Suren Markossian
8     * @package phpHtmlLib
9     */
10    
11     /**
12     * This class defines a bottom button panel for a dialog box window
13     * It is a BaseWidget child with a specific css style class and border
14     * This row is separated by vertical top line
15     *
16     * @author Suren Markosian
17     * @package phpHtmlLib
18     */
19     class ButtonPanel extends BaseWidget {
20    
21     /**
22     * Holds all the buttons
23     *
24     **/
25     var $data;
26    
27     /**
28     *
29     * @param string the width of the button panel
30     * @param string the alignment.
31     * @return none.
32     */
33     function ButtonPanel($width = "100%", $align="center") {
34     $this->set_align($align);
35     $this->set_width($width);
36     }
37    
38     /**
39     * Push content onto the data object
40     *
41     * adds a button to the data
42     * @param mixed $content - either string, or tag object.
43     */
44     function add() {
45     $args = func_get_args();
46    
47     foreach($args as $content) {
48     $this->_data[] = $content;
49     }
50     }
51    
52    
53     /**
54     * render the entire table.
55     *
56     */
57     function render($indent_level, $output_debug=0) {
58    
59     $div =& $this->_build_wrapper();
60    
61     foreach ($this->_data as $button) {
62     $div->add($button, _HTML_SPACE);
63     }
64    
65     return $div->render($indent_level, $output_debug);
66     }
67    
68    
69     /**
70     * Builds the outer wrapper for the panel
71     *
72     * @return DIVtag object
73     */
74     function &_build_wrapper() {
75     $div = new DIVtag(array("align"=>"center",
76     "width"=>$this->get_width(),
77     "class"=>"button_panel"
78     ));
79     return $div;
80     }
81     }
82    
83    
84     /**
85     * This class defines the css used by the
86     * FooterNav Object.
87     *
88     * @author Walter A. Boring IV <waboring@buildabetterweb.com>
89     * @package phpHtmlLib
90     */
91     class ButtonPanelCSS extends CSSBuilder {
92    
93     function user_setup() {
94     $this->add_entry(".button_panel", NULL,
95     array("margin" => "12px 0px 10px 0px",
96     "padding" => "4px",
97     "border" => "1px solid #999999") );
98     }
99     }
100     ?>

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