Class Button

Description

Instances of this class represent a selectable user interface object that issues notification when clicked.

Widget
   |
   --Control
      |
      --Button
Method Summary
Button Button (Composite &$parent, [mixed $style = STYLE_PUSH])
string get_text ()
void set_enabled (boolean $enabled)
void set_image (Image &$image)
void set_text (string $text)
Methods
Constructor Button

Constructs a new instance of this class giving it's parent.

Button Button (Composite &$parent, [mixed $style = STYLE_PUSH])
  • Composite &$parent: - a composite control which will be the parent of the new instance (cannot be null)
get_image

Returns the receiver's image if it has one, or null if it does not.

  • return: the receiver's image.
Image get_image ()
get_text

Returns the receiver's text, which will be an empty string if it has never been set.

  • return: the receiver's text.
string get_text ()
set_enabled

Enables the receiver if the argument is true, and disables it otherwise. A disabled control is typically not selectable from the user interface and draws with an inactive or "grayed" look.

void set_enabled (boolean $enabled)
  • boolean $enabled: the new enabled state
set_image

Sets the receiver's image to the argument, which may be null indicating that no image should be displayed.

void set_image (Image &$image)
  • Image $image: the image to display on the receiver
set_text

Set the receiver's text.

This method sets the button label. The label may include the mnemonic character but must not contain line delimiters.

void set_text (string $text)
  • string $text: the new text

Inherited Methods

Inherited From Control

Control::Control()
Control::add_selection_listener()
Control::force_focus()
Control::get_layout_data()
Control::remove_selection_listener()
Control::set_background()
Control::set_bounds()
Control::set_foreground()
Control::set_layout_data()
Control::set_size()

Inherited From Widget

Widget::Widget()
Widget::dispose()
Widget::get_attribute()
Widget::get_attributes()
Widget::get_style()
Widget::is_disposed()
Widget::paint()
Widget::set_attribute()
Widget::set_style()
Widget::show()
Widget::update()

Documentation generated on Wed, 2 Feb 2005 09:33:49 +0100 by phpDocumentor 1.3.0RC3