Class hover_button

Description

Hover button.

Hover button. Uses the 'hover' class to implement a button which has a an alternate rollover image, and will also implement our forms submission action. Uses the "hover" class from the "image" module. Here's how we might implement a hover button.. $hb = new hover_button("commentary", "Do commentary", "commentary", $onclick=STD_ONCLICK); $hb->set_image("img/bCommentate.gif", 99, 23); $hb->set_image_over("img/bCommentate_over.gif", 99, 23); Then to display it: echo $hb->render();

Located in /button-defs.php (line 371)

button_object
   |
   --button
      |
      --hover_button
Variable Summary
 mixed $hover
Method Summary
 hover_button hover_button (string $action, [string $label = ""], [string $parms = ""], [string $onclick = ""])
 string html ()
 void set_image (mixed $src, mixed $width, mixed $height, mixed $border)
 void set_image_over (mixed $src, mixed $width, mixed $height, mixed $border)
Variables
mixed $hover (line 373)

The hover image associated with the button

Inherited Variables

Inherited from button

button::$accesskey
button::$confirmation
button::$onclick
Methods
Constructor hover_button (line 383)

Constructor

hover_button hover_button (string $action, [string $label = ""], [string $parms = ""], [string $onclick = ""])
  • string $action: The name of the button control in the form
  • string $label: The label which might be attached to the button
  • string $parms: Optional parameters
  • string $onclick: Optional javascript for onclick event
html (line 418)

Use render() to render this element in your page.

Renders the hover button as HTML. In this case we simply render the hover image which is associated with this button.

  • return: HTML rendering of button
  • see: render(), hover_image()
string html ()

Redefinition of:
button::html()
Use render() to render this element in your page.
set_image (line 397)

Sets button mouse-out image Sets the standard image for this button. This is the image which is shown with the mouse NOT over the top of it.

void set_image (mixed $src, mixed $width, mixed $height, mixed $border)
set_image_over (line 407)

Sets button mouse-over image Sets the mouse-over image for this button. This is the image which is shown with the mouse over the top of it.

void set_image_over (mixed $src, mixed $width, mixed $height, mixed $border)

Inherited Methods

Inherited From button

 button::button()
 button::html()
 button::set_confirmation()
 button::set_onclick()

Documentation generated by phpDocumentor 1.3.0RC3