TabSelector Class Reference

Allow to draw a tab selector. More...

Inheritance diagram for TabSelector:

Inheritance graph
[legend]
Collaboration diagram for TabSelector:

Collaboration graph
[legend]

Public Member Functions

 add ($element, $options=array())
 addActiveTab ($name, $title, $params=array())
 addTab ($name, $title, $params=array())
 begin ()
 display ()
 end ()
 getDefaultTab ()
 hasBeenPopped ()
 HtmlContainer ()
 pop ()
 push ($element)
 TabSelector ()

Data Fields

 $debug
 $elements
 $index
 $popped

Detailed Description

Allow to draw a tab selector.

Definition at line 1625 of file PageGenerator.php.


Member Function Documentation

HtmlContainer::add ( element,
options = array() 
) [inherited]

Definition at line 1999 of file PageGenerator.php.

01999                                                {
02000         $element->setOptions($options);
02001         $this->push($element);
02002     }

TabSelector::addActiveTab ( name,
title,
params = array() 
)

Definition at line 1640 of file PageGenerator.php.

01640                                                             {
01641         $tab = new TabWidget($name, $title, $params);
01642         $tab->setActive(True);
01643         $this->add($tab);
01644     }

TabSelector::addTab ( name,
title,
params = array() 
)

Definition at line 1646 of file PageGenerator.php.

01646                                                       {
01647         $this->add(new TabWidget($name, $title, $params));
01648     }

TabSelector::begin (  ) 

Reimplemented from HtmlContainer.

Definition at line 1650 of file PageGenerator.php.

01650                      {
01651         return '<div class="tabselector"><ul>';
01652     }

HtmlContainer::display (  )  [inherited]

Definition at line 1993 of file PageGenerator.php.

01993                        {
01994         print "\n" . $this->begin() . "\n";
01995         foreach($this->elements as $element) $element->display();
01996         print "\n" . $this->end() . "\n";
01997     }

TabSelector::end (  ) 

Reimplemented from HtmlContainer.

Definition at line 1654 of file PageGenerator.php.

01654                    {
01655         return "</ul></div>";
01656     }

TabSelector::getDefaultTab (  ) 

Definition at line 1633 of file PageGenerator.php.

01633                              {
01634         if (empty($this->elements))
01635             return null;
01636         else
01637             return $this->elements[0];
01638     }

HtmlContainer::hasBeenPopped (  )  [inherited]

Definition at line 2023 of file PageGenerator.php.

02023                              {
02024 
02025         if ($this->popped) $ret = True;
02026         else if ($this->index == -1) $ret = False;
02027         else $ret = False;
02028         return $ret;
02029     }

HtmlContainer::HtmlContainer (  )  [inherited]

Definition at line 1979 of file PageGenerator.php.

01979                              {
01980         $this->elements = array();
01981         $this->popped = False;
01982         $this->index = -1;
01983     }

HtmlContainer::pop (  )  [inherited]

Definition at line 2031 of file PageGenerator.php.

02031                    {
02032         if (!$this->popped) {
02033             if ($this->index == -1)
02034                 $this->popped = True;
02035             else if ($this->elements[$this->index]->hasBeenPopped())
02036                 $this->popped = True;
02037             else $this->elements[$this->index]->pop();
02038             //if ($this->popped) print "popping " . $this->options["id"] . "<br>";
02039         } else die("Nothing more to pop");
02040     }

HtmlContainer::push ( element  )  [inherited]

Definition at line 2004 of file PageGenerator.php.

02004                             {
02005         if ($this->index == -1) {
02006             /* Add first element to container */
02007             $this->index++;
02008             $this->elements[$this->index] = $element;
02009             //print "pushing " . $element->options["id"] . " into " . $this->options["id"] . "<br>";
02010         } else {
02011             if ($this->elements[$this->index]->hasBeenPopped()) {
02012                 /* All the contained elements have been popped, so add the new element in the list */
02013                 $this->index++;
02014                 $this->elements[$this->index] = $element;
02015                 //print "pushing " . $element->options["id"] . " into " . $this->options["id"] . "<br>";
02016             } else {
02017                 /* Recursively push a new element into the container */
02018                 $this->elements[$this->index]->push($element);
02019             }
02020         }
02021     }

TabSelector::TabSelector (  ) 

Definition at line 1627 of file PageGenerator.php.

01627                            {
01628         $this->HtmlContainer();
01629         $this->tabs = array();
01630         $this->order = array();
01631     }


Field Documentation

HtmlContainer::$debug [inherited]

Definition at line 1977 of file PageGenerator.php.

HtmlContainer::$elements [inherited]

Definition at line 1974 of file PageGenerator.php.

HtmlContainer::$index [inherited]

Definition at line 1975 of file PageGenerator.php.

HtmlContainer::$popped [inherited]

Definition at line 1976 of file PageGenerator.php.


The documentation for this class was generated from the following file:

Generated on Tue May 4 11:48:20 2010 for MMC web interface by  doxygen 1.5.8