Skip to main content

Control Behaviors

Content List

  • Construction Kit Control Behaviors
    • Map
      • Map 
      • Map Bridge 
    • Construction Kit Scroll Control Behaviors
      • List Behavior 
      • Scrollbar Behavior 
      • Scroll View 
      • SubList Behavior 
    • Circular Slider Behavior 
    • Drawer Behavior 
  • Internal Control Behaviors
    • Caret 
    • Handle Control State 
    • DataContext 
    • Edit Text 
    • Selection Group 
  • Public Property Control Behaviors
    • Provide Alignment 
    • Copy Size 
    • Provide Color 
    • Provide Margin 
    • Property Provider 
    • Render Node 
    • Provide Appearance 
    • Provide Image 
    • Set Layout 
    • Provide Text 
  • Align Pivot 
  • Android Event Bridge 
  • Arc Align 
  • Blend Mode 
  • Breadcrumb Behavior 
  • Disable Control 
  • Enable Control 
  • Event Bridge 
  • Focus 
  • Focus Leave 
  • Hover 
  • HoverLeave 
  • IntervalSwitch 
  • Keyboard Behavior 
  • Menu Item 
  • MenuScreen 
  • Navigation Instruction View 
  • OnClick 
  • OnPressed 
  • OnTimer 
  • Orbit Camera Transform 
  • Page Indicator 
  • Rectangle Clipping Behavior 
  • Roll 
  • Touch Indication Behavior 
  • Transform Mesh2D 
  • Event Handler 
  • Virtual Key

Construction Kit Control Behaviors > Map

 

Map
Description

Provides the map rendering and navigation functionality.

Property Name Type Description
Bearing BearingType Clockwise angle relative to North that the users currently faces.
Longitude LongitudeType Longitude of current users location.
Latitude LatitudeType Latitude of current users location.
SimulateDriving SimulateDrivingType Simulate driving along computed route when in navigation mode.
NaviMessageNode NaviMessagesNodeType Node to which navigation instructions will be sent.
LocationMesh LocationMeshType Node containing mesh(es) used to render the location indicator.
RouteOverlayColor RouteOverlayColorType Color used by the route overlay.
AvoidTolls AvoidTollsType Avoid tolls during route computation.
AvoidMotorways AvoidMotorwaysType Avoid motorways during route computation.
AvoidFerry AvoidFerryType Avoid ferrys during route computation.

 

Map Bridge
Description

Builds a bridge to MapBehavior forwarding touch events.

Property Name Type Description
TargetNode TargetNodeType Node containing the target MapBehavior to which events will be forwarded.

 


Construction Kit Control Behaviors > Construction Kit Scroll Control Behaviors

 

List Behavior
Description

ListBehavior is a list supporting scrolling itemwise and pagewise combined with either relative or absolute scrolling.

Common Properties
Property Name Type Description
ScrollDirection ScrollDirection::Enum The direction in which the ListBehavior scrolls.
Position FeatStd::Float The pixel position of the visible content within the list content.
AnimationDuration FeatStd::UInt32 Duration of the scrolling animation.
DecelerationFactor FeatStd::Float Loss of flick animation speed over time.
MaxSpeedPerFlick FeatStd::Float Maximum amount of speed each flick motion adds to the flick animation.
MinSpeedPerFlick FeatStd::Float Minimum speed required to count a touch gesture as a flick and start or continue the flick animation.
MinMovementToScrolling FeatStd::UInt32 Minimum distance a touch gesture needs to move to start a scrolling animation.
MaxTouchSampleAge FeatStd::UInt32 Maximum age in miliseconds of touch movement speed counted towards generating flick animation speed.
Items
The items property is used for binding of dynamic items. It can only be set via databinding. Only one visible list control should be bound to a fragment list in the model. Otherwise the list fragments in the model are not able to provide data for both list controls. Use a separate list model that is filled with the same data if such a use case is required.
ListFragmentTriggerOffset FeatStd::SizeType A dynamic list is requested in fragments to reduce memory consumption and overall performance overhead. This trigger offset value defines an area at the begin and end of the list fragment. Whenever the list shows a part of these areas a new fragment is requested from the model.
ListFragmentSize FeatStd::SizeType A dynamic list is requested in fragments to reduce memory consumption and overall performance overhead. This buffer size defines how large this fragment should be. By default it is set to 0 which results in an automatic calculation. The automatic calculation assumes the number of item nodes is configured to match the maximum number of visible nodes for one page. By multiplying this number by three and adding the trigger offset one time for the begin and one additional time for the end to calculate for the automatic buffer size the list has a spare page on each side before a new fragment has to be requested

 

Scrollbar Behavior
Description

