Class ActiveTab

Description

This class is used for creating a tab panel of content where the tabs can be switched on the fly w/ JS, thereby eliminating a page turn to see the other tab's content.

Located in Program_Root/widgets/ActiveTab.inc (line 20)

Container
   |
   --BaseWidget
      |
      --ActiveTab
Variable Summary
Method Summary
void ActiveTab ([string $width = "100%"], [string $height = "300px"], int $selected_tab)
void add_tab (string $title, mixed $content, [boolean $selected = FALSE], [int $width = NULL])
void build_content ()
void build_tabs ()
string get_javascript ()
void hidden_background (mixed $color)
void render ([mixed $indent_level = 1], mixed $output_debug)
void selected_background (mixed $color)
void _build_tab_td (mixed $title, mixed $selected, mixed $width)
void _end_td ()
void _spacer_td ()
void _tab_name (mixed $title)
Variables
mixed $_hidden_background = "#e0e0e0" (line 40)

The hidden tab's background color

mixed $_selected_background = "#eeeeee" (line 35)

The active tab's background color

mixed $_selected_tab = 0 (line 45)

The default selected tab

Inherited Variables

Inherited from BaseWidget

BaseWidget::$title
BaseWidget::$width

Inherited from Container

Container::$_flags
Methods
Constructor ActiveTab (line 56)

This is the constructor for the ActiveTab object.

void ActiveTab ([string $width = "100%"], [string $height = "300px"], int $selected_tab)
  • string $width:

    - the width table

  • string $height:

    - the height of the tab's contents

  • int $selected_tab:

    - the selected tab.

add_tab (line 124)

Add a tab

void add_tab (string $title, mixed $content, [boolean $selected = FALSE], [int $width = NULL])
  • string $title:

    - the title of the tab

  • mixed $content:

    - the conetnts for the tab

  • boolean $selected:

    - should this tab be the default selected tab?

  • int $width:

    - the width of the tab in pixels defaults to 60

build_content (line 163)
void build_content ()
build_tabs (line 134)
void build_tabs ()
get_javascript (line 81)

This function MUST be called AFTER ALL content has been added, in order for the js to work properly

string get_javascript ()

Redefinition of:
BaseWidget::get_javascript()
Function for returning the raw javascript that is required for this widget.
hidden_background (line 236)

Thie method is used to change the hidden tab's

background color

void hidden_background (mixed $color)
render (line 63)
void render ([mixed $indent_level = 1], mixed $output_debug)

Redefinition of:
Container::render()
This function is compatible with the rest of the phpHtmllib API spec.
selected_background (line 228)

Thie method is used to change the selected tab's

background color

void selected_background (mixed $color)
_build_tab_td (line 192)
void _build_tab_td (mixed $title, mixed $selected, mixed $width)
_end_td (line 187)
void _end_td ()
_spacer_td (line 183)
void _spacer_td ()
_tab_name (line 241)
void _tab_name (mixed $title)

Inherited Methods

Inherited From BaseWidget

BaseWidget::get_align()
BaseWidget::get_css()
BaseWidget::get_javascript()
BaseWidget::get_title()
BaseWidget::get_width()
BaseWidget::set_align()
BaseWidget::set_title()
BaseWidget::set_width()

Inherited From Container

Container::Container()
Container::add()
Container::add_reference()
Container::count_content()
Container::get_indent_flag()
Container::push()
Container::push_reference()
Container::render()
Container::reset_content()
Container::set_collapse()
Container::set_indent_flag()
Container::_set_flags()

Documention generated on Thu, 31 Jul 2003 18:31:29 -0700 by phpDocumentor 1.2.0