Skip to main content

Core

Description

Here, provide an explanation of the purpose of Core Control (compared to standard controls).

For example:

  • What kind of use cases are envisioned?
  • Differences from standard controls, as well as Core Control advantages and disadvantages.

If a page is created for extended usage of Core Control, a link to that page will be added. (Workitem CGI1-76201 - Doc: Core Controls Advanced usage)

Explanation

After this, will list the Core Controls implemented in CGI3.15.1.

ApproachText A:Value

Each listed item will link to the standard control explanation page. On that page, only the property items applicable to Core Control will be explicitly indicated.

e.g 

The text below is linked to the standard control “TextValue”. In addition, the standard control “TextValue” explanation page clearly indicates the property items that are shared with Core.

    TextValue 

    Approach B:

    Alternatively, a dedicated table can be created for each Control. The following is an example.

    Text Value

    Uses a Value and a Text as format string. Result is the formatted string. See C++ printf() function. The value can be set directly or by an event. Event input can be provided by e.g. the Send Value as Event Behavior or the Forward Value Behavior.

    Properties

    Property Name
    Type
    Description
    Value Variant The value to be formatted
    Format Text
    String
    The format string which includes one format specifier (beginning with %). See C printf() function.
    Style
    Candera::TextRendering::Style The Style that will be used.
    Text Color
    Candera::Color The color which can be used from other Behaviors.


    RadioButton

    The RadioButton Control can easily be configured with a text, images for a normal and a pressed state as well as for a selected and a selected pressed state. Additionally a focused image can be defined. The action that is performed when the value changed can easily be defined in the EventHandler Tab.

    The functionality of the RadioButton is similar to the CheckBox (when reacting on a value change). A corresponding sample configuration of the Event Handler is given in the CheckBox section.

    Properties

    Property Name
    Type
    Description
    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.
    Text
    String
    Text of the RadioButton.
    TextStyle
    Candera::TextRendering::Style The Style that will be set to the Text Node.
    Normal Image
    Candera::Image2D The image which is used as RadioButton Image if the normal state applies.
    Selected Image
    Candera::Image2D The image which is used as RadioButton Image if the selected state applies.
    Normal Disabled Image
    Candera::Image2D

    The image to set on the effect.

    Selected Disabled Image
    Candera::Image2D The image to set on the effect.
    Text Enabled Color Candera::Image2D The Color to set.
    Text Disabled Color Candera::Image2D The Color to set.
    Selected
    bool/Variant
    Specifies the type and the value to pass onto Process Value Behavior.

    ToggleButton

    The ToggleButton Control offers an easy way to define all different states of a toggle button and an action that is performed when clicking it. It is typically used for activating and deactivating a persisting functionality. As for the simple Button Control the visual appearance of the ToggleButton can also be configured with four images depending on the button's state and a hovered color that can be defined including an alpha value. Additionally the ToggleButton offers two predefined TextNode that can be modified via the First Text and the Second Text properties. The action that is performed when pressing the ToggleButton can easily be defined in the EventHandler Tab. The functionality of the ToggleButton is similar to the Button (when reacting on mouse clicks) or to the CheckBox (when reacting on a value change). Corresponding sample configuration of the Event Handler are given in the Button section and in the CheckBox section.

    Properties

    Property Name
    Type
    Description
    Enabled
    bool
    If set to false it will not react on focus events an
    Value
    bool/Variant
    Toggled or not (true/false).
    First Text
    String
    The Text that will be set with the first toggle image.
    Second Text
    String
    The Text that will be set with the second toggle image.
    First Image
    Candera::Image2D The image which is used as ToggleButton Image if the first state applies.
    Second Image
    Candera::Image2D The image which is used as ToggleButton Image if the second toggle state applies.
    First Disabled Image
    Candera::Image2D The image which is used as ToggleButton Image if the first toggle image is pressed.
    Second Disabled Image
    Candera::Image2D The image which is used as ToggleButton Image if the second toggle image is pressed.
    Text Enabled Color Candera::Image2D The Color to set.
    Text Disabled Color Candera::Image2D The Color to set.

    CheckBox

    The CheckBox Control can easily be configured with a text, images for a normal and a pressed state as well as for a selected and a selected pressed state. Additionally a focused image can be defined. The action that is performed when the value changed can easily be defined in the EventHandler Tab

    Properties

    Property Name
    Type
    Description
    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.
    Value
    bool/Variant
    Selected or not (true/false).
    Text
    String
    Text of the CheckBox.
    Text Style
    Candera::TextRendering::Style The Style that will be set to the Text Node.
    Normal Image
    Candera::Image2D The image which is used as CheckBox Image if the normal state applies.
    Selected Image
    Candera::Image2D The image which is used as CheckBox Image if the selected state applies.
    Normal Disabled Image
    Candera::Image2D

    The image to set on the effect.

    Selected Disabled Image
    Candera::Image2D The image to set on the effect.
    Text Enabled Color Candera::Image2D The Color to set.
    Text Disabled Color Candera::Image2D The Color to set.