/[cvs]/nfo/php/libs/org.netfrag.app/WebExplorer/Module/AbstractGUIModule.php
ViewVC logotype

Annotation of /nfo/php/libs/org.netfrag.app/WebExplorer/Module/AbstractGUIModule.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Thu Mar 20 03:49:22 2003 UTC (21 years, 6 months ago) by jonen
Branch: MAIN
+ initial commit

1 jonen 1.1 <?
2     /*
3     ## -----------------------------------------------------------------------------
4     ## $Id: AbstractGUIModule.inc,v 1.1 2003/03/01 22:57:23 cvsmax Exp $
5     ## -----------------------------------------------------------------------------
6     ## $Log: AbstractGUIModule.inc,v $
7     ## Revision 1.1 2003/03/01 22:57:23 cvsmax
8     ## + inital commit
9     ##
10     ##
11     ## -----------------------------------------------------------------------------
12     */
13    
14     /**
15     * AbstractGUIModule class provides an simple way to create new modules
16     * for the Explorer, eg navigation or data browsing elements.
17     *
18     *
19     */
20    
21    
22     class WebExplorer_Module_AbstractGUIModule {
23    
24    
25     /**
26     * most modules needs arguments e.g. data_locator_key, caption etc.
27     */
28     var $_args = array();
29    
30     /**
31     * this holds the api declaration of the module
32     */
33     var $_api = array();
34    
35     var $_gui_object;
36    
37     /**
38     * the contructor
39     *
40     * @params object ref - the source object to render data for
41     * @params string - the caption, if needed
42     */
43     function WebExplorer_Module_AbstractGUIModule($args = array()) {
44     $this->_args = $args;
45     $this->_api = $this->default_api();
46    
47     $this->set_gui_object();
48     //print Dumper($this->_gui_object);
49     }
50    
51     function get_api() {
52     return $this->_api;
53     }
54    
55     function default_api() {
56     $declaration = array(
57     'contructor' => array(
58     'args' => "struct",
59     'return' => "object"
60     ),
61     );
62     return $declaration;
63     }
64    
65    
66     function set_gui_object() {
67     user_error("AbstractGUIModule::set_gui_object() - Child must override");
68     }
69    
70    
71     function add_hidden_items($items) {
72     foreach($items as $label => $value) {
73     $this->add_hidden_item($label, $value);
74     }
75     }
76    
77     function add_hidden_item($label, $value) {
78     //print "Label: $label => $value<br>";
79     $this->_gui_object->add_hidden_item($label, $value);
80     }
81    
82     function &get() {
83     return $this->_gui_object;
84     }
85    
86     }
87    
88     ?>

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