xentara-workbench-plugin v1.0.1
The Xentara Workbench Plugin Framework
Loading...
Searching...
No Matches
xentara::workbench::bindings::CollapsibleGroup Class Referencefinal

A group that can be expanded and collapsed by the user. More...

#include <xentara/workbench/bindings/CollapsibleGroup.hpp>

+ Inheritance diagram for xentara::workbench::bindings::CollapsibleGroup:

Classes

struct  Options
 Options for the binding. More...
 

Public Member Functions

 CollapsibleGroup (Options options)
 Constructor for a group that doesn't bind to a property.
 
template<std::convertible_to< ui::String > Property>
 CollapsibleGroup (PropertyController &propertyController, Property &property, Options options)
 Constructor that accesses the variable holding a property’s value directly.
 
 CollapsibleGroup (const PropertyHandle &property, Options options)
 Constructor that uses the state of a property to display an error in the header.
 
template<typename Object , Getter< ui::String, Object > GetterType>
 CollapsibleGroup (const PropertyHandle &property, const Object &object, GetterType get, Options options)
 Constructor that uses a getter to access a property.
 

Detailed Description

A group that can be expanded and collapsed by the user.

Collapsible groups can bind to a property that contains a summary text for the group’s content. The property can also provide a summary state, allowing you to display an additional error in the group header.

Constructor & Destructor Documentation

◆ CollapsibleGroup() [1/4]

xentara::workbench::bindings::CollapsibleGroup::CollapsibleGroup ( Options  options)

Constructor for a group that doesn't bind to a property.

Parameters
optionsThe binding options

◆ CollapsibleGroup() [2/4]

template<std::convertible_to< ui::String > Property>
xentara::workbench::bindings::CollapsibleGroup::CollapsibleGroup ( PropertyController propertyController,
Property &  property,
Options  options 
)

Constructor that accesses the variable holding a property’s value directly.

This constructor binds to a property, and displays the property’s value in the header as a summary state. In addition, the property’s state can be used to show an additional error in the header.

The property’s visibility is used to control the visibility of the summary text only. The visibility of the actual Group is controlled by the visibility of the group’s members.

Note
Since the visibility of the group is controlled by the visibility of its members, it is improtant that the summary property not have an error state if all the properties are invisible. Otherwise, the group will be hidden, and the user will see the summary error .
Attention
This constructor can only be used for address-based properties.
Parameters
propertyControllerThe property controller that manages the property
propertyA reference to the variable holding the property’s value.
optionsThe binding options

◆ CollapsibleGroup() [3/4]

xentara::workbench::bindings::CollapsibleGroup::CollapsibleGroup ( const PropertyHandle property,
Options  options 
)

Constructor that uses the state of a property to display an error in the header.

This constructor binds to the state of a property, and displays any errors in the group’s header. The value and visibility state of the property are ignored.

Note
Since the visibility of the group is controlled by the visibility of its members, it is improtant that the summary property not have an error state if all the properties are invisible. Otherwise, the group will be hidden, and the user will see the summary error .
Parameters
propertyA handle to the bound property.
optionsThe binding options

◆ CollapsibleGroup() [4/4]

template<typename Object , Getter< ui::String, Object > GetterType>
xentara::workbench::bindings::CollapsibleGroup::CollapsibleGroup ( const PropertyHandle property,
const Object &  object,
GetterType  get,
Options  options 
)

Constructor that uses a getter to access a property.

This constructor binds to a property, and displays the property’s value in the header as a summary state. In addition, the property’s state can be used to show an additional error in the header.

The property’s visibility is used to control the visibility of the summary text only. The visibility of the actual Group is controlled by the visibility of the group’s members.

Note
Since the visibility of the group is controlled by the visibility of its members, it is improtant that the summary property not have an error state if all the properties are invisible. Otherwise, the group will be hidden, and the user will see the summary error .
Parameters
propertyA handle to the bound property
objectThe object on which the getter should be called
getThe getter function
optionsThe binding options