Skip to main content

Condition Behaviors

Content List

  • Control Condition Behaviors
    • Check Animation State 
    • Check Enter or Exit 
    • Check Interval Switch 
    • Check Selection ID 
    • Check Control State 
    • Check Timer 
    • Check changed Value 
    • Check processed Value 
    • Check Video State 
  • Input Condition Behaviors
    • Check Click 
    • Check Drag Drop 
    • Check Hover 
    • Check Key Input 
    • Check Pressed 
    • Swipe Gesture Condition 
    • Transform Gesture 
  • Logic Condition Behaviors
    • Check Logic Condition 
    • Check Not Condition 
  • Scroll Condition Behaviors
    • Check Scroll Condition 
  • Check Culture Change

Control Condition Behaviors


Check Animation State
Description

Checks the state of an AnimationEvent received from an 'Configure and Play Animation Behavior'.

Common Properties
Property Name Type Description
AnimationState AnimationState::Enum State of the AnimationEvent which fulfills the Condition.

When this condition is used in a global state machine, the event dispatch strategy of 'Configure and Play Animation Behavior' must be set to bubble or tunnel.

Back to the menu

Check Enter or Exit
Description

Expects a EnterExit Event (generated by Edit Text Behavior) and returns either a positive or negative response.

Common Properties
Property Name Type Description
EnterOrExit Bool True means Enter, false means Exit.
Check Interval Switch
Description

Expects an On or Off value from a TriggerBehavior and returns either a positive or negative response.

Common Properties
Property Name Type Description
VisualizationState IntervalSwitchState::Enum If the value (received by the IntervalSwitchConditionBehavior) matches the Visualization State set, it will return a positive response.

Back to the menu

Check Selection ID
Description

Compares the ID from the ChangeSelectionEvent with the ID from its own Control.

Common Properties
Property Name Type Description
SelectionCondition SelectionConditionEnum::Enum The condition that the ID from the ChangeSelectionEvent has to fulfill.
Check Control State
Description

Expects a State Event (generated by Control State Behavior) and returns either a positive or negative response.

Common Properties
Property Name Type Description
State ControlStateEnum::Enum State which has to be checked.
StateCondition StateConditionEnum::Enum The condition the state has to fulfill.
Check Timer
See also

Start Timer, OnTimer

Description

Checks if a Timer reached a certain value.

Common Properties

This behavior does not have any configurable properties.

Back to the menu

Check changed Value
Description

Evaluates the configured value condition. To be used within a trigger behavior to trigger a certain action if the value matches the condition.

Common Properties
Property Name Type Description
ConditionOperator Operators::Enum The condition operator.
ConditionValue FeatStd::Variant The condition value.

Back to the menu

Check processed Value
Description

Checks whether a Value meets certain condition.

The following values can take part in the comparison, depending on the Operation Mode selected:

  • Value sent in Process Value
  • External value from ValueBehavior
  • Value set directly in this ValueConditionBehavior

Example Usage

Common Properties
Property Name Type Description
OperationMode Operators::Enum Operation mode of behavior, defining which values should be compared:
processed value with condition value (default), processed value with external value or external value with condition value
ConditionOperator Operators::Enum The condition operator.
ConditionValue FeatStd::Variant The condition value.
ValueBehavior CgiStudioControl::ValueBehavior * Value behavior to be checked for changes if OperationMode requires external value.
Check Video State
Description

Expects a VideoState event (generated by Video Stream Behavior) and evaluates the configured state condition. To be used within a trigger behavior.

Common Properties
Property Name Type Description
VideoState VideoState::Enum State of the VideoEvent which fulfills the Condition.

Back to the menu


Input Condition Behaviors

 

Check Click
Description

Evaluates the configured click event condition. To be used within a trigger behavior to trigger a certain action.

Example Usage

Common Properties
Property Name Type Description ClickCount CgiStudioControl::ClickCount::Enum If the value ClickConditionBehavior receives matches the Click Count set, it will return a positive response.y/td> TouchId FeatStd::UInt The id of the finger that performed the click (the default value of 0 indicates the first finger, 1 the second ...).

