# Candera 3.5

To keep backwards compatibility for any interface change in the public API the old interface has been kept and marked as deprecated. The deprecated interfaces will be removed in future versions. Compiler warnings will be generated when using a deprecated interface through the usage of Candera Macro CANDERA\_DEPRECATED\_3\_4\_0.

# Candera/FeatStd CMake Build System Changes

#### Clipping Enabled by Default

The flag CANDERA\_LAYOUT\_CLIPPING\_ENABLED was disabled by default. From now on the flag CANDERA\_LAYOUT\_CLIPPING\_ENABLED is enabled by default. Reason: for proper layout in terms of HMI controls the clipping of layout areas is mandatory. HMI controls are a major focus of CGI Studio 3.5.

---

# Candera Base

#### Cached Layout

A new (dynamic) property has been added to the [Layouter](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_layouter.html "A non-zero padding applies space inside the element layout's width and height. The values can be set ...") class: Cached Layout It specifies if the layout of the node should be performed only once until a invalidation inside the subtree occurs. A cached layout will be only laid out again as soon as the layout of an inner node is marked as invalid. See Layouter::SetCached and Layouter::IsCached.

<p class="callout info">Widgets or Behaviors shall not invalidate the scene containing a laid out node anymore, but the according node! The default value of the new property is \_False\_.</p>

<div class="contents" id="bkmrk-"><div class="contents"><div class="textblock">---

</div></div></div>#### Script Parameter Animation Property Setter

A new animation property setter has been added that can animate a numeric variable defined in a script.

---

# Candera System

#### Property of Type Variant

Support for widget / behavior properties of type [FeatStd::Variant](http://dev.doc.cgistudio.at/APILINK/class_feat_std_1_1_variant.html) has been added. To use datatype serialization of type Variant it is necessary to add the following include statement:

```
#include <Candera/System/Mathematics/MathDataTypes.h>
```

<div class="contents" id="bkmrk-"><div class="contents"><div class="textblock"><div class="fragment">---

</div></div></div></div>

# Candera AssetLoader

#### Property of Type Optional

Support for widget / behavior properties of type [FeatStd::Optional](http://dev.doc.cgistudio.at/APILINK/class_feat_std_1_1_optional.html "The template class Optional is a wrapper for representing optional objects that may not have been ini...") has been added. To use datatype serialization of type Optional it is necessary to add the following include statement:

```
#include <CanderaAssetLoader/AssetLoaderBase/OptionalDataType.h>
```

<div class="contents" id="bkmrk-"><div class="contents"><div class="textblock"><div class="fragment">---

</div></div></div></div>

# Textengine

#### Support of Monotype's font engine: iType

[Candera](http://dev.doc.cgistudio.at/APILINK/namespace_candera.html "[DataBinding_RefTypeSample]") supports the font engine 'iType' of 'Monotype' now. In this release a basic integration of iType was done. With the provided iType integration two different shaper are supported: Complex Script and NoShaper. Monotypes own shaper will be part of next releases.

The current integration of Monotype uses its default settings. Textrendering supports several glyph cache/render types: [Bitmap](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_bitmap.html "A 2-dimensional bitmap that can be used as a texture, background or sprite. A bitmap pointing to a va..."), Surface, Glyph, GlyphCache and GlyphAtlas. Two of these types are supported by iType now. These are [Bitmap](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_bitmap.html "A 2-dimensional bitmap that can be used as a texture, background or sprite. A bitmap pointing to a va...") and GlyphAtlas. The others may work but with cache functionality limitations. Therefore, it is not recommended to use one of the other caches. In general: best performances are reached when GlyphAtlas (GPU solution) or [Bitmap](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_bitmap.html "A 2-dimensional bitmap that can be used as a texture, background or sprite. A bitmap pointing to a va...") (CPU solution) is being used.

Due to different algorithms to interpret font data, it is expected to see small differences when comparing monotype and freetype content. E.g.:

<div class="contents" id="bkmrk-gray-values-%28transit"><div class="contents"><div class="textblock">- Gray values (transition between glyph and background) differ in its intensity.
- Applied glyph kerning may shift the text by 1 px.

</div></div></div>One of the great benefits of iType is its performance when it comes to rasterization of text. This is already visible in the first integration steps and provides a small forecast to the next steps.

---

# Candera Behaviors

#### Event Handler Behaviors

Classes have been added to support [Event](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_event.html) Handling. The [TriggerBehavior](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_trigger_behavior.html "The TriggerBehavior references a ConditionBehavior and an array of ActionBehavior. ConditionBehavior and ActionBehavior are base classes. Any input event is processed by a TriggerBehavior, which evaluates a condition (ConditionBehavior). If the condition evaluates to true, then the TriggerBehavior invokes one or more ActionBehavior. A filter on event type can be achieved by a specialized ConditionBehaviorclass for such an event.") references a ConditionBehavior and an array of [ActionBehavior](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_action_behavior.html "The Action Behavior is part of the Event Handling with Behaviors pattern. It follows the ECA (Event-C..."). ConditionBehavior and [ActionBehavior](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_action_behavior.html "The Action Behavior is part of the Event Handling with Behaviors pattern. It follows the ECA (Event-C...") are base classes. Any input event is processed by a [TriggerBehavior](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_trigger_behavior.html "The TriggerBehavior references a ConditionBehavior and an array of ActionBehavior. ConditionBehavior and ActionBehavior are base classes. Any input event is processed by a TriggerBehavior, which evaluates a condition (ConditionBehavior). If the condition evaluates to true, then the TriggerBehavior invokes one or more ActionBehavior. A filter on event type can be achieved by a specialized ConditionBehaviorclass for such an event."), which evaluates a condition (ConditionBehavior). If the condition evaluates to true, then the [TriggerBehavior](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_trigger_behavior.html "The TriggerBehavior references a ConditionBehavior and an array of ActionBehavior. ConditionBehavior and ActionBehavior are base classes. Any input event is processed by a TriggerBehavior, which evaluates a condition (ConditionBehavior). If the condition evaluates to true, then the TriggerBehavior invokes one or more ActionBehavior. A filter on event type can be achieved by a specialized ConditionBehaviorclass for such an event.") invokes one or more ActionBehaviors. A filter on event type can be achieved by a specialized ConditionBehavior class for such an event.

<div class="contents" id="bkmrk-value-processing-beh"><div class="contents"><div class="textblock">---

</div></div></div>#### Value Processing Behaviors

The ValueBehavior provides a Variant data type which is bindable. A value change results in a processing of that value by sending a [ProcessValueEvent](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_process_value_event.html "Event gets sent by Source Process Value Behaviors (Value Behavior) when value changed.") to a referenced [ProcessValueBehavior](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_process_value_behavior.html "The ProcessValueBehavior provides a Variant data type which is bindable. A value change results in a ..."). The [ProcessValueBehavior](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_process_value_behavior.html "The ProcessValueBehavior provides a Variant data type which is bindable. A value change results in a ...") base class has been added. Derived classes can be chained to realize a data flow processing from input to an according (visual) output. Example: from a changed "speed" value to a mapped rotation value and further to an animated rotation of a needle node.

---

# Candera Scripting

#### Script Events

This versions adds support for script events. Script events can be sent and received by both [Lua scripts](http://dev.doc.cgistudio.at/APILINK/group___lua_scripting_events.html) and [native code](http://dev.doc.cgistudio.at/APILINK/group___scripting_events.html).

<div class="contents" id="bkmrk-"><div class="contents"><div class="textblock">---

</div></div></div>#### Candera Object References in Scripts

This versions adds support for referencing Candera objects in scripts. These object references are aware about the lifetime of the objects they reference without interfering with them. They can be passed from native code to scripts and vice versa, as well as dereferenced to call object specific methods in Lua.

<div class="contents" id="bkmrk--0"><div class="contents"><div class="textblock">---

</div></div></div>#### Lua Animation Functions

This versions adds support for [animations](http://dev.doc.cgistudio.at/APILINK/group___lua_binding_animation.html) in Lua scripts.

---