Class: Node

Source Location: /sys/xulNode.php.inc

Class Overview


This is the base class of all nodes. It provides all methods necessary for manipulating XUL attributes, event firing, handling and yielding, reflexes and styling.

property:  int $id: Registry ID for the node (only set when the node is registered)
property:  Node $parent: Parent node for this node (only set when the node is registered)
property:  bool $isRegistered: Indicates whether the node is registered and thus part of the XUL tree on the client side
property:  bool $isChild: Indicates whether the node is a child of another node
property:  XULWindow $rootWindow: Reference to the root window object (only set when the node is registered)
property:  Application $rootApplication: Reference to the application object (only set when the node is registered)
property:  array $eventHandler: [INTERNAL] Keeps track of event yielders of other nodes
property:  array $eventYielder: [INTERNAL] Keeps track of event yielders
property:  array $handlerFor: [INTERNAL] Keeps track of event handlers of other nodes


Author(s):

Variables

Methods


Class Variables

$behavior = array()

Behavior classes.

Array key is behavior unique name.


var:  = class
access:  protected
Type:   array[ASSOC]

$eventHandler = array()

access:  public
Type:   mixed

$eventType = array()

access:  public
Type:   mixed

$eventYielder = array()

access:  public
Type:   mixed

$handlerFor = array()

access:  public
Type:   mixed

$id =

access:  public
Type:   mixed

$isChild =  FALSE

access:  public
Type:   mixed

$isRegistered =  FALSE

access:  public
Type:   mixed

$observerTopics = array()

access:  public
Type:   mixed

$parent =

access:  public
Type:   mixed

$rootApplication =

access:  public
Type:   mixed

$rootWindow =

access:  public
Type:   mixed

$yielderFor = array()

access:  public
Type:   mixed



Class Methods


static method BehaviorCreateClass() [line 1960]

static object BehaviorCreateClass( object $className, array $settings)

Constructs a Behavior class from a string classname and a settings array.

access:  public

Parameters:

object   $className   Class name.
array   $settings   Class settings

[ Top ]

static method BehaviorSetClassSettings() [line 1991]

static void BehaviorSetClassSettings( $class, $settings, object $class., array $settings;)

Automatically initializes Behavior object

The settings array defines property or method names as keys. The values of this array are provided as a parameter to the methods named as the keys, or assigned to properties named as the key if they are explicitly declared.

A special key "#init" exists, which defines a class/object method to be called after the Behavior object has been added to a Node.

Example:

$settings = array( '#init' => array( 'class' => 'MyClass', 'method' => 'MyBehaviorInitialized' // Call MyClass::MyBehaviorInitialized() after adding ), 'myNumProperty' => 4, // Sets $behavior->myNumProperty = 4 'myStringMethod' => "some string" // Calls $behavior->myStringMethod("some string") )


access:  public

Parameters:

object   $class.  
array   $settings;  
   $class  
   $settings  

[ Top ]

constructor __construct() [line 77]

Node __construct( mixed $childNodes)

Dynamic Constructor

access:  public

Overridden in child classes as:

XULTabBox::__construct()
Dynamic Constructor
XULTab::__construct()
Dynamic Constructor
XULGroupBox::__construct()
Dynamic Constructor
XULCaption::__construct()
Dynamic Constructor
XULTree::__construct()
Dynamic Constructor
XULCustomTree::__construct()
Dynamic Constructor
XULTreeCol::__construct()
Dynamic Constructor
XULTreeItem::__construct()
Dynamic Constructor
XULTreeCell::__construct()
Dynamic Constructor
XULToolBox::__construct()
Dynamic Constructor
XULToolBarButton::__construct()
Dynamic Constructor
XULListBox::__construct()
Dynamic Constructor
XULListItem::__construct()
Dynamic Constructor
XULRichListItem::__construct()
Dynamic Constructor
XULListCol::__construct()
Dynamic Constructor
XULListHeader::__construct()
Dynamic Constructor
XULListCell::__construct()
Dynamic Constructor
XULStatusbarPanel::__construct()
Dynamic Constructor
XULDialogHeader::__construct()
Dynamic Constructor
XULMenu::__construct()
Dynamic Constructor
XULMenuItem::__construct()
Dynamic Constructor
XULPopup::__construct()
Dynamic Constructor
XULToolTip::__construct()
Dynamic Constructor
XULPanel::__construct()
Dynamic Constructor
XULArrowScrollBox::__construct()
Dynamic Constructor
XULWindow::__construct()
XULChildWindow::__construct()
SiteFusionDebugWindow::__construct()
SiteFusionDebugObjectInspector::__construct()
XULPrefPane::__construct()
Dynamic Constructor
XULEditor::__construct()
Dynamic Constructor
XULBox::__construct()
Dynamic Constructor
XULStack::__construct()
Dynamic Constructor
XULDeck::__construct()
Dynamic Constructor
XULGrid::__construct()
Dynamic Constructor
SiteFusionDebugStackView::__construct()
XULColumn::__construct()
Dynamic Constructor
XULRow::__construct()
Dynamic Constructor
XULDescription::__construct()
Dynamic Constructor
XULButton::__construct()
Dynamic Constructor
XULSplitter::__construct()
XULTextBox::__construct()
XULCheckBox::__construct()
Dynamic Constructor
XULRadioGroup::__construct()
Dynamic Constructor
XULRadio::__construct()
Dynamic Constructor
XULMenuList::__construct()
Dynamic Constructor
XULSourceEditor::__construct()
XULSeparator::__construct()
Constructor
XULSpacer::__construct()
Dynamic Constructor
XULFilePicker::__construct()
Constructor
FileUploader::__construct()
Constructor
FileToStringUploader::__construct()
Constructor
FileToStreamUploader::__construct()
Constructor
FileDownloader::__construct()
Constructor
FileFromStringDownloader::__construct()
Constructor
FileFromStreamDownloader::__construct()
Constructor
XULBrowser::__construct()
XULCodeMirror::__construct()
XULFlashProxy::__construct()
Dynamic Constructor
XULSound::__construct()
Dynamic Constructor
AlertNotification::__construct()
Constructor
XULKey::__construct()
Trigger::__construct()
JScriptService::__construct()
XULHTMLBox::__construct()
XULLabel::__construct()
XULImage::__construct()
Constructor
XULHTMLVideo::__construct()
Constructor
XULHTMLEmbed::__construct()
Constructor
XULVlcPlayer::__construct()
XULDirectImage::__construct()
XULFileSystemImage::__construct()
XULImageSvg::__construct()
XULProgressMeter::__construct()
XULColorPicker::__construct()
XULScale::__construct()
XULTimePicker::__construct()
XULDatePicker::__construct()
SFImageLib::__construct()

Parameters:

mixed   $childNodes  

[ Top ]

method accessKey() [line 1533]

mixed accessKey( [string $key = NULL])

Set the accessKey attribute for this element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
link:  https://developer.mozilla.org/en/XUL/Attribute/accesskey
access:  public

Parameters:

string   $key   accessKey value

[ Top ]

method addBehavior() [line 1885]

void addBehavior( string $name, string|Behavior $class, [array $settings = array()])

Add a behavior class

access:  public

Parameters:

string   $name   Behavior unique name
string|Behavior   $class   Behavior class or string class name.
array   $settings   See the BehaviorSetClassSettings method.

[ Top ]

method addObserver() [line 94]

void addObserver( string $topic)

Add an observer to this Node

link:  https://developer.mozilla.org/en-US/docs/XUL/School_tutorial/Observer_Notifications
access:  public

Parameters:

string   $topic   Topic to observe

[ Top ]

method align() [line 1491]

mixed align( [string $align = NULL])

Set the align attribute for this element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
link:  https://developer.mozilla.org/en/XUL/Attribute/align
access:  public

Parameters:

string   $align   Align value

[ Top ]

method attach() [line 799]


method attributeMethod() [line 914]

mixed attributeMethod( string $name, mixed $value)

Convenient attribute setter

This method sets both the property and attribute (when the node is registered). If value is NULL, returns the current value. Otherwise returns the node.


return:  Returns the current value or reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

string   $name   Name of the attribute and property
mixed   $value   Value (if NULL returns current value)

[ Top ]

method backgroundColor() [line 1297]

mixed backgroundColor( [string $color = NULL])

Set the background color for the element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

string   $color   Color in HTML format (#XXXXXX)

[ Top ]

method backgroundImage() [line 1319]

mixed backgroundImage( [string $url = NULL])

Set the background of a node using CSS background-image property

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

string   $url   URL or path relative to the sitefusion installation directory (starting with /) of the image you want to use.

[ Top ]

method blur() [line 837]

void blur( )

Make this node loose focus

Equivalent of the JavaScript blur() method.


access:  public

Overridden in child classes as:

XULBasicWindow::blur()

[ Top ]

method callMethod() [line 658]

Node callMethod( string $name, [array $args = NULL])

Call a JavaScript method on the client-side node

return:  Returns reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

string   $name   Name of the method (may also contain dots to traverse to properties containing other objects)
array   $args   Method call arguments (may contain references to nodes)

[ Top ]

method callMethodDelayed() [line 678]

Node callMethodDelayed( string $name, [array $args = NULL], [int $delay = 1])

Call a JavaScript method on the client-side node in a delayed fashion

return:  Returns reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

string   $name   Name of the method (may also contain dots to traverse to properties containing other objects)
array   $args   Method call arguments (may contain references to nodes)
int   $delay   Delay of function call in ms

[ Top ]

method className() [line 1344]

mixed className( [string $className = NULL])

Set the CSS classname for the element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

string   $className   Class name

[ Top ]

method commandHandler() [line 436]

Event commandHandler( Event $event, array $data)

[INTERNAL FUNCTION] Handles an incoming event for this node

return:  Event object
access:  public

Parameters:

Event   $event   Event object
array   $data   Event arguments

[ Top ]

method context() [line 1593]

mixed context( [XULPopup|XULPanel $node = NULL])

Set a contextmenu to show when clicking the context (right) mouse or keyboard button on this element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
link:  https://developer.mozilla.org/en/XUL/Attribute/context
access:  public

Parameters:

XULPopup|XULPanel   $node   Popup node to show as context menu

[ Top ]

method createClientEvent() [line 139]

void createClientEvent( string $event, [int $type = -1])

Creates a new event on the client side

NOTE: this is not about firing an event. This method actually creates a new addition to the set of fireable client events of this node.


access:  public

Parameters:

string   $event   Name of the new event
int   $type   Message type for the new event (one of MSG_SEND, MSG_QUEUE or MSG_NONE)

[ Top ]

method createRemoteObject() [line 590]

void createRemoteObject( [ $args = NULL])

[INTERNAL FUNCTION] Calls the remote constructor of this class

access:  public

Parameters:

   $args  

[ Top ]

method crop() [line 1512]

mixed crop( [string $crop = NULL])

Set the crop attribute for this element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
link:  https://developer.mozilla.org/en/XUL/Attribute/crop
access:  public

Parameters:

string   $crop   Crop value

[ Top ]

method detach() [line 811]

void detach( )

[INTERNAL FUNCTION] Default detach method

The default action on detach is to remove all observers, call removeElement() and unRegister().


access:  public

Overridden in child classes as:

XULChildWindow::detach()
XULFilePicker::detach()
FileUploader::detach()
FileToStringUploader::detach()
FileToStreamUploader::detach()
FileDownloader::detach()
FileFromStringDownloader::detach()
FileFromStreamDownloader::detach()
ClientFileService::detach()
Trigger::detach()
AppleScriptService::detach()

[ Top ]

method disableBehavior() [line 1929]

void disableBehavior( string $name)

Disable behavior

access:  public

Parameters:

string   $name   Behavior unique name.

[ Top ]

method disabled() [line 1386]

mixed disabled( [bool $state = NULL])

Set the disabled attribute for this element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
link:  https://developer.mozilla.org/en/XUL/Attribute/disabled
access:  public

Overridden in child classes as:

XULEditor::disabled()

Parameters:

bool   $state   Disabled (true or false)

[ Top ]

method enableBehavior() [line 1920]

void enableBehavior( string $name)

Enable behavior

access:  public

Parameters:

string   $name   Behavior unique name

[ Top ]

method equalsize() [line 1567]

mixed equalsize( [string $state = NULL])

Set the equalsize attribute for this element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
link:  https://developer.mozilla.org/en/XUL/Attribute/equalsize
access:  public

Parameters:

string   $state   Equalsize value

[ Top ]

method extractNode() [line 869]

Node extractNode( )

Extracts this node and its childnodes

This method extracts this node and its childnodes without breaking their links. Use this method if you intend to reuse this node or the subbranch that it contains.


return:  The extracted node
access:  public

[ Top ]

method findAncestor() [line 887]

Node|NULL findAncestor( string $className)

Return the first ancestor of a certain class of this node

This method goes down the parent lineage and returns the first ancestor that is of the given class. Returns NULL if no such ancestor was found.


return:  The found node or NULL if none was found
access:  public

Parameters:

string   $className   Name of the class

[ Top ]

method fireClientEvent() [line 497]

void fireClientEvent( string $event, [array $args = array()])

Fires a remote (client) event

This method fires an event on the client side, as if it was the result of a user action. Events fired through this method can only be valid clientside events, either pre-existing standard XUL or SiteFusion events or an event created with the createClientEvent() method.


access:  public

Parameters:

string   $event   Event name
array   $args   Event arguments

[ Top ]

method fireLocalEvent() [line 476]

Event fireLocalEvent( string|Event $event, [array $args = NULL])

Fires a local (server) event

This method fires an event on the server side, which does not go through the client. Events fired through this method do not have to be valid clientside events, and can be used to build event-driven applications.


return:  Event object
access:  public

Parameters:

string|Event   $event   Event object or name
array   $args   Event arguments

[ Top ]

method flex() [line 1365]

mixed flex( [int $val = NULL])

Set the flex attribute for this element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
link:  https://developer.mozilla.org/en/XUL/Attribute/flex
access:  public

Parameters:

int   $val   Flex value

[ Top ]

method focus() [line 824]

void focus( )

Give this node focus

Equivalent of the JavaScript focus() method.


access:  public

Overridden in child classes as:

XULBasicWindow::focus()

[ Top ]

method getBehavior() [line 1902]

Behavior getBehavior( string $name)

Get a behavior class.

access:  public

Parameters:

string   $name   Behavior unique name

[ Top ]

method height() [line 980]

mixed height( [int $height = NULL])

Set the height of the element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
link:  https://developer.mozilla.org/en/XUL/Attribute/height
access:  public

Overridden in child classes as:

XULVlcPlayer::height()

Parameters:

int   $height   Height in pixels

[ Top ]

method hidden() [line 1554]

mixed hidden( [bool $hid = NULL])

Set the hidden attribute for this element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
link:  https://developer.mozilla.org/en/XUL/Attribute/hidden
access:  public

Overridden in child classes as:

XULTreeCol::hidden()

Parameters:

bool   $hid   Hidden value (true or false)

[ Top ]

method initNodeLayout() [line 1784]

void initNodeLayout( )

[INTERNAL FUNCTION] Initializes the attributes of a node when it is registered

access:  public

[ Top ]

method insertElement() [line 606]

void insertElement( )

[INTERNAL FUNCTION] Inserts the newly constructed node's element into the DOM tree on the client side

access:  public

[ Top ]

method label() [line 1407]

mixed label( [string $text = NULL])

Set the label attribute for this element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
link:  https://developer.mozilla.org/en/XUL/Attribute/label
access:  public

Overridden in child classes as:

XULStatusbarPanel::label()

Parameters:

string   $text   Label text

[ Top ]

method margin() [line 1107]

mixed margin( [int $pix = NULL])

Set the margin of the element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

int   $pix   Margin in pixels

[ Top ]

method marginBottom() [line 1167]

mixed marginBottom( [int $pix = NULL])

Set the bottom margin of the element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

int   $pix   Margin in pixels

[ Top ]

method marginLeft() [line 1187]

mixed marginLeft( [int $pix = NULL])

Set the left margin of the element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

int   $pix   Margin in pixels

[ Top ]

method marginRight() [line 1147]

mixed marginRight( [int $pix = NULL])

Set the right margin of the element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

int   $pix   Margin in pixels

[ Top ]

method marginTop() [line 1127]

mixed marginTop( [int $pix = NULL])

Set the top margin of the element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

int   $pix   Margin in pixels

[ Top ]

method mousethrough() [line 1683]

mixed mousethrough( [string $value = 'always'], [bool $recursive = TRUE])

Indicate whether mouse events should pass through this node onto its parent

By default, all elements handle their own mouse events and don't pass them through to their parents.


return:  Returns the current value or reference to self ($this) for easy chaining of method calls
link:  https://developer.mozilla.org/en/XUL/Attribute/mousethrough
access:  public

Parameters:

string   $value   'never' to handle all mouse events on this element, 'always' to pass all mouse events to the parent element (default)
bool   $recursive   FALSE to only affect this node, TRUE to affect this node and all its childnodes (default)

[ Top ]

method orient() [line 1449]

mixed orient( [string $dir = NULL])

Set the orient attribute for this element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
link:  https://developer.mozilla.org/en/XUL/Attribute/orient
access:  public

Parameters:

string   $dir   Orient value ('horizontal' or 'vertical')

[ Top ]

method pack() [line 1470]

mixed pack( [string $pack = NULL])

Set the pack attribute for this element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
link:  https://developer.mozilla.org/en/XUL/Attribute/pack
access:  public

Parameters:

string   $pack   Pack value

[ Top ]

method padding() [line 1003]

mixed padding( [int $pix = NULL])

Set the padding of the element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

int   $pix   Padding in pixels

[ Top ]

method paddingBottom() [line 1063]

mixed paddingBottom( [int $pix = NULL])

Set the bottom padding of the element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

int   $pix   Padding in pixels

[ Top ]

method paddingLeft() [line 1083]

mixed paddingLeft( [int $pix = NULL])

Set the left padding of the element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

int   $pix   Padding in pixels

[ Top ]

method paddingRight() [line 1043]

mixed paddingRight( [int $pix = NULL])

Set the right padding of the element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

int   $pix   Padding in pixels

[ Top ]

method paddingTop() [line 1023]

mixed paddingTop( [int $pix = NULL])

Set the top padding of the element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

int   $pix   Padding in pixels

[ Top ]

method popup() [line 1622]

mixed popup( [XULPopup|XULPanel $node = NULL])

Set a popup menu to show when clicking on this element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
link:  https://developer.mozilla.org/en/XUL/Attribute/popup
access:  public

Parameters:

XULPopup|XULPanel   $node   Popup node to show as popup menu

[ Top ]

method removeAttribute() [line 757]

Node removeAttribute( string $name)

Remove an attribute on the client-side XUL node

return:  Returns reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

string   $name   Name of the attribute

[ Top ]

method removeBehavior() [line 1911]

void removeBehavior( string $name)

Delete behavior

access:  public

Parameters:

string   $name   Behavior unique name

[ Top ]

method removeElement() [line 622]

void removeElement( )

[INTERNAL FUNCTION] Removes the node's element from the client DOM tree

access:  public

[ Top ]

method removeEventHandler() [line 208]

Node removeEventHandler( string $event, object|string $obj, string $func)

Removes an event handler

This method removes a previously set event handler for a certain event.


return:  Returns reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

string   $event   Event name
object|string   $obj   Object or class name to call the handler method on
string   $func   Name of the handler method

[ Top ]

method removeEventReflex() [line 418]

Node removeEventReflex( string $event)

Removes a previously set reflex for a certain event

This function removes the reflex set for the given event.


return:  Returns reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

string   $event   Event name

[ Top ]

method removeEventYielder() [line 293]

Node removeEventYielder( string $event, Node $obj)

Removed a node this is yielded when an event on this node fires

This method is the opposite of setEventYielder(), and removes a previously set yielder


return:  Returns reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

string   $event   Event name
Node   $obj   Node to yield when this event fires

[ Top ]

method removeNode() [line 852]

void removeNode( )

Removes and unregisters this node and its childnodes

This method removes and unlinks this node and its child nodes from each other. Use this method when you intend to discard the node(s) entirely. If you want to reuse the node and its childnodes, use the method extractNode().


access:  public

[ Top ]

method removeObserver() [line 108]

void removeObserver( string $topic)

Remove an observer from this Node

link:  https://developer.mozilla.org/en-US/docs/XUL/School_tutorial/Observer_Notifications
access:  public

Parameters:

string   $topic   Topic to stop observing

[ Top ]

method removeObservers() [line 121]

void removeObservers( )

Remove all observers from this Node

link:  https://developer.mozilla.org/en-US/docs/XUL/School_tutorial/Observer_Notifications
access:  public

[ Top ]

method setAttribute() [line 738]

Node setAttribute( string $name, string $value)

Set an attribute on the client-side XUL node

return:  Returns reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

string   $name   Name of the attribute
string   $value   New value for the attribute

[ Top ]

method setDraggable() [line 1716]

void setDraggable( [array $flavours = NULL])

Set this element as draggable

This enables the user to drag the element and drop it on another element that was indicates as dropzone by the setDroppable() method. By default it supports one droppable flavour called 'sfNode/classname' in which 'classname' is the PHP classname of the node. The data carried by this flavour is a reference to the dragged node itself. Additional flavours with their accompanying data can be set through the $flavours parameter in array with the flavour type as the key and the data as the value.


see:  Node::setDroppable()
access:  public

Parameters:

array   $flavours   Array of additional flavours

[ Top ]

method setDroppable() [line 1745]

void setDroppable( array $flavours, object|string $eventObj, string $eventHandler)

Set this element as a dropzone

Sets this element as a dropzone for draggable elements. The flavours specified in the $flavours array dicate which elements can be dropped on it. If specified, the handler method on the handler object is called when an element is dropped.


see:  Node::setDraggable()
access:  public

Parameters:

array   $flavours   Array of acceptable data flavours
object|string   $eventObj   Handler object or classname
string   $eventHandler   Method to call on the handler object or class

[ Top ]

method setEvent() [line 160]

Node setEvent( string $event, int $type, object|string $obj, string $func, [mixed $yielders = NULL])

Shorthand version for setEventType, setEventHandler and setEventYielder

This method sets an event type, handler and yielder(s) in one convenient call.


return:  Returns reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

string   $event   Event name
int   $type   Message type (one of MSG_SEND, MSG_QUEUE or MSG_NONE)
object|string   $obj   Object or class name to call the handler method on
string   $func   Name of the handler method
mixed   $yielders   Node or array of nodes to yield when this event fires

[ Top ]

method setEventBlocking() [line 367]

Node setEventBlocking( string $event, bool $blocking)

Sets whether the event should block (be synchronous)

return:  Returns reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

string   $event   Event name
bool   $blocking   Blocking

[ Top ]

method setEventHandler() [line 182]

Node setEventHandler( string $event, object|string $obj, string $func)

Sets an event handler

This method sets an event handler to call when a certain event fires.


return:  Returns reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

string   $event   Event name
object|string   $obj   Object or class name to call the handler method on
string   $func   Name of the handler method

[ Top ]

method setEventReflex() [line 399]

Node setEventReflex( string $event, int $code)

Sets a reflex for a certain event

A reflex is a piece of JavaScript that gets executed immediately upon firing an event, without requiring server communication. This can be used for simple actions, such as coloring a button on a mouseover event. If this would have to be done through an event handler on the server side, there would be a delay which is not desirable for such simple actions. The JavaScript code is supplied through a string, in which references to a node can be made with the Node->js property. This property refers to the SiteFusion JavaScript node object, which also contains a reference to the XUL element in the element JavaScript property. Setting a reflex that colors a button red when the mouse hovers it would be done like:

$button->setEventReflex( "mouseover", "$button->js.element.style.backgroundColor = 'red';" );

A node can only hold one reflex per event.


return:  Returns reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

string   $event   Event name
int   $code   JavaScript code to execute when the event fires

[ Top ]

method setEventType() [line 347]

Node setEventType( string $event, int $type)

Sets the event type for a certain event

The event type determines what happens to the event when it fires. There are three event types: MSG_SEND, MSG_QUEUE and MSG_NONE.

When an event fires, a series of actions unfold:

  1. The event reflex is executed (if any)
  2. If there are yielder nodes set, their 'yield' events are fired
  3. The message for the current event is produced if the event type is not MSG_NONE
If the event type is MSG_QUEUE, the message is appended to the queue. If the event type is MSG_SEND, the queue is flushed with the current event message tailing the flush. Yield events are always of the type MSG_QUEUE, so that they don't get sent before the event message that triggered them is produced. This way the whole event triggering, yielding and sending only requires one communication cycle.


return:  Returns reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

string   $event   Event name
int   $type   Event type

[ Top ]

method setEventYielder() [line 247]

Node setEventYielder( string $event, Node $obj)

Sets a node to yield when an event on this node fires

Yielding means that a node transfers its current input on the client side to the server side. For example, a textbox the user just entered text in transfers its content to the server, synchronising both sides. The transfer is done through the 'yield' event, Which is usually handled automatically on the server side, placing the transferred contents in the designated property on the node. This usually occurs when another event fires, for example the pressing of a button (the 'command' event). To make the button trigger the yield of the textbox, the setEventYielder() method should be called on the button with the event name ('command') as the first argument and the textbox node as the second argument, indicating that the button should yield the textbox when its command event fires.


return:  Returns reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

string   $event   Event name
Node   $obj   Node to yield when this event fires

[ Top ]

method setMethod() [line 718]

Node setMethod( $method, array $args, string $code, string $name)

Set a JavaScript method on the client-side node

return:  Returns reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

string   $name   Name of the new method (may also contain dots to traverse to properties containing other objects)
array   $args   Array of argument names for the JavaScript method to accept
string   $code   JavaScript code for the body of the method
   $method  

[ Top ]

method setProperty() [line 697]

Node setProperty( string $name, mixed $value)

Set a JavaScript property on the client-side node

return:  Returns reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

string   $name   Name of the property (may also contain dots to traverse to properties containing other objects)
mixed   $value   Value to set the property to (may also be a reference to a node)

[ Top ]

method setStyle() [line 777]

Node setStyle( string $name, string $value)

Set a CSS style property on the client-side XUL node

return:  Returns reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

string   $name   Name of the CSS property (camelized, so backgroundColor instead of background-color)
string   $value   New value for the style property

[ Top ]

method size() [line 943]

Node size( [int $width = NULL], [int $height = NULL])

Set the size of the element

Sets the width and height (in pixels).


return:  Returns reference to self ($this) for easy chaining of method calls
access:  public

Overridden in child classes as:

XULBasicWindow::size()

Parameters:

int   $width   Width in pixels
int   $height   Height in pixels

[ Top ]

method textColor() [line 1232]

mixed textColor( [string $color = NULL])

Set the text color for the element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

string   $color   Color in HTML format (#XXXXXX)

[ Top ]

method textSize() [line 1210]

mixed textSize( [string $size = NULL])

Set the text size for the element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

string   $size   Text size in CSS form (#pt #px etc)

[ Top ]

method textStyle() [line 1263]

mixed textStyle( [string $style = NULL])

Set the text style for the element

You can supply one or more of the following attributes in a space-separated string

  • bold
  • italic
  • underline
  • strike
  • blink
  • overline


return:  Returns the current value or reference to self ($this) for easy chaining of method calls
access:  public

Parameters:

string   $style   Style string

[ Top ]

method tooltip() [line 1651]

mixed tooltip( [XULToolTip $node = NULL])

Set a tooltip to show when hovering over this element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
link:  https://developer.mozilla.org/en/XUL/Attribute/tooltip
access:  public

Parameters:

XULToolTip   $node   Tooltip node to show as tooltip

[ Top ]

method tooltiptext() [line 1580]

mixed tooltiptext( [string $text = NULL])

Set the tooltiptext attribute for this element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
link:  https://developer.mozilla.org/en/XUL/Attribute/tooltiptext
access:  public

Parameters:

string   $text   Text to show in a tooltip when hovering the element

[ Top ]

method unbind() [line 570]

void unbind( )

[INTERNAL FUNCTION] Removes links to child and parent nodes

This method is called before a node is removed to clear all links its child and parent nodes, enabling the PHP garbage collector to free up the memory.


access:  public

[ Top ]

method unlink() [line 538]

void unlink( )

[INTERNAL FUNCTION] Removes event handler and yielder links to other nodes

This method is called before a node is removed to clear all links to other nodes, enabling the PHP garbage collector to free up the memory.


access:  public

[ Top ]

method unRegister() [line 638]

void unRegister( )

[INTERNAL FUNCTION] Removes this node from the client registry

access:  public

[ Top ]

method value() [line 1428]

mixed value( [mixed $val = NULL])

Set the value attribute for this element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
link:  https://developer.mozilla.org/en/XUL/Attribute/value
access:  public

Overridden in child classes as:

XULEditor::value()
XULCodeEditor::value()
XULRadio::value()
XULSourceEditor::value()
XULCodeMirror::value()
XULScale::value()
XULDatePicker::value()

Parameters:

mixed   $val   Value attribute content

[ Top ]

method width() [line 959]

mixed width( [int $width = NULL])

Set the width of the element

return:  Returns the current value or reference to self ($this) for easy chaining of method calls
link:  https://developer.mozilla.org/en/XUL/Attribute/width
access:  public

Overridden in child classes as:

XULVlcPlayer::width()

Parameters:

int   $width   Width in pixels

[ Top ]

method yield() [line 519]

Node yield( )

Manually yield this node

This method calls the 'yield' method on the node, which usually results in a yield event being triggered.


return:  Returns reference to self ($this) for easy chaining of method calls
access:  public

[ Top ]

method _dropHandler() [line 1759]

void _dropHandler( $event, $data)

access:  public

Parameters:

   $event  
   $data  

[ Top ]

method __call() [line 1940]

mixed __call( string $name, array $parameters)

PHP Magic function: Behavior pattern handler.

return:  function result.
access:  public

Parameters:

string   $name   Name of function
array   $parameters   Parameter list.

[ Top ]


Child classes:

BranchNode
This class represents all nodes that are capable of having childnodes
XULSeparator
Separator element
XULSpacer
Spacer element
XULTreeSeparator
Treeseparator element
XULFilePicker
OS-native filepicker dialog
FileUploader
Background file uploader
FileToStringUploader
Background file-to-memory uploader
FileToStreamUploader
Background file-to-stream uploader
FileDownloader
Background file downloader
FileFromStringDownloader
Background file-from-memory downloader
FileFromStreamDownloader
Background file-from-stream downloader
ClientFileService
Client filesystem service
XULToolBarSeparator
ToolbarSeparator element
XULBrowser
Browser element
XULMenuSeparator
Menuseparator element
XULGrippy
Grippy element
XULDropmarker
Dropmarker element
XULSound
Sound element
PromptService
OS-native prompt service object
AlertNotification
OS-native alert notification node
XULKey
Key element
Trigger
Trigger, custom element
PrefService
PrefService, a SiteFusion wrapper for XPCOM client-side prefs
JScriptService
JScriptService
AppleScriptService
Executes AppleScript code on MacOSX clients
XULHTMLBox
HTML viewing box, custom element
XULLabel
Label element
XULImage
Image element
XULHTMLVideo
HTML Video element
XULHTMLEmbed
HTML Embed element
XULDirectImage
Direct GD image display element
XULFileSystemImage
Direct filesystem image display element
XULImageSvg
SVG image display element
XULProgressMeter
Progressmeter element
XULColorPicker
Colorpicker element
XULScale
Scale element
XULTimePicker
Timepicker element
XULDatePicker
Datepicker element
SFImageLib
This class controls the client component SFImageLib

Documentation generated on Mon, 07 Apr 2014 00:52:59 +0200 by phpDocumentor 1.4.3