Reflects the position of the scrollable behavior. E.g. ListBehavior2D.

Common Properties
Property Name Type Description
TouchListenerNode Candera::AbstractNodePointer This node defines the area on which the ScrollbarBehavior will listen for the touch events.
ScrollDirection FeatStd::Optional< ScrollDirection::Enum > The direction in which the ListBehavior scrolls. By default it is configured as a vertical scrollbar.
ScrollbarVisibility ScrollbarVisibility::Enum Configure the visibility of the scrollbar. By default it is set to Automatic which will determine the visibility based on the actual content.
HandleMinimumSize FeatStd::UInt32 The minimum height (for vertical scrollbar) or minimum width (for horizontal scrollbar) of the handle in pixels.
MinMovementToScrolling FeatStd::UInt32 Minimum distance a touch gesture needs to move to start scrolling.

 

Scroll View
Description

Scroll View is a Touchable Control that has a ContentAnchor which can be filled with various content. Depending on the size of the content and the configured Scroll View's Layout Size, a horizontal and/or vertical scrollbar appears.

Because of the fact that Scroll View supports horizontal and vertical scrolling, it receives the ScrollableEvent from Send Scrollable Event Behavior (can also be forwarded from a Scrollbar Behavior Scrollbar via Event Bridge Behavior).

Example Usage

Common Properties

This behavior does not have any configurable properties.

 

SubList Behavior
Description

SubListBehavior extends the ListBehavior by special handling when being used in a child node of a ListBehavior.

Common Properties
Property Name Type Description
ScrollDirection ScrollDirection::Enum The direction in which the SubListBehavior scrolls.
Position FeatStd::Float The pixel position of the visible content within the list content.
AnimationDuration FeatStd::UInt32 Duration of the scrolling animation.
DecelerationFactor FeatStd::Float Loss of flick animation speed over time.
MaxSpeedPerFlick FeatStd::Float Maximum amount of speed each flick motion adds to the flick animation.
MinSpeedPerFlick FeatStd::Float Minimum speed required to count a touch gesture as a flick and start or continue the flick animation.
MinMovementToScrolling FeatStd::UInt32 Minimum distance a touch gesture needs to move to start a scrolling animation.
MaxTouchSampleAge FeatStd::UInt32 Maximum age in miliseconds of touch movement speed counted towards generating flick animation speed.
Items
The items property is used for binding of dynamic items. It can only be set via databinding. Only one visible list control should be bound to a fragment list in the model. Otherwise the list fragments in the model are not able to provide data for both list controls. Use a separate list model that is filled with the same data if such a use case is required.
ListFragmentTriggerOffset FeatStd::SizeType A dynamic list is requested in fragments to reduce memory consumption and overall performance overhead. This trigger offset value defines an area at the begin and end of the list fragment. Whenever the list shows a part of these areas a new fragment is requested from the model.
ListFragmentSize FeatStd::SizeType A dynamic list is requested in fragments to reduce memory consumption and overall performance overhead. This buffer size defines how large this fragment should be. By default it is set to 0 which results in an automatic calculation. The automatic calculation assumes the number of item nodes is configured to match the maximum number of visible nodes for one page. By multiplying this number by three and adding the trigger offset one time for the begin and one additional time for the end to calculate for the automatic buffer size the list has a spare page on each side before a new fragment has to be requested

 


Construction Kit Control Behaviors

 

Circular Slider Behavior
Description

This behavior provides the functionality of CircularSlider control by creating a radial mask and setting a rotation of knob node.

Common Properties
Property Name Type Description
Value FeatStd::Variant Value of the slider
MinimumValue FeatStd::Variant Minimum value of the slider
MaximumValue FeatStd::Variant Maximum value of the slider
StepSize FeatStd::Variant Step size for Value
MinimumAngle FeatStd::Float Angle of the slider, corresponding to minimum value.
MaximumAngle FeatStd::Float Angle of the slider, corresponding to maximum value.
ThumbNode Candera::AbstractNodePointer Thumb node which will be rotated.
ImageNode Candera::AbstractNodePointer Image node which will be masked.

 

Drawer Behavior
Description

Drawer Behavior to switch node on/off.

Common Properties
Property Name Type Description
Open bool Shows the Drawer in its opened appearance.
AppearDirection AppearDirection::Enum The direction from which the Drawer will open.
DragEnabled bool Set to true to allow the Drawer to be controlled by Touch Inputs.

 


Internal Control Behaviors

 

Caret
Description

Behavior which receives the CaretPositionChanged Event from the EditTextBehavior. It forwards the value to other behaviors (e.g. SetSize) and switches the blinking state.

