Value Processing Behaviors
Content List
- Animation Value Processing Behaviors
- Effects Value Processing Behaviors
- Diagnostics Value Processing Behaviors
- Transformation Value Processing Behaviors
- AnimationMeter
- Arithmetic Operation
- Clock
- Dial
- Filter
- Forward Value
- Interpolate Value
- Map Value
- Map Value normalized
- Process Value Changed Event
- Render a Range
- Send ChangeValue on receiving ProcessValue event
- Set Selected State
- Smooth Value
- Render Child Nodes
- Format String
- Track Angle on Drag
- Drag on Track to Value
- Action on Value
- Value
Animation Value Processing Behaviors
Jump to Animation Keyframe
Description
Expects a Float value between 0 and 1 (inclusive) as an event. Sets a selected animation to a frame corresponding to the value that the AnimationProcessValueBehavior receives.
Common Properties
| Property Name | Type | Description |
|---|---|---|
| Animation | Candera::MemoryManagement::SharedPointer<Candera::Animation::AnimationPlayer> | The animation controlled. AnimationProcessValueBehavior sets the animation to the frame corresponding to the value it receives. |
Advanced Properties
| Property Name | Type | Description |
|---|---|---|
| SequenceStartTime | Candera::Animation::SequenceTimeType | The start point of the animation. [ms] |
| SequenceDurationTime | Candera::Animation::SequenceTimeType | The duration of the animation. [ms] |
Effects Value Processing Behaviors
Set Alpha Value
Description
Sets the Alpha value of a node (expects a Float value).
Example Usage
Common Properties
| Property Name | Type | Description |
|---|---|---|
| Target Node | Node2D* | The Node which gets the resulting alpha value. If not set, then the node where the behavior is attached to, will be modified. |
Switch Image
Description
Sets an image on a Render Node based on a float index received as event.
Supports
- Controls:
- FlipBook
Example Usage
- FlipBook
- Switch Image Example
Common Properties
| Property Name | Type | Description |
|---|---|---|
| Upload Strategy | Enum (OnInit, OnDemand) | Specifies if images are uploaded on demand or when the behavior is instantiated. OnInit may cause an initial delay and keeps all images loaded. OnDemand avoids an initial delay and only keeps one image loaded. |
| Render Node | RenderNode * | The Render Node ImageSelectProcessValueBehavior will switch images on. |
Zoom Effect
Description
Expects a Float value between 0 and 1 (inclusive) as an event. Applies scale and alpha on children of a group.
Example Usage
Common Properties
| Property Name | Type | Description |
|---|---|---|
| Alpha Factors | Vector2 | Min/Max transparency factors |
| Zoom Factors | Vector2 | Min/Max zoom factors |
| Zoom Distribution | Float | Distribution of Zoom/Alpha to each side of the selection. |
| Group Node | Node2D* | The node whose children are enabled or disabled by ZoomProcessValueBehavior. |
Diagnostics Value Processing Behaviors
Frame Measurement
Description
Outputs Frame Measure information of the specified Render Target. These Measurements can be Frames Per Seconds, Current Frame and Frame Time. This Behavior acts as Source for Process Value Behaviors.
Common Properties
| Property Name | Type | Description |
|---|---|---|
| RenderTarget | Candera::GraphicDeviceUnit* | The render target which FPS should be monitored. |
| Output | OutputType::Enum | Specifies which information will be output. |
| DispatchThreshold | FeatStd::Optional< FeatStd::Variant > | Specifies how much the Output has to change to dispatch an event to its receivers. |
Transformation Value Processing Behaviors
Resize Group Node
Description
Expects a Float value as an event, and changes the layout size of a group node it is placed on. When mode is 'Relative' it scales the layout size (expected value is a normalized value). When mode is 'Absolute' the layout size is set in pixels.
Common Properties
| Property Name | Type | Description |
|---|---|---|
| AffectXAxis | AbstractNodePointer | Enables or disables scaling in horizontal direction. |
| AffectYAxis | Enum (AxisX, AxisY) | Enables or disables scaling in vertical direction. |
| Mode |
Enum (Absolute, Relative) | Determines how the received value will be interpreted. |
| ScaleVector |
Vector2 |
This vector is multiplied by the received value and specifies the magnitude by which the node is scaled |
Set Node Size
Description
Expects a Float value as an event. Sets the layout size of a node on a given axis by the received value in pixels.
Common Properties
| Property Name | Type | Description |
|---|---|---|
| Target Node | AbstractNodePointer | The target node which is modified. if not set, then the node where the behavior is attached to, will be modified. |
| Size Axis | Enum (AxisX, AxisY) | The axis along which the size is set. |
Set Position
Description
Expects a Float value as an event. Translates Position Node along given axis by the received value in pixels.
Example Usage
Common Properties
| Property Name | Type | Description |
|---|---|---|
| Target Node | AbstractNodePointer | The target node to which the events are routed from the source node. |
| Translation Axis | Enum (AxisX, AxisY) | The axis along PositionProcessValueBehavior2D translates Position Node node. |
Set Rotation
Description
Expects a Float value as an event. Rotates Rotation Node clockwise by the received value in degrees.
Example Usage
Common Properties
| Property Name | Type | Description |
|---|---|---|
| Target Node | AbstractNodePointer | The node which is modified. If not set, then the node where the behavior is attached to, will be modified. |
Set Scale
Description
Expects a Float value as an event. Scales Scaled Node by the received (scalar) value multiplied by Vector X Y (x value for horizontal scaling, y value for vertical scaling). Scaling along either axis can be enabled or disabled.
Example Usage
Common Properties
| Property Name | Type | Description |
|---|---|---|
| TargetNode | TargetNodeType& | The Node which is modified. If not set, then the node where the behavior is attached to, will be modified. |
| ScaleAlongX | ScaleAlongXType (bool) | Enables or disables scaling in horizontal direction. |
| ScaleAlongY | ScaleAlongYType (bool) | Enables or disables scaling in vertical direction. |
| ScaleAlongZ | ScaleAlongZType (bool) | Enables or disables scaling in Z-direction. |
| ScaleVector2D | ScaleVector3DType& (Vector2) | This vector is multiplied by the received value and specifies the magnitude by which the node is scaled. |
| ScaleVector3D | ScaleVector3DType& (Vector3) | This vector is multiplied by the received value and specifies the magnitude by which the node is scaled. |
Move Node
Description
Expects a Float value as an event. Translates Translated Node by the received (scalar) value multiplied by Vector X Y.
Example Usage
Common Properties
| Property Name | Type | Description |
|---|---|---|
| Target Node | Node2D * | The node TranslateProcessBehavior moves. |
| Vector XY | Vector2 | This vector is multiplied by the value TranslateProcessValueBehavior receives and specifies direction and magnitude by which TranslateProcessValueBehavior moves Translated Node. If not set, then the node where the behavior is attached to, will be modified. |
AnimationMeter
Description
Controls an animation according to the passed value.
This behavior is a Behavior Block.
Arithmetic Operation
Description
Arithmetic operation behavior allows to perform additon, subtraction, multiplication and division operations on the passed value.
Common Properties
| Property Name | Type | Description |
|---|---|---|
| Operation | CgiStudioControl::ArithmeticOperationType::Enum | Arithmetic operation to be performed. |
| Operand | FeatStd::Variant | A number to be used as addend/subtrahend/multiplicant/divisor on provided value. |
| OutputType | FeatStd::VariantValueType::Enum | Type of the Variant forwarded as result. |
Clock
Description
Converts a time integer into seconds, minutes and hours and passes those values to behavior-properties.
Common Properties
| Property Name | Type | Description |
|---|---|---|
| SecondsProcessValueBehavior | Candera::ProcessValueBehavior* | The behavior that receives the seconds. |
| MinutesProcessValueBehavior | Candera::ProcessValueBehavior* | The behavior that receives the minutes. |
| HoursProcessValueBehavior | Candera::ProcessValueBehavior* | The behavior that receives the hours. |
| OffsetInMinutes | FeatStd::Int32 | Offset in minutes to add to time (i.e. for different time zones). |
| ShowFull24Hours | bool | If true, hours will be shown from 0-23, otherwise in AM/PM format. |
| AMText | FeatStd::String | The string of the AM label. |
| PMText | FeatStd::String | The string of the PM label. |
| AMPMTextBehavior | Candera::Behavior* | Sets text 'AM' or 'PM'. |
| ShowSeconds | bool | If true, seconds will be shown. |
| SecondsNode | Candera::AbstractNodePointer | The node that will be turned off if showing of seconds is disabled. |
Dial
Description
Receives an angle from a ProcessValueEvent or a value in a ChangeValueEvent. The knob changes its rotation according to that angle. The Behavior Transmits the changed value through events (ValueChangedEvent and ProcessValueEvent).
Common Properties
| Property Name | Type | Description |
|---|---|---|
| CurrentValue | FeatStd::Int32 | Current value for the dial. |
| MinimumRotation | FeatStd::Float | Minimum rotation of the dial. |
| MaximumRotation | FeatStd::Float | Maximum rotation of the dial. |
| StepSize | FeatStd::Float | Step size in degrees. |
| KnobNode | Candera::AbstractNodePointer | Knob node which will be rotated. |
Filter
Description
Filters the processed value via an attached Condition (e.g. Check processed Value).
Common Properties
| Property Name | Type | Description |
|---|---|---|
| Condition | Candera::ConditionBehavior* | ConditionBehavior for passing the value to the next process value behavior. |
Forward Value
Description
Forwards a received value. Associated controls with a value property receive the value.
Example Usage
Common Properties
| Property Name | Type | Description |
|---|---|---|
| Event Dispatch Strategy | Enum (Direct, Broadcast, Bubble, Tunnel, DedicatedBehavior) | The way the event gets sent. |
| Target Node | AbstractNodePointer | The target node to which the events are routed. If this property is not set, the event will be routed to the node of the behavior. |
Interpolate Value
Description
Expects a Float value as an event. InterpolateProcessValueBehavior holds an internal Float value. It changes this internal value with given speed (Units Per Second) until it reaches the received value. Unless received value matches internal value, it sends internal value to a Process Value Behavior every frame.
Example Usage
Common Properties
| Property Name | Type | Description |
|---|---|---|
| Receivers | ReceiversType | The process value behaviors that will receive the value as next in the value processing chain. |
| Units Per Second | Float | Speed at which InterpolateProcessValueBehavior changes its internal value. |
| Filter Time Constant | Float | The moment before InterpolateProcessValueBehavior’s internal value reaches the received value, the speed at which the former is changing slows down. This prevents a sudden end of movement that can be felt as artificial in some cases. |
Map Value
Description
Expects a Float value as an event. Maps the received value from one interval to another.
Common Properties
| Property Name | Type | Description |
|---|---|---|
| InputMin | FeatStd::Optional< FeatStd::Variant > | [Optional] Smallest value of the interval to check. If Minimum is given as greater than Maximum then the values are internally swapped. |
| InputMax | FeatStd::Optional< FeatStd::Variant > | [Optional] Largest value of the interval to check. If Maximum is given as smaller than Minimum then the values are internally swapped. |
| OutputMin | FeatStd::Float | Smallest value of the interval mapped to. |
| OutputMax | FeatStd::Float | Largest value of the interval mapped to. |
| OutputType | FeatStd::VariantValueType::Enum | Type of the Variant forwarded as result. |
Map Value normalized
Description
Maps the numeric value received via 'ProcessValueEvent' within an arbitrary range to the normalized range from 0.0 to 1.0 and dispataches the result locally to its receivers. Receivers of this Behavior must therefore be value processing behaviors operating on normalized values.
Common Properties
| Property Name | Type | Description |
|---|---|---|
| Reverse | bool | Toggles the mapping direction. If this property is true, the received value is assumed to be within range from 0.0 to 1.0 and the emitted value is mapped accordingly. |
| ValueForRange | ValueBehaviorBase* | The input value behavior for defining the mapped range. |
Process Value Changed Event
Description
The ProcessValueChangedBehavior handles ValueChanged events and processes the new value within a set of ProcessValueBehaviors chains. By default ProcessValueChangedBehavior does consume the event, which will result in dispatching the event any further in the dispatching strategy. If further dispatching of the ValueChangedEvent is required set the ConsumeEvent flag to false.
Common Properties
| Property Name | Type | Description |
|---|---|---|
| Sender | AbstractNodePointer | The node for which the event shall be emitted. If it is not set then the TargetNode or Node (if TargetNode is not set) will be taken instead. |
| Minimum | bool | Minimum threshold of the processed values. |
| Maximum |
bool |
Maximum threshold of the processed values. |
| ConsumeEvent |
bool |
Set this flag to false if the event should not be consumed by the trigger. By default it is set to true and if the trigger evaluates to true the event will not be routed to any other behavior. |
| Receivers |
ProcessValueBehavior ArrayProperty | The process value behaviors that will receive the value as next in the value processing chain. |
Render a Range
Description
Renders a range of nodes according to the passed value.
This behavior is a Behavior Block.
Send ChangeValue on receiving ProcessValue event
Description
Sends out a new value. Associated controls with a value property receive the new values.
Common Properties
| Property Name | Type | Description |
|---|---|---|
| ChangeValue | ChangeValue::Enum | How the event value shall be handled by the recieving behavior |
| EventDispatchStrategy | CgiStudioControl::EventDispatchStrategyType::Enum | The way the event gets sent |
| DedicatedBehavior | Candera::ProcessValueBehavior* | The dedicated process value behavior that will receive the change value event. |
Set Selected State
Description
This behavior is a Behavior Block.
Smooth Value
Description
Expects a numeric value as an event and applies exponent smoothing to that value and the previous calculated one.
Common Properties
| Property Name | Type | Description |
|---|---|---|
| SmoothingFactor | FeatStd::Float | The factor how fast the outputted value should adapt to the input value. Valid values are between 0.0 and 1.0 |
Render Child Nodes
Description
Enables/Disables Child nodes corresponding to the received value and the behavior settings.
Example Usage
Common Properties
| Property Name | Type | Description |
|---|---|---|
| TargetNode | Candera::AbstractNodePointer | The Node which is modified. If not set, then the node where the behavior is attached to, will be modified. |
| OperationMode | OperationMode::Enum | When set to MultipleNodes, EnableChildNodes will enable the first N children of Group Node. When Operation Mode is set to SingleNode, only the Nth node is enabled. |
| Levels | FeatStd::UInt8 | Number of levels to step down through groups. Default is zero. |
| NormalizeValue | bool | If set to true, the received value has to be between 0 and 1 and will be mapped to the number of children. Otherwise the value has to be the index of the child. |
Format String
Description
'Format String' modifies the Text of a TextNode Node and provides the Text as property for Controls. It supports formated text that can display one variable.
Example Usage
Common Properties
| Property Name | Type | Description |
|---|---|---|
| Text | String | Text that TextBehavior will change the Node to. Supports formatting for one variable that corresponds to the value TextProcessValueBehavior2D receivers. |
| Style | SharedPointer<SharedStyle> | The style that will be set to the Text Node. |
| Alignment | Enum (Auto, Left, Center, Right, Justified) | The horizontal text alignment, using the culture text direction, is used to define how text will be horizontally aligned within its layout area. |
| Multiline | Bool | If multi line is disabled, then the new line control characters will be ignored and text will always be rendered in one line. |
| Line Spacing | PixelSize (UInt16) | Defines the distance between the baselines of successive lines of type. |
| Word Wrap | Bool | If word wrapping is enabled then the lines that exceed the client area will be split during arrangement into multiple lines. |
| Trimming | Enum (None, Ellipsis, CustomText) | Trimming defines the behavior to employ when content overflows the content area. |
| TrimmingText | FeatStd::String | Trimming text defines the text which replaces content overflowing the content area. |
| TargetNode | Candera::AbstractNodePointer | The Node which gets the given text. If not set, then the node where the behavior is attached to, will be modified. |
Track Angle on Drag
Description
Listens to the touch of the selected node, returns the angle between pressing, moving and releasing.
Common Properties
| Property Name | Type | Description |
|---|---|---|
| TouchNode | Candera::AbstractNodePointer | A node that is used to collect information about the touch. |
Drag on Track to Value
Description
Determines the position of a touch move in relation to the associated node and provides it as value in range from 0.0 to 1.0 (normalized). The horizontal boundary of the associated node is the track. The Dragged Node is used to determine the hit area and to determine the position change relative to its center. This behavior can be used as a source to a Value Behavior. Add a Value Behavior as a receiver.
Common Properties
| Property Name | Type | Description |
|---|---|---|
| UseCenter | bool | If true, the center value defined for the knob bitmap is used to align the knob to the value position, otherwise the calculated center. |
| TrackDirection | TrackDirection::Enum | Defines if the position will be tracked horizontally or vertically |
| LeftTouchMargin | FeatStd::Float | Defines the size for extending or shrinking the touch-sensitive area at the left border of the knob. The size is given in percentage of the knob width. Positive values extend, negative values shrink the area. |
| RightTouchMargin | FeatStd::Float | Defines the size for extending or shrinking the touch-sensitive area at the right border of the knob. The size is given in percentage of the knob width. Positive values extend, negative values shrink the area. |
| TopTouchMargin | FeatStd::Float | Defines the size for extending or shrinking the touch-sensitive area at the top border of the knob. The size is given in percentage of the knob height. Positive values extend, negative values shrink the area. |
| BottomTouchMargin | FeatStd::Float | Defines the size for extending or shrinking the touch-sensitive area at the bottom border of the knob. The size is given in percentage of the knob height. Positive values extend, negative values shrink the area. |
| OnKnobDragOnly | bool | The position will only be updated when the Knob gets dragged, otherwise clicking on the control will move the knob to the position. |
Action on Value
Description
Passes a Process Value to a Condition Behavior and if the response is positive, invokes an Action behavior.
Example Usage
Common Properties
| Property Name | Type | Description |
|---|---|---|
| Condition | ConditionBehavior* | The ConditionBehavior that TriggerBehavior passes a value to and expect a response from to see if Action needs to be invoked. |
| Actions | ActionBehaviorArrayProperty | The set of ActionBehaviors that TriggerBehavior invokes in the event that it receives a positive response form Condition. |
| Consume Event | Bool | Set this flag to false if the event should not be consumed by the trigger. By default it is set to true and if the trigger evaluates to true the event will not be routed to any other behavior. |
Value
Description
ValueBehavior sends a value to any behavior derived from ProcessValueBehavior type. It supplies an input to process value behaviors via event.
Example Usage
Common Properties
| Property Name | Type | Description |
|---|---|---|
| Minimum | FeatStd::Optional< FeatStd::Variant > | Minimum of the Variant value. If Minimum is given as greater than Maximum then the values are internally swapped. |
| Maximum | FeatStd::Optional< FeatStd::Variant > | Maximum of the Variant value. If Maximum is given as smaller than Minimum then the values are internally swapped. |
| IntervalHandling | IntervalHandling::Enum | Select how the behavior should react when the minimum or maximum limit is exceeded. |
| AcceptValueEvent | bool | Set this flag to true to make the value changeable by events/actions. |
| BroadcastProcessValueEvent | bool | Set this flag to true to broadcast ProcessValue event even if value did not change. |