photonui.Widget Class
Base class for all PhotonUI widgets.
wEvents:
- 
show: - description: called when the widget is displayed (a change in the parent's visibility can also trigger this event).
- callback: function(widget)
 
- 
hide: - description: called when the widget is hidden (a change in the parent's visibility can also trigger this event).
- callback: function(widget)
 
Constructor
photonui.Widget
        - 
                        params
Parameters:
- 
                        paramsObjectAn object that can contain any property of the widget (optional). 
Item Index
Methods
Methods
__onContextMenu
        - 
                        event
Called when the context menu should be displayed.
Parameters:
- 
                        eventObject
__onLocaleChanged
        ()
        private
    
    Called when the locale is changed.
_bindEvent
        - 
                        id
- 
                        element
- 
                        evName
- 
                        callback
- 
                        [options]
Javascript event binding (for internal use).
Parameters:
_buildHtml
        ()
        private
    
    Build the widget HTML.
_callCallbacks
        - 
                        wEvent
- 
                        params
Call all callbacks for the given wEvent.
NOTE: the first argument passed to the callback is the current widget. NOTE²: if the thisArg of the callback is null, this will be binded to the current widget.
_updateProperties
        - 
                        properties
Force the update of the given properties.
This method is deprecated. One should use '@photonui-update' abitbol's annotation on concerned properties.
Parameters:
- 
                        propertiesArrayThe properties to update. 
_visibilityChanged
        - 
                        visibility
Called when the visibility changes.
Parameters:
- 
                        visibilityBooleanCurrent visibility state (otptional, defaut=this.visible) 
addClass
        - 
                        className
Add a class to the outer HTML element of the widget.
Parameters:
- 
                        classNameStringThe class to add. 
destroy
        ()
    
    Destroy the widget.
domInsert
        - 
                        widget
- 
                        element
Insert a widget in the DOM.
Parameters:
- 
                        widgetphotonui.WidgetThe widget to insert. 
- 
                        elementHTMLElementThe DOM node or its id (optional, default=Widget.e_parent) 
getAllWidgets
        ()
        
            Object
        
        static
    
    Get all instanciated PhotonUI widgets.
Returns:
An object containing all widgets {"widgetName": Widget, ...}
getWidget
        - 
                        name
Get a widget.
Parameters:
- 
                        nameStringThe widget name. 
Returns:
The widget or null.
hide
        ()
    
    Hide the widget (equivalent to widget.visible = false).
registerCallback
        - 
                        id
- 
                        wEvent
- 
                        callback
- 
                        thisArg
Register a callback for any PhotonUI/Widget event (called wEvent).
Callback signature:
function (Object(Base/Widget) [, arg1 [, arg2 [, ...]]])removeClass
        - 
                        className
Remove a class from the outer HTML element of the widget.
Parameters:
- 
                        classNameStringThe class to remove. 
show
        ()
    
    Display the widget (equivalent to widget.visible = true).
unparent
        ()
    
    Detache the widget from its parent.
