P4A_WidgetBase class for objects that permit user interation with the application.
Every P4A objects thats can be rendered should use WIDGET as base class. This class have all the basic methods to build complex widgets that must be P4A compatible.
Located in /p4a/objects/widget.php (line 48)
P4A_Object | --P4A_Widget
| Class | Description |
|---|---|
P4A_Box
|
The box: renders raw HTML. |
P4A_Button
|
HTML "button". |
P4A_Canvas
|
The canvas widget A cancas is a panel where we anchor widgets. |
P4A_Field
|
A fields is a GUI element that shows its value, and this value can be changed. |
P4A_Frame
|
The frame widget A frame is a panel where we anchor widgets. |
P4A_Href
|
"HREF" part on a "A" tag. |
P4A_Icon
|
The icon widget |
P4A_Image
|
Use this whan you want to put an image in your application. |
P4A_Label
|
The label is associated to an input field, do not use it otherwise. |
P4A_Line
|
Line |
P4A_Link
|
"A" HTML tag. |
P4A_Menu
|
p4a menu system. |
P4A_Menu_Item
|
Rapresents every menu item. |
P4A_Message
|
P4A - PHP For Applications. |
P4A_Sheet
|
Sheets is the way to manage layouts in MerliWork masks. |
P4A_Sheet_Cell
|
The basic element of sheets: SHEET CELL. |
P4A_Table
|
Tabular rapresentation of a data source. |
P4A_Table_Col
|
Keeps the data for a single table column. |
P4A_Table_Rows
|
Keeps all the data for all the rows. |
P4A_Tab_Pane
|
The tab pane widget A tab pane is a collection of widgets. |
P4A_Toolbar
|
A toolbar is a buttons/images set. |
void
addAction
(string $action, [string $event = null], [boolean $require_confirmation = false], [string $confirmation_text = null], [string $confirmation_text_handler = 'confirm_general'])
void
requireConfirmation
(string $action, [string $confirmation_text = null], [string $confirmation_text_handler = 'confirm_general'])
array
$actions
= array() (line 83)
Keeps all the actions implemented by the widget.
boolean
$enabled
= true (line 62)
Object's enabled status. If the widget is visible but not enable it won't be clickable.
mixed
$label
= null (line 91)
Keeps the label associated with the widget.
The label will be displayed on the left of the widget.
array
$map_actions
= array() (line 76)
Keeps the association between an action and its listener.
array
$properties
= array() (line 98)
Keeps all the HTML properties for the widget.
array
$style
= array() (line 105)
Keeps all the CSS properties for the widget.
string
$template_name
= null (line 121)
Defines the name of the widget.
if you set it to 'menu' P4A will search for "menu/menu.tpl" in the "themes/CURRENT_THEME/widgets/" directory.
boolean
$use_template
= false (line 112)
Defines if we are going to use a template for the widget.
string
$value
= null (line 55)
Object's value. Used for widget with data binding.
boolean
$visible
= true (line 69)
Defines object visibility.
array
$_temp_vars
= array() (line 128)
Temporary variables (destroyed after rendering)
Inherited from P4A_Object
P4A_Object::$_id
P4A_Object::$_map_actions
P4A_Object::$_name
P4A_Object::$_objects
P4A_Object::$_parent_id
addAction (line 470)
Adds an action to the implemented actions stack for the widget.
addTempVar (line 814)
Add a temporary variable
changeEvent (line 522)
Changes the event associated to an action.
If no event is given, here we set event=action.
clearTemplateVars (line 704)
Empties the template engine variables' stack.
clearTempVars (line 835)
Clear temporary vars list
composeStringActions (line 573)
Composes a string containing all the actions implemented by the widget.
Note: it will also contain the name and the value.
composeStringClassStyle (line 646)
Composes a string contaning the CSS class property for the widget.
composeStringProperties (line 555)
Composes a string containing all the HTML properties of the widget.
Note: it will also contain the name and the value.
composeStringStyle (line 628)
Composes a string containing the CSS properties for the widget.
disable (line 182)
Sets the widget disabled.
display (line 684)
Adds this variable (name and value) to the template engine variables' stack.
dropAction (line 543)
Removes an action from the implemented actions stack for the widget.
dropTempVar (line 824)
Drop a temporary variable
enable (line 172)
Sets the widget enabled.
fetchTemplate (line 714)
Returns the HTML rendered template.
getAccessKey (line 331)
getAsString (line 752)
Returns the HTML rendered widget.
This method MUST be overridden by every widget that extends P4A_this class.
getHeight (line 408)
Returns the height for the widget.
It's a wrapper for get_style_property().
getLabel (line 265)
Returns the label for the widget.
getProperty (line 297)
Returns the value of a property.
getStyleProperty (line 341)
Returns the value of a CSS property.
getValue (line 161)
Retuns the value of the widget.
getWidth (line 377)
Returns the width for the widget.
It's a wrapper for get_style_property().
isEnabled (line 192)
Returns true if the widget is enabled.
isVisible (line 221)
Returns true if the widget is visible.
onChange (line 780)
Wrapper used to add the handling of OnChange action.
onClick (line 771)
Wrapper used to add the handling of OnClick action.
onKeyPress (line 793)
Wrapper used to add the handling of OnKeyPress action.
onMouseOver (line 785)
onReturnPress (line 804)
Wrapper used to add the handling of onReturnPress action.
The onReturnPress action is an onKeyPress with checking if the pressed key is return.
p4a_widget (line 138)
Class constructor.
Sets default properties and store the object in the application object stack.
raise (line 762)
Prints the value returned by get_as_string().
It Should never be used by "normal" p4a users.
requireConfirmation (line 495)
Requires confirmation for an action.
setAccessKey (line 327)
setBgcolor (line 420)
Sets the background color for the widget.
It's a wrapper for set_style_property().
setBgimage (line 432)
Sets the background image for the widget.
It's a wrapper for set_style_property().
setDefaultLabel (line 255)
Create from name a default label for the widget In rendering phase it will be added with ': '.
setFontColor (line 456)
Sets the font color for the widget It's a wrapper for set_style_property().
setFontWeight (line 444)
Sets the font weight for the widget It's a wrapper for set_style_property().
setHeight (line 390)
Sets the height for the widget.
It's a wrapper for set_style_property().
setInvisible (line 211)
Sets the widget invisible.
setLabel (line 233)
Sets the label for the widget.
In rendering phase it will be added with ': '.
setProperty (line 276)
Sets an HTML property for the widget.
setStyleProperty (line 312)
Sets a CSS property for the widget.
setValue (line 150)
Sets the value of the widget.
setVisible (line 202)
Sets the widget visible.
setWidth (line 358)
Sets the width for the widget.
It's a wrapper for set_style_property().
unrequireConfirmation (line 508)
Removes confirmation for an action.
unsetProperty (line 286)
Unsets an HTML property for the widget.
unsetStyleProperty (line 322)
Unset a CSS property for the widget.
useTemplate (line 661)
Defines the template used by the widget.
Inherited From P4A_Object
P4A_Object::actionHandler()
P4A_Object::build()
P4A_Object::destroy()
P4A_Object::errorHandler()
P4A_Object::getId()
P4A_Object::getName()
P4A_Object::getObjectType()
P4A_Object::getParentID()
P4A_Object::implementMethod()
P4A_Object::intercept()
P4A_Object::isActionTriggered()
P4A_Object::p4a_object()
P4A_Object::setName()
P4A_Object::setParentID()
P4A_Object::void()
Documentation generated on Fri, 26 May 2006 12:43:44 +0200 by phpDocumentor 1.3.0RC5