Back to the menu

Check Drag Drop
Description

Evaluates the configured DragDrop event condition. To be used within a trigger behavior to trigger a certain action.

Common Properties
Property Name Type Description Type FeatStd::Optional<DragDropEventType::Enum> The optional type of the event. If not provided then any DragDropEvent will be evaluated to true. TouchId FeatStd::UInt The id of the finger that performed the drag (the default value of 0 indicates the first finger, 1 the second ...).y/td>

Back to the menu

Check Hover
Description

Evaluates the configured Hover event condition. To be used within a trigger behavior to trigger a certain action.

Common Properties
Property Name Type Description Type FeatStd::Optional<DragDropEventType::Enum> The optional type of the event. If not provided then any DragDropEvent will be evaluated to true. TouchId FeatStd::UInt The id of the finger that performed the drag (the default value of 0 indicates the first finger, 1 the second ...).y/td>

Back to the menu

Check Key Input
Description

Checks a received KeyEvent (Control or Node with ControlStateBehavior / 'Handle Control State' must have focus).

Common Properties
Property Name Type Description KeyType CgiStudioControl::KeyType::KeyCode Choose type of key. KeyCode Candera::KeyboardKeyCode::Enum Check the KeyCode of the pressed key (can also be modifier).
Advanced Properties
Property Name Type Description Modifier Candera::KeyModifierEnum::Enum Check a modifier key.

Back to the menu

Check Pressed
Description

Evaluates the configured Pressed event condition. To be used within a trigger behavior to trigger a certain action.

Common Properties
Property Name Type Description Type FeatStd::Optional<DragDropEventType::Enum> The optional type of the event. If not provided then any DragDropEvent will be evaluated to true. TouchId FeatStd::UInt The id of the finger that performed the drag (the default value of 0 indicates the first finger, 1 the second ...).

Back to the menu

Swipe Gesture Condition
Description

The swipe condition checks if a swipe/flick has been performed according to the configured settings.

Configuration

The type of swipe event and the direction can be configured. By default, it is configured to the end of the swipe (removing the finger from the screen) in any direction. Other configurations are:

Begin

The finger has touched the control and moved over the threshold.

    The threshold in pixel is independent of the unit size of the control local coordinate system. You do not have to take care of that transformation.
    The default threshold is set to 10 pixel.
    The threshold can be changed by calling this method: CgiStudioControl::SwipeGestureDetector:: GetInstance().SetSwipeDistanceThreshold(…).
    Swiping

    The swipe is in progress and the finger is moving over the screen.

    Flick

    In addition to the Swipe End a Swipe Flick will be sent if the velocity at the Swipe End exceeds the flick velocity threshold.

      The threshold is in pixel per second independent of the unit size of the control local coordinate system. You do not have to take care of that transformation.
      The default threshold is set to 0,01 pixel per second.
      The threshold can be changed by calling this method CgiStudioControl::SwipeGestureDetector:: GetInstance().SetFlickVelocityThreshold(…).
      Abort

      An external actor has aborted the swipe. The finger is still on the screen. But the gesture detector will no longer process the swipe gesture. This can be caused for example when a behavior is taking exclusive control over the touch event handling. Like the list behavior does it when it enters touch based scrolling mode.

      To limit the condition to a certain direction just enable the direction. The default will be set to left (e.g. a next gesture in a menu screen or delete gesture in a message list). You can change it to Right, Up or Down. The direction is always in the local coordinate system of your control (e.g. if you have to implement a UI for a rotated display you will still receive the swipe up event even if it is swipe right in the display coordinate system).

      Common Properties
      Property Name Type Description Type FeatStd::Optional<SwipeType::Enum> The type of the swipe gesture. Direction FeatStd::Optional<SwipeDirection::Enum> The direction of the swipe.

      Back to the menu

      Transform Gesture
      Description

      Use this condition to trigger actions in an event handler whenever a transform gesture has been detected (pan, pinch and rotate).

      Common Properties

      This behavior does not have any configurable properties.

      Back to the menu