Class Control

Description

Control is the superclass of all web user interface classes.

Widget
   |
   --Control
Direct descendents
Class Description
Button Instances of this class represent a selectable user interface object that issues notification when clicked.
Combo Instances of this class are controls that allow the user to choose an item from a list of items, or optionally enter a new value by typing it into an editable text field.
DateField Instances of this class are selectable user interface objects that allow the user to enter and modify a date.
File Instances of this class are selectable user interface objects that allow the user to upload a file.
Label Instances of this class represent a non-selectable user interface object that displays a string or image.
Scrollable This class is the abstract superclass of all classes which represent controls that have standard scroll bars.
Select Instances of this class represent a selectable user interface object that displays a list of strings and issues notification when a string selected.
Text Instances of this class are selectable user interface objects that allow the user to enter and modify text.
TextArea Instances of this class are selectable user interface objects that allow the user to enter and modify multiline text.
Method Summary
Control Control (Composite &$parent)
void add_selection_listener (object &$obj)
void force_focus ()
object the get_layout_data ()
void remove_selection_listener (object &$obj)
void set_background (mixed $color, Color &$color)
void set_bounds (integer $x, integer $y, integer $width, integer $height)
void set_foreground (Color &$color)
void set_layout_data (object &$obj)
void set_size (integer $width, integer $height)
Methods
Constructor Control

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

Control Control (Composite &$parent)
  • Composite &$parent: - a widget which will be the parent of the new instance (cannot be null)
add_selection_listener

Adds the listener to the collection of listeners who will be notified when the control is selected, by calling the

widget_selected
method.

void add_selection_listener (object &$obj)
  • object &$obj: - the listener which should be notified when the event occurs
force_focus

Forces the receiver to have the keyboard focus, causing all keyboard events to

be delivered to it.

void force_focus ()
get_layout_data

Returns layout data which is associated with the receiver.

  • return: receiver's layout data
object the get_layout_data ()
remove_selection_listener

Removes the listener from the collection of listeners who will be notified when the control is selected.

void remove_selection_listener (object &$obj)
  • object &$obj: - the listener which should no longer be notified when the event occurs
set_background

Sets the receiver's background color to the color specified by the argument.

void set_background (mixed $color, Color &$color)
  • Color &$color: the new color
set_bounds

Sets the receiver's size and location to the rectangular area specified by the arguments. The x and y arguments are relative to the receiver's parent, unless the receiver is a shell.

In this case, the x and y arguments are relative to the display window.

void set_bounds (integer $x, integer $y, integer $width, integer $height)
  • integer $x: the new x coordinate for the receiver
  • integer $y: the new y coordinate for the receiver
  • integer $width: the new width for the receiver
  • integer $height: the new height for the receiver
set_foreground

Sets the receiver's foreground color to the color specified by the argument.

void set_foreground (Color &$color)
  • Color &$color: the new color
set_layout_data

Sets the layout data associated with the receiver to the argument.

void set_layout_data (object &$obj)
  • object &$obj: - the new layout data for the receiver.
set_size

Sets the receiver's size as specified by the arguments.

void set_size (integer $width, integer $height)
  • integer $width: the new width for the receiver
  • integer $height: the new height for the receiver

Inherited Methods

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