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

Contents of /nfo/php/libs/com.newsblob.phphtmllib/widgets/BaseWidget.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations)
Thu May 6 16:27:40 2004 UTC (20 years, 2 months ago) by jonen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +0 -0 lines
 updated all to v2.4.1 - Apr 01, 2004

1 <?php
2
3 /**
4 * This file contains the BaseWidget class
5 *
6 * $Id: BaseWidget.inc,v 1.6 2002/10/31 23:21:00 hemna Exp $
7 *
8 * @author Walter A. Boring IV <waboring@buildabetterweb.com>
9 * @package phpHtmlLib
10 *
11 */
12
13 /**
14 * this is the base widget class, that all widgets
15 * are based off of. It provides some basic
16 * members and methods
17 *
18 * @author Walter A. Boring IV <waboring@buildabetterweb.com>
19 * @package phpHtmlLib
20 */
21 class BaseWidget extends Container {
22
23 /**
24 * the indent level
25 * @access private
26 * @var int
27 */
28 var $_indent_level=1;
29
30 /**
31 * The title of the table.
32 * @access public
33 * @var string
34 */
35 var $title='';
36
37 /**
38 * the width of the widget
39 * @access public
40 * @var string
41 */
42 var $width="100%";
43
44 /**
45 * The widget wide alignment
46 * value.
47 * @access private
48 * @var string
49 */
50 var $_align = NULL;
51
52 /**
53 * hold the data for this
54 * widget. can be anything,
55 * depends on the child class.
56 * defaults to an array.
57 * @access private
58 * @var array
59 */
60 var $data = array();
61
62
63 /**
64 * Function for returning the raw javascript
65 * that is required for this widget.
66 *
67 * @return string - the raw javascript
68 */
69 function get_javascript() {
70 return NULL;
71 }
72
73 /**
74 * This function provides the
75 * mechanism to build and return
76 * the css needed by this widget
77 *
78 * @return string the raw css
79 */
80 function get_css() {
81 return NULL;
82 }
83
84 /**
85 * Set the title for the widget.
86 * this is just a generic title string
87 * that can be used however the child class
88 * wants to use it.
89 *
90 * @param string - $title
91 */
92 function set_title( $title ) {
93 $this->title = $title;
94 }
95
96 /**
97 * Function for accessing the
98 * title of this widget
99 *
100 * @return string - the title
101 */
102 function get_title() {
103 return $this->title;
104 }
105
106
107 /**
108 * Set the width for the widget.
109 * this is meant to be the overall
110 * width expected to be used to
111 * control the generated html.
112 *
113 * @param string - $width (ie. 80, 100%)
114 */
115 function set_width( $width ) {
116 $this->width = $width;
117 }
118
119 /**
120 * Function for getting the current
121 * widget width setting.
122 *
123 * @return string - the width
124 */
125 function get_width() {
126 return $this->width;
127 }
128
129 /**
130 * This function sets the align attribute
131 * for the outer table.
132 *
133 * @param string - $align - the align value
134 */
135 function set_align( $align ) {
136 $this->_align = $align;
137 }
138
139 /**
140 * This gets the alignment value
141 * for the outer table
142 *
143 * @return string - the alignment
144 */
145 function get_align() {
146 return $this->_align;
147 }
148 }
149 ?>

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