Common Properties
Property Name Type Description
CaretNode Candera::AbstractNodePointer Node which will be set as caret." type="
IntervalSwitchBehavior Candera::Behavior* The Caret Behavior will change the state of the given IntervalSwitch Behavior.

 

Handle Control State
Description

Basic Behavior which handles the states of a control. Sends a StateEvent to StateConditions.

Example Usage

Common Properties
Property Name Type Description
Highlighted bool If true, the controls state Highlighted is set to true.
Enabled bool If set to false it will not react on focus events and does not have to support different visualizations for the different states.
Focusable bool If true, the control is focusable. Otherwise the control can not be focused.
Identifier Candera::AbstractNodePointer Identifier which is used when emitting an Event (e.g. Click Event).

 

DataContext
Description

This behavior provides a local data context on the associated node that can act as a set of binding sources (if a binding source is set at that data context). It is internally used by other behaviors like the list behavior to set individual binding sources for items.

Common Properties

This behavior does not have any configurable properties.

 

Edit Text
Description

Control Behavior to make a TextNode editable. Receives KeyEvents and emits CaretPositionChanged Events. These can be received by the CaretBehavior to set the position of the caret node.

Common Properties
Property Name Type Description
InputText FeatStd::String Text which will be set as default text.
TextNode Candera::AbstractNodePointer Text Node which will be edited.
Placeholder Candera::AbstractNodePointer Text which will be shown as placeholder.
SetValueOnEachChange bool If true, the value will be set on each input.
MaxTextLength FeatStd::UInt16 Maximum count of characters.
JustDigits bool If true, the Inputfield will receive just digits.

 

Selection Group
Description

Provides an ArrayProperty for Selection Objects. If one of them gets selected the others get deselected (Objects need a ChangeSelectionActionBehavior). Needs to be attached to a value Behavior.

Common Properties
Property Name Type Description
DefaultSelectedObject Candera::AbstractNodePointer Selection Object (e.g. RadioButton) which shall be selected by default.

 


Public Property Control Behaviors

 

Provide Alignment
Description

Provides properties to set the horizontal and vertical alignment. Especially for Controls.

Common Properties
Property Name Type Description
HorizontalAlignment Candera::HorizontalAlignment Provides property to set the Horizontal Alignment (especially for Controls).
VerticalAlignment Candera::VerticalAlignment Provides property to set the Vertical Alignment (especially for Controls).

 

Copy Size
Description

Copies the layout size to a target node. Especially for Controls to transfer the size from the control node to an inner node.

Common Properties
Property Name Type Description
TargetNode Candera::AbstractNodePointer The target node to which the events are routed from the source node. If the property is not set, the event will be routed to the node of the behavior

 

Provide Color
Description

Sets the color of a node with a Color effect attached (e.g. BitmapBrushColorBlend).

Common Properties
Property Name Type Description
PropertyReference CgiStudioControl::PropertyReference::Enum Choose how the property gets set. Via own property or from another Behavior.
Color Candera::Color The color to set.
Advanced Properties
Property Name Type Description
PropertyProvider Behavior* Property Behavior which contains the color which has to be set on the effect.

 

Provide Margin
Description

Provides property to set the margin. Especially for Controls.

Common Properties
Property Name Type Description
Margin Candera::Margin Provides property to set the Margin (especially for Controls).

 

Property Provider
Description

Offers to set a property of a selectable type. This property can then be used for other Behaviors (e.g. an image for Set Image or Provide Image).

Common Properties
Property Name Type Description
PropertyDataType CgiStudioControl::PropertyDataTypes::Enum Choose the type which sould be offered by this behavior.
Advanced Properties
Property Name Type Description
Color Candera::Color The color which can be used from other Behaviors.
Text FeatStd::String The Text that will be set to the Text Node.
Image <Candera::MemoryManagement::SharedPointer<Candera::Image2D>/td> description="The image to set on the effect.
Texture Candera::MemoryManagement::SharedPointer<Candera::TextureImage> The texture to set on the effect.
Appearance Candera::MemoryManagement::SharedPointer<Candera::Appearance> The appearance to set on the node.
Value FeatStd::Variant The value that will be set to the Send Value as Event action.
Layout CgiStudioControl::LayoutType::Enum The layouter type for node. See Set Layout for more information.

 

Render Node
Description

Sets rendering of a node to enabled or disabled and provides the setting as a property for Controls.

Common Properties
Property Name Type Description
EnableRendering bool If true, rendering is enabled.

 

Provide Appearance
Description

ProvideAppearance, 3D only

