Module: structure/pure

This module defines the widgets for the CometVisu visualisation.

Since:
  • 2010
Author:
  • <p>Christian Mayer [CometVisu at ChristianMayer dot de]</p>
Source:

Methods


<inner> addCreator(name, object)

Description

Parameters:
Name Type Description
name
object
Source:

<inner> addPopup(name, object)

Description

Parameters:
Name Type Description
name
object
Source:

<inner> close(event)

Description

Parameters:
Name Type Description
event
Source:

<inner> create(attributes)

Description

Parameters:
Name Type Description
attributes
Source:
Returns:

ret_val


<inner> createDefaultWidget(widgetType, $element, path, flavour, type, updateFn, makeAddressListFn)

Create a default widget to be filled by the creator afterwards.
Note: the reciever of the returned string must add an

closing element!

Parameters:
Name Type Description
widgetType

string of the widget type

$element

jQuery object of the XML element

path

string of the path ID

flavour
type
updateFn

The callback function for updates

makeAddressListFn
Source:
Returns:

ret_val


<inner> defaultButtonDownAnimation(path, actor)

Create an action handling that shows a button press animation.
Note: use this function when multiple action elements are used and thus
bind_click_to_widget is not available.

Parameters:
Name Type Description
path
actor
Source:

<inner> defaultButtonDownAnimationInheritAction(path, actor)

Create an action handling that shows a button press animation.
When the action is not set, it will be searched for - so that widgets
with bind_click_to_widget will also work.

Parameters:
Name Type Description
path
actor
Source:

<inner> defaultButtonUpAnimation(path, actor)

Create an action handling that shows a button unpress animation.
Note: use this function when multiple action elements are used and thus
bind_click_to_widget is not available.

Parameters:
Name Type Description
path
actor
Source:

<inner> defaultButtonUpAnimationInheritAction(path, actor)

Create an action handling that shows a button unpress animation.
When the action is not set, it will be searched for - so that widgets
with bind_click_to_widget will also work.

Parameters:
Name Type Description
path
actor
Source:

<inner> defaultUpdate(ga, data, passedElement, newVersion, path)

ga: address
data: the raw value from the bus
passedElement: the element to update

Parameters:
Name Type Description
ga
data
passedElement
newVersion
path
Source:
Returns:

value


<inner> defaultUpdate3d(ev, data, passedElement)

Description

Parameters:
Name Type Description
ev
data
passedElement
Source:

<inner> defaultValue2DOM(value, modifyFn)

Method to handle all special cases for the value. The might come from
the mapping where it can be quite complex as it can contain icons.
value: the value that will be inserted
modifyFn: callback function that modifies the DOM

Parameters:
Name Type Description
value
modifyFn
Source:

<inner> defaultValueHandling(ga, data, widgetData)

Description

Parameters:
Name Type Description
ga

address

data

the raw value from the bus

widgetData

the data structure in the widget

Source:
Returns:

value


<inner> extractLabel(label, flavour, labelClass, style)

Description

Parameters:
Name Type Description
label
flavour
labelClass
style
Source:
Returns:

BinaryExpression


<inner> extractLayout(layout, type)

Description

Parameters:
Name Type Description
layout
type
Source:
Returns:

ret_val


<inner> extractLayout3d(layout)

Description

Parameters:
Name Type Description
layout
Source:
Returns:

ret_val


<inner> getCreator(name)

Description

Parameters:
Name Type Description
name
Source:
Returns:

MemberExpression


<inner> getPopup(name)

Description

Parameters:
Name Type Description
name
Source:
Returns:

MemberExpression


<inner> makeAddressList(element, handleVariant, id)

this function extracts all addresses with attributes (JNK)
elements. The first is a boolean that determins if
the visu should listen for that address. The second
is added as it is to the returned object.

Parameters:
Name Type Description
element
handleVariant

is a callback function that returns an array of two

id

id / path to the widget

Source:
Returns:

address


<inner> parseLayout(layout, defaultValues)

Parse config file layout element and convert it to an object

Parameters:
Name Type Description
layout
defaultValues
Source:
Returns:

ret_val


<inner> placementStrategy(anchor, popup, page, preference)

Figure out best placement of popup.
A preference can optionally be passed. The position is that of the numbers
on the numeric keypad. I.e. a value of "6" means centered above the anchor.
A value of "0" means centered to the page

Parameters:
Name Type Description
anchor
popup
page
preference
Source:
Returns:

ObjectExpression


<inner> setWidgetLayout(page, path)

this function implements all widget layouts that are identical (JNK)
implemented: rowspan, colspan

Parameters:
Name Type Description
page
path
Source:
Returns:

ret_val


<inner> VisuDesign()

This class defines all the building blocks for a Visu in the "Pure" design

Source: