VCL
[ class tree: VCL ] [ index: VCL ] [ all elements ]

Class: Control

Source Location: /controls.inc.php

Class Overview

Object
   |
   --Persistent
      |
      --Component
         |
         --Control

Control class


Class Details

[line 63]
Control class

Base class for all controls




[ Top ]

Properties

Events

JS Events

Methods

Constants

    [none]

Child classes:

GraphicMainMenu
GraphicMainMenu class
TrackBar
TrackBar Class
FocusControl
FocusControl class
MapShape
Encapsulates a shape for images
Shape
Shape Class
PaintBox
PaintBox Class
HiddenField
HiddenField

Inherited Properties

Class: Component

Component::ComponentCount
Indicates how many components this component is owner
Component::Components
Component list containing all the components owned by this component
Component::ControlState
A flag to know the state of the control, csLoading, csDesigning
Component::DataFieldValue
This function returns the value of the datafield, if any
Component::Name
Name for the component, to be used as an identifier, should be unique
Component::NamePath
The path to uniquely identify a component, qualified by the owner when required
Component::Owner
The owner of this component, usually the page component, but the owner of pages is the application object
Component::Tag
A versatily property of every Component that can be used in any way you want

Class: Persistent

Persistent::NamePath
Used to serialize/unserialize
Persistent::Owner
Owner of the component, in Persistent always return null

Inherited Events

Inherited JS Events

Inherited Methods

Class: Component

Component::__construct
Constructor
Component::ajaxCall
Returns the js event attribute to call the server using ajax
Component::callEvent
Calls a server event
Component::dumpChildrenHeaderCode
Dump the header code for all the children
Component::dumpChildrenJavascript
Dump the javascript code for all the children
Component::dumpHeaderCode
To dump header code required
Component::dumpHiddenKeyFields
This function dumps out the key fields for the current row, useful to
Component::dumpJavascript
To dump the javascript code needed by this component
Component::fixupProperty
This method returns the right object (or the input string if object not found) for an object name Should be used on the loaded method for object properties to find the right reference
Component::generateAjaxEvent
Returns the js event attribute to call the server using Ajax we use xajax to handle all the ajax stuff.
Component::hasValidDataField
This function returns true if the datafield is valid
Component::init
To initialize a component, the right place to process events
Component::insertComponent
Insert a component into the components collection
Component::loaded
A virtual method to get notified when the object has been fully loaded from a stream
Component::loadedChildren
Calls childrens loaded recursively
Component::loadResource
Load this component from a string
Component::preinit
To initialize a component, called before init()
Component::readAccessibility
Overwrite this method to provide accessibility info for the RPC engine
Component::readFromResource
Read a component from a resource file
Component::removeComponent
Remove a component from the components collection
Component::serializeChildren
Serialize all children
Component::unserializeChildren
Unserialize all children
Component::updateDataField
Checks if there is any datafield attached to the component

Class: Persistent

Persistent::assign
Assing the source properties to this object
Persistent::assignError
Raises an assignation error
Persistent::assignTo
Assign this object to another object
Persistent::serialize
Stores this object into the session, it uses PHP reflection system to get published properties, the ones that will be stored.
Persistent::unserialize
Read this object properties from the session, only published properties will be recovered, components need an owner to be unserialized.

Class: Object

Object::__construct
Constructor
Object::className
Returns the name of the object class
Object::classNameIs
Check if the object is from a specific class
Object::classParent
Returns the parent class of the object
Object::inheritsFrom
Check if the object inherits from a specific class
Object::methodExists
Check if a method exists
Object::readProperty
Reads a property from the streams
Object::__get
To virtualize properties
Object::__set
To virtualize properties

Properties


property AdjustToLayout : boolean [line 410]

If true, the control should adjust to the selected layout

[ Top ]

property Align : enum [line 1070]

Specifies the Align for this control

[ Top ]

property Alignment : enum [line 1080]

Specifies the alignment to be used by the control

[ Top ]

property Caption : string [line 890]

Returns the caption property



Tags:

access:  protected
[ Top ]

property Color : string [line 898]

Returns the color property



Tags:

access:  protected
[ Top ]

property ControlStyle : array [line 1267]

