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 44)
P4A_Object | --P4A_Widget
| Class | Description |
|---|---|
P4A_DB_Navigator
|
This widget allows a tree navigation within a P4A_DB_Source. |
P4A_Link
|
"A" HTML tag |
P4A_Frame
|
A frame is a panel where you anchor widgets. |
P4A_Line
|
|
P4A_Label
|
The label is associated to an input field, do not use it otherwise |
P4A_Box
|
The box: renders raw HTML |
P4A_Field
|
A fields is a GUI element that shows its value, and this value can be changed. |
P4A_Message
|
|
P4A_Image
|
|
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_Menu
|
p4a menu system As in every big IDE such as Sun ONE or Microsoft Visual Studio you have the possibility to add the top menu for simple organization of masks. |
P4A_Menu_Item
|
Rapresents every menu item |
P4A_Tab_Pane
|
The tab pane widget A tab pane is a set of pages. |
P4A_Toolbar
|
A toolbar is a buttons/images set. |
P4A_Sheet
|
The sheet widget A canvas is a panel where you anchor widgets in a grid way. |
P4A_Canvas
|
A canvas is a panel where you anchor widgets with absolute positions |
P4A_Button
|
HTML "button". |
P4A_Widget
addAction
(string $action, [string $event = null], [string|boolean $confirmation_text = null], [boolean $ajax = false])
P4A_Widget
addAjaxAction
(string $action, [string $event = null], [string|boolean $confirmation_text = null])
P4A_Widget
requireConfirmation
([string $action = 'onclick'], [string|boolean $confirmation_text = true])
array
$actions
= array() (line 61)
Keeps all the actions implemented by the widget
boolean
$enabled
= true (line 50)
Object's enabled status. If the widget is visible but not enable it won't be clickable.
P4A_Label
$label
= null (line 68)
Keeps the label associated with the widget
The label will be displayed on the left of the widget
array
$properties
= array() (line 74)
Keeps all the HTML properties for the widget
array
$style
= array() (line 80)
Keeps all the CSS properties for the widget
string
$template_name
= null (line 94)
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 86)
Defines if we are going to use a template for the widget
boolean
$visible
= true (line 55)
mixed
$_css_classes
= array() (line 108)
array
$_temp_vars
= array() (line 106)
Temporary variables (destroyed after rendering)
array
$_tpl_vars
= array() (line 100)
variables used for templates
Inherited from P4A_Object
P4A_Object::$_helpers
P4A_Object::$_id
P4A_Object::$_map_actions
P4A_Object::$_name
P4A_Object::$_objects
P4A_Object::$_parent_id
Constructor __construct (line 115)
addAction (line 424)
Adds an action to the implemented actions stack for the widget
addAjaxAction (line 454)
Adds an ajax action to the implemented actions stack for the widget
addTempVar (line 880)
Add a temporary variable
changeEvent (line 498)
Changes the event associated to an action.
If no event is given, here we set event=action.
clearTemplateVars (line 678)
Empties the template engine variables' stack
composeStringActions (line 549)
Composes a string containing all the actions implemented by the widget.
Note: it will also contain the name and the value.
composeStringClass (line 626)
Composes a string contaning the class property for the widget
composeStringProperties (line 531)
Composes a string containing all the HTML properties of the widget.
Note: it will also contain the name and the value.
composeStringStyle (line 608)
Composes a string containing the CSS properties for the widget
disable (line 136)
display (line 657)
Adds this variable (name and value) to the template engine variables' stack.
dropAction (line 519)
Removes an action from the implemented actions stack for the widget
enable (line 126)
fetchTemplate (line 688)
Returns the HTML rendered template
getAccessKey (line 301)
getAsString (line 728)
Returns the HTML rendered widget.
This method MUST be overridden by every widget that extends P4A_this class.
getCSSClasses (line 935)
getHeight (line 359)
Returns the height for the widget.
It's a wrapper for getStyleProperty().
getLabel (line 211)
Returns the label for the widget
getProperty (line 244)
Returns the value of a property
getStyleProperty (line 281)
Returns the value of a CSS property
getWidth (line 330)
Returns the width for the widget.
It's a wrapper for getStyleProperty().
isEnabled (line 146)
Returns true if the widget is enabled
isVisible (line 175)
Returns true if the widget is visible
onBlur (line 737)
Wrapper used to add the handling of onBlur action
onChange (line 757)
Wrapper used to add the handling of onChange action
onClick (line 747)
Wrapper used to add the handling of onClick action
onDblClick (line 767)
Wrapper used to add the handling of onDblClick action
onFocus (line 777)
Wrapper used to add the handling of onFocus action
onKeyDown (line 847)
Wrapper used to add the handling of onKeyDown action
onKeyPress (line 827)
Wrapper used to add the handling of onKeyPress action
onKeyUp (line 837)
Wrapper used to add the handling of onKeyUp action
onMouseDown (line 787)
Wrapper used to add the handling of onMouseDown action
onMouseMove (line 797)
Wrapper used to add the handling of onMouseMove action
onMouseOver (line 807)
Wrapper used to add the handling of onMouseOver action
onMouseUp (line 817)
Wrapper used to add the handling of onMouseUp action
onReturnPress (line 859)
Wrapper used to add the handling of onReturnPress action.
The onReturnPress action is an onKeyPress with checking if the pressed key is return.
onSelect (line 869)
Wrapper used to add the handling of onSelect action
redesign (line 943)
requireConfirmation (line 465)
Requires confirmation for an action
setBgcolor (line 371)
Sets the background color for the widget.
It's a wrapper for setStyleProperty().
setBgimage (line 384)
Sets the background image for the widget.
It's a wrapper for setStyleProperty().
setDefaultLabel (line 201)
Create from name a default label for the widget In rendering phase it will be added with ': '.
setFontColor (line 410)
Sets the font color for the widget It's a wrapper for setStyleProperty().
setFontWeight (line 397)
Sets the font weight for the widget.
It's a wrapper for setStyleProperty().
setHeight (line 343)
Sets the height for the widget.
It's a wrapper for setStyleProperty().
setLabel (line 187)
Sets the label for the widget.
In rendering phase it will be added with ': '.
setProperty (line 222)
Sets an HTML property for the widget
setStyleProperty (line 259)
Sets a CSS property for the widget
setVisible (line 155)
setWidth (line 313)
Sets the width for the widget.
It's a wrapper for setStyleProperty().
unrequireConfirmation (line 483)
Removes confirmation for an action
unsetProperty (line 233)
Unsets an HTML property for the widget
unsetStyleProperty (line 270)
Unset a CSS property for the widget
useTemplate (line 639)
Defines the template used by the widget
Inherited From P4A_Object
P4A_Object::__construct()
P4A_Object::actionHandler()
P4A_Object::build()
P4A_Object::destroy()
P4A_Object::dropImplement()
P4A_Object::dropMethod()
P4A_Object::errorHandler()
P4A_Object::getId()
P4A_Object::getName()
P4A_Object::getObjectType()
P4A_Object::getParentID()
P4A_Object::implement()
P4A_Object::intercept()
P4A_Object::isActionTriggered()
P4A_Object::setName()
P4A_Object::setParentID()
P4A_Object::void()
P4A_Object::_loadHelper()
P4A_Object::__call()
Documentation generated on Tue, 02 Sep 2008 10:04:08 +0200 by phpDocumentor 1.4.2