Common Properties
Property Name Type Description
PropertyReference CgiStudioControl::PropertyReference::Enum Choose how the property gets set. Via own property or from another Behavior.
Appearance Candera::MemoryManagement::SharedPointer<Candera::Appearance> The appearance to set on the node.
Advanced Properties
Property Name Type Description
PropertyProvider Behavior* Property Behavior which contains the color which has to be set on the effect.

 

Provide Image
Description

Sets the image of a node and provides the Image as a property for Controls.

Example Usage

Common Properties
Property Name Type Description
PropertyReference CgiStudioControl::PropertyReference::Enum Choose how the property gets set. Via own property or from another Behavior.
Image Candera::MemoryManagement::SharedPointer<Candera::Image2D> The image to set on the effect.
Texture Candera::MemoryManagement::SharedPointer<Candera::TextureImage> The image to set on the appearance.
PropertyProvider Behavior* Property Behavior which contains the color which has to be set on the effect.

Set Layout

Class Reference

Description

Provides a published property to set the layout for Controls.

Common Properties
Property Name Type Description
Layout CgiStudioControl::LayoutType::Enum Selects layouter type for node: None, Overlay, Stack, Baseline.
StackArrangement Candera::StackLayouter::Arrangement Selects arrangement for stack layouter.
PropertyReference CgiStudioControl::PropertyReference::Enum Choose how the property gets set. Via own property or from another Behavior.
PropertyProvider Behavior* Property Behavior which contains the layout which has to be set on the effect. See Property Provider for more information.
Limitations
  • Only certain built-in layouters are supported
  • Scene Composer does not support displaying layout-related properties when layouter is assigned using SetLayout behavior.

 

Provide Text
Description

Modifies the text of a TextNode or CanvasText and provides the text as property for Controls.

Example Usage

Common Properties
Property Name Type Description
PropertyReference CgiStudioControl::PropertyReference::Enum Choose how the property gets set. Via own property or from another Behavior.
Text FeatStd::String The Text that will be set to the Text Node.
PropertyProvider Behavior* Property Behavior which contains the color which has to be set on the effect.
Style Candera::MemoryManagement::SharedPointer<Candera::TextRendering::SharedStyle> The Style that will be set to the Text Node.
Alignment Candera::TextNode2DLayouter::TextAlignment 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.
LineSpacing Candera::TextRendering::PixelSize Defines the distance between the baselines of successive lines of text.
WordWrap bool If word wrapping is enabled then the lines that exceed the client area will be split during arrangement into multiple lines.
Trimming Candera::TextNode2DLayouter::Trimming 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.

 


Align Pivot
Description

Aligns all child nodes according to their pivot point.

Example Usage

Common Properties

This behavior does not have any configurable properties.

 

Android Event Bridge
Description

Receives JsonEvents from an Android Control and transforms them to an equivalent CGI Studio event.

Common Properties
Property Name Type Description
TargetNode Candera::AbstractNodePointer The target node to which the events are sent. If the property is not set, the event will be routed to the node of the behavior.

 

Arc Align
Description

Aligns child nodes in a circular layout. Provides properties for the radius, orientation offset and the min and max angle.

Example Usage

Common Properties
Property Name Type Description
Radius Float Radius of the digital needle indicators.
Orientation Offset Float Offset in the orientation of the needle indicators.
Angle Min Max Vector2 Min/Max angle values (e.g. indicators displayed from -25 to 210 degrees).

 

Blend Mode

Class Reference

Description

Sets a blend mode from a given list of options. Depending on that option the behavior choses the appropriate blend factors and operations. In 2D it sets the values on the effect and in 3D on the render-mode if one is attached on the same node.

The following blend modes are available:

drawing-7-1677553381.png
  • Default
  • Add
  • Multiply
  • Screen
  • Source Atop
  • Source In
  • Source Over
  • Destination Atop
  • Destination Out
  • Destination Over

The default blend mode comes in different variations, e.g. pre-multiplied, which should be applied if the alpha channel is pre-multiplied. The other blend modes are implemented according to the Porter-Duff composition modes.
In 3D there are two additional blend modes available:

  • Lighten
  • Darken.
Common Properties
Property Name Type Description
Blend Mode BlendType::Enum Sets a blend mode from a given list of options.
PropertyReference CgiStudioControl::PropertyReference::Enum Choose how the property gets set. Via own property or from another Behavior.
PropertyProvider Behavior* Property Behavior which contains the color which has to be set on the effect.

 

 

 

Virtual Key
Description

Receives a Change Value Event with a boolean. True will start emitting Key Events, false will stop emitting Key Events.

Common Properties
Property Name Type Description
Modifier Candera::KeyModifierEnum::Enum Modifier Key (e.g. Shift)
KeyCode Candera::KeyboardKeyCode::Enum With KeyCode you can select any key.

Back to the menu