An array which holds the control style, with settings for the IDE

[ Top ]

property Cursor [line 1363]

Cursor to show when the mouse is over the control

[ Top ]

property DesignColor : string [line 1090]

Specifies a color can be used by the control in design time

[ Top ]

property DoParentReset : boolean [line 884]

Performs a parent reset if true

[ Top ]

property Enabled : boolean [line 927]

Determines if the controls is enabled or not



Tags:

access:  protected
[ Top ]

property Font : Font [line 977]

Determines the Font to be used when generating this control



Tags:

access:  protected
[ Top ]

property Height [line 1356]

[ Top ]

property Hint [line 1370]

Text to show in a tooltip when the mouse is over the control for some time

[ Top ]

property HintAttribute : string [line 679]

This function returns the attribute for the hint that can be included in any tag. The attribute's name is "title".



Tags:

return:  If the hint is defined and can be shown a string with the attribute, otherwise an empty string.
access:  protected
[ Top ]

property IsLayer : boolean [line 1006]

Specifies if this control is a Layer instead be integrated into the document



Tags:

access:  protected
[ Top ]

property JsEvents : string [line 481]

Return assigned javascript events as attributes for the tag

[ Top ]

property JSWrapperHiddenFieldName : string [line 842]

Get the name of the hidden field used to submit the value which event was fired.

There is should one hidden field for each component that can forward JS event to the PHP script. It is the responsiblity of the component to add this field.




Tags:

return:  Name of the hidden field
access:  protected
[ Top ]

property Layer [line 1061]

Determines the layer this control is going to be rendered

[ Top ]

property Left [line 1335]

Left coordinate

[ Top ]

property Parent : object [line 1246]

Determines the parent control which holds this control

[ Top ]

property ParentColor : true [line 948]

Determines where a control looks for its color information.

To have a control use the same color as its parent control, set ParentColor to true. If ParentColor is false, the control uses its own Color property.




Tags:

access:  protected
[ Top ]

property ParentFont : boolean [line 1019]

Determines where a control looks for its font information.

To have a control use the same font as its parent control, set ParentFont to true. If ParentFont is false, the control uses its own Font property.




Tags:

access:  protected
[ Top ]

property ParentShowHint : boolean [line 1145]

Determines where a control looks to find out if its Help Hint should be shown.

Use ParentShowHint to ensure that all the controls on a form either uniformly show their Help Hints or uniformly do not show them.

If ParentShowHint is true, the control uses the ShowHint property value of its parent. If ParentShowHint is false, the control uses the value of its own ShowHint property.

To provide Help Hints for only selected controls on a form, set the ShowHint property for those controls that should have Help Hints to true, and ParentShowHint becomes false automatically.

Note: Enable or disable all Help Hints for the entire application using the ShowHint property of the application object.


[ Top ]

property PopupMenu : PopupMenu [line 935]

Specifies the PopupMenu component to show when right clicking the control



Tags:

access:  protected
[ Top ]

property ShowHint : boolean [line 1100]

Determines whether the control displays a Help Hint when the mouse pointer rests momentarily on the control.

[ Top ]

property Style : string [line 400]

CSS style to be used when rendering the component

[ Top ]

property StyleClass : string [line 418]

Return the normalized CSS style

[ Top ]

property Top [line 1342]

Top coordinate

[ Top ]

property Visible : boolean [line 1237]

Determines if the controls is visible in run-time or not

[ Top ]

property Width [line 1349]

Control width

[ Top ]


Events


property OnAfterShow [line 1387]

Event fired after show the control

[ Top ]

property OnBeforeShow [line 1380]

Event fired before show the control

[ Top ]

property OnShow [line 1395]

Event fired at the same moment the control is show, some controls can

prevent the control to be shown when this event is attached


[ Top ]


Javascript Events


property OnActivate [line 142]

Fires when the object is set as the active element.



Tags:

access:  protected

Overridden in child classes as:

PageControl::OnActivate()
TreeView::OnActivate()
TextField::OnActivate()
LabeledEdit::OnActivate()
UpDown::OnActivate()

[ Top ]

property OnBeforeCopy [line 150]

Fires on the source object before the selection is copied to the system clipboard.



Tags:

access:  protected
[ Top ]

property OnBeforeCut [line 154]

Fires on the source object before the selection is deleted from the document.



Tags:

access:  protected
[ Top ]

property OnBeforeDeactivate [line 158]

Fires immediately before the activeElement is changed from the current object to another object in the parent document.



Tags:

access:  protected
[ Top ]

property OnBeforeEditfocus [line 162]

Fires before an object contained in an editable element enters a UI-activated state or when an editable container object is control selected.



Tags:

access:  protected
[ Top ]

property OnBeforePaste [line 166]

Fires on the target object before the selection is pasted from the system clipboard to the document.



Tags:

access:  protected
[ Top ]

property OnBlur [line 170]


property OnChange [line 174]


property OnClick [line 178]

Fires when the user clicks the left mouse button on the object.



Tags:

access:  protected

Overridden in child classes as:

CustomCheckListBox::OnClick()
Occurs when the user clicks the control.
CheckListBox::OnClick()
SimpleChart::OnClick()
Occurs when the user clicks the control.
Image::OnClick()
Occurs when the user clicks the control.
CustomLabel::OnClick()
Occurs when the user clicks the control.
Label::OnClick()
DBPaginator::OnClick()
Occurs when a link on the database navigator is clicked, after the action is executed.
CustomListBox::OnClick()
Occurs when the user clicks the control.
ListBox::OnClick()
ComboBox::OnClick()
CustomRadioGroup::OnClick()
Occurs when the user clicks the control.
RadioGroup::OnClick()
BitBtn::OnClick()
Occurs when the user clicks the control.
DBGrid::OnClick()
PageControl::OnClick()
TreeView::OnClick()
CustomTextField::OnClick()
OnClick event
TextField::OnClick()
LabeledEdit::OnClick()
UpDown::OnClick()
ToolBar::OnClick()
ButtonView::OnClick()
CustomMainMenu::OnClick()
OnClick event Occurs when the user clicks menu item.
MainMenu::OnClick()
CustomEdit::OnClick()
Occurs when the user clicks the control.
Edit::OnClick()
RichEdit::OnClick()
Memo::OnClick()
ButtonControl::OnClick()
Occurs when the user clicks the control.
Button::OnClick()
CheckBox::OnClick()
RadioButton::OnClick()

[ Top ]

property OnContextMenu [line 182]

Fires when the user clicks the right mouse button in the client area, opening the context menu.



Tags:

access:  protected

Overridden in child classes as:

PageControl::OnContextMenu()
TreeView::OnContextMenu()
TextField::OnContextMenu()
LabeledEdit::OnContextMenu()
UpDown::OnContextMenu()

[ Top ]

property OnControlSelect [line 186]

Fires when the user is about to make a control selection of the object.



Tags:

access:  protected
[ Top ]

property OnCopy [line 190]

Fires on the source element when the user copies the object or selection, adding it to the system clipboard.



Tags:

access:  protected
[ Top ]

property OnCut [line 194]

Fires on the source element when the object or selection is removed from the document and added to the system clipboard.



Tags:

access:  protected
[ Top ]

property OnDblClick [line 198]


property OnDeactivate [line 146]

Fires when the activeElement is changed from the current object to another object in the parent document.



Tags:

access:  protected
[ Top ]

property OnDrag [line 202]

Fires on the source object continuously during a drag operation.



Tags:

access:  protected
[ Top ]

property OnDragEnter [line 206]

Fires on the target element when the user drags the object to a valid drop target.



Tags:

access:  protected
[ Top ]

property OnDragLeave [line 210]

Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.



Tags:

access:  protected
[ Top ]

property OnDragOver [line 214]

Fires on the target element continuously while the user drags the object over a valid drop target.



Tags:

access:  protected
[ Top ]

property OnDragStart [line 218]

Fires on the source object when the user starts to drag a text selection or selected object.



Tags:

access:  protected
[ Top ]

property OnDrop [line 222]

Fires on the target object when the mouse button is released during a drag-and-drop operation.



Tags:

access:  protected
[ Top ]

property OnFilterChange [line 226]

Fires when a visual filter changes state or completes a transition.



Tags:

access:  protected
[ Top ]

property OnFocus [line 230]


property OnHelp [line 234]

Fires when the user presses the F1 key while the browser is the active window.



Tags:

access:  protected
[ Top ]

property OnKeyDown [line 238]


property OnKeyPress [line 242]


property OnKeyUp [line 246]


property OnLoseCapture [line 250]

Fires when the object loses the mouse capture.



Tags:

access:  protected
[ Top ]

property OnMouseDown [line 254]


property OnMouseEnter [line 262]

Fires when the user moves the mouse pointer into the object.



Tags:

access:  protected
[ Top ]

property OnMouseLeave [line 266]

Fires when the user moves the mouse pointer outside the boundaries of the object.



Tags:

access:  protected
[ Top ]

property OnMouseMove [line 270]


property OnMouseOut [line 274]


property OnMouseOver [line 278]


property OnMouseUp [line 258]


property OnPaste [line 282]

Fires on the target object when the user pastes data, transferring the data from the system clipboard to the document.



Tags:

access:  protected
[ Top ]

property OnPropertyChange [line 286]

Fires when a property changes on the object.



Tags:

access:  protected
[ Top ]

property OnReadyStateChange [line 290]

Fires when the state of the object has changed.



Tags:

access:  protected
[ Top ]

property OnResize [line 294]

Fires when the size of the object is about to change.



Tags:

access:  protected
[ Top ]

property OnResizeEnd [line 298]

Fires when the user finishes changing the dimensions of the object in a control selection.



Tags:

access:  protected
[ Top ]

property OnResizeStart [line 302]

Fires when the user begins to change the dimensions of the object in a control selection



Tags:

access:  protected
[ Top ]

property OnSelectStart [line 306]

Fires when the object is being selected



Tags:

access:  protected
[ Top ]


Methods


constructor __construct [line 438]

An __construct( [$aowner $aowner = null])

Constructor for the class



Tags:

return:  instance of this class


Overridden in child classes as:

GraphicMainMenu::__construct()
FocusControl::__construct()
Clock::__construct()
CustomCheckListBox::__construct()
MonthCalendar::__construct()
DateTimePicker::__construct()
SimpleChart::__construct()
Image::__construct()
FlashObject::__construct()
Bevel::__construct()
CustomLabel::__construct()
DBPaginator::__construct()
CustomPanel::__construct()
Panel::__construct()
Clock::__construct()
DBRepeater::__construct()
CustomDBGrid::__construct()
CustomListBox::__construct()
ComboBox::__construct()
CustomRadioGroup::__construct()
CustomPage::__construct()
Page::__construct()
Frameset::__construct()
Frame::__construct()
DWidget::__construct()
CustomProgressBar::__construct()
QWidget::__construct()
BitBtn::__construct()
SpeedButton::__construct()
CustomListView::__construct()
DBGrid::__construct()
CustomPageControl::__construct()
CustomTreeView::__construct()
CustomTextField::__construct()
CustomLabeledEdit::__construct()
CustomUpDown::__construct()
ColorSelector::__construct()
CustomToolBar::__construct()
GroupBox::__construct()
CustomButtonView::__construct()
Window::__construct()
CustomMainMenu::__construct()
ScrollBar::__construct()
CustomEdit::__construct()
CustomMemo::__construct()
CustomRichEdit::__construct()
ButtonControl::__construct()
Button::__construct()
CustomCheckBox::__construct()
RadioButton::__construct()
MapShape::__construct()
Shape::__construct()
PaintBox::__construct()
HiddenField::__construct()

Overrides Component::__construct (Constructor)

Parameters:

$aowner   $aowner   The owner component for this class

[ Top ]

void addJSWrapperToEvents [line 756]

void addJSWrapperToEvents( &$events, string $event, string $jsEvent, string $jsEventAttr, string $events)

Add or replace the JS event attribute with the wrapper.

The wrapper is used to notify the PHP script that a event occured. The script then may fire an event itself (for example OnClick of a button).




Tags:

access:  protected


Parameters:

string   $events   A string that is empty or contains already existing JS event-handlers. This string passed by reference.
string   $event   String representation of the event (ex. $this->_onclick;)
string   $jsEvent   String representation of the JS event (ex. $this->_jsonclick;)
string   $jsEventAttr   Name of attribute for the JS event (ex. "onclick")
   &$events  

[ Top ]

true canShow [line 460]

true canShow( )

Determines whether a control can be shown or not



Tags:

return:  if the control can be shown
  1. false
otherwise.


[ Top ]

void dumpChildren [line 728]

void dumpChildren( )

Dump all children components



Overridden in child classes as:

FocusControl::dumpChildren()
Dump all children
Page::dumpChildren()
Dump al children controls

[ Top ]

void dumpContents [line 738]


void dumpHeaderCode [line 650]


void dumpJavascript [line 620]

void dumpJavascript( )

Dump Javascript code required for this component to work



Overridden in child classes as:

CustomCheckListBox::dumpJavascript()
SimpleChart::dumpJavascript()
Write the Javascript section to the header
Image::dumpJavascript()
Write the Javascript section to the header
CustomLabel::dumpJavascript()
CustomListBox::dumpJavascript()
CustomRadioGroup::dumpJavascript()
Frameset::dumpJavascript()
Frame::dumpJavascript()
BitBtn::dumpJavascript()
CustomEdit::dumpJavascript()
CustomMemo::dumpJavascript()
ButtonControl::dumpJavascript()
RadioButton::dumpJavascript()

Overrides Component::dumpJavascript (To dump the javascript code needed by this component)

[ Top ]

void dumpJSEvent [line 544]

void dumpJSEvent( string $event)

Dumps a javascript named $event



Parameters:

string   $event  

[ Top ]

void dumpJsEvents [line 570]

void dumpJsEvents( )

Dump Javascript events



Overridden in child classes as:

TrackBar::dumpJsEvents()
Page::dumpJsEvents()
DBGrid::dumpJsEvents()
Dump Javascript events
CustomTreeView::dumpJsEvents()
CustomTextField::dumpJsEvents()

[ Top ]

string getJSWrapperFunction [line 799]

string getJSWrapperFunction( string $event)

JS wrapper function that forwards a JS event to the PHP script by submitting the HTML form.

It is the responsiblity of the component to add this function to the <javascript> section in the HTML header. Usually this is done in the dumpJavascript() function of the component.




Tags:

return:  Returns the whole JS wrapper function for the $event.
access:  protected


Parameters:

string   $event   String representation of the event (ex. $this->_onclick;)

[ Top ]

string getJSWrapperFunctionName [line 783]

string getJSWrapperFunctionName( string $event)

Get the function name of a JS event wrapper.



Tags:

return:  Name of the function
access:  protected


Parameters:

string   $event   String representation of the event (ex. $this->_onclick;)

[ Top ]

string getJSWrapperSubmitEventValue [line 859]

string getJSWrapperSubmitEventValue( string $event)

Value set to the hidden field when the specific JS event was fired and the wrapper function was called.

Have a look at getJSWrapperFunction(), that is where the value gets set to the hidden field. It is also used in the component to check if the defined $event has been fired on the page. This should be done in the init() function of the component.




Tags:

return:  The value that will be set in the hidden input.
access:  protected


Parameters:

string   $event   String representation of the event (ex. $this->_onclick;)

[ Top ]

void loaded [line 447]


string show [line 700]

string show( [boolean $return_contents = false])

Show control contents



Parameters:

boolean   $return_contents   return contents as string or dump to output

[ Top ]

void updateParentColor [line 1202]

void updateParentColor( )

If ParentColor == true the parent's color is assigned to this control.



[ Top ]

void updateParentFont [line 1183]

void updateParentFont( )

If ParentFont == true the parent's font is assigned to this control.



[ Top ]

void updateParentProperties [line 1173]

void updateParentProperties( )

Updates all properties that use the parent property as source.

These include ShowHint, Color and Font.




[ Top ]

void updateParentShowHint [line 1218]

void updateParentShowHint( )

If ParentShowHint == true the parent's showhint is assigned to this control.



[ Top ]



Documentation generated on Tue, 27 Mar 2007 13:34:01 +0200 by phpDocumentor 1.3.1