Kanzi  3.9.4
Kanzi Engine API
kanzi::ListBoxItemContainerImpl< TBaseClass, TDerivedClass, TItemLayoutClass > Class Template Reference

Implementation of base List Box Item Container class for List Box. More...

#include <kanzi/ui/node/list_box_item_container.hpp>

Inheritance diagram for kanzi::ListBoxItemContainerImpl< TBaseClass, TDerivedClass, TItemLayoutClass >:
[legend]

Public Types

using ItemBaseType = typename conditional< is_base_of< Node2D, TBaseClass >::value, Node2D, Node3D >::type
 
using ItemBaseTypeSharedPtr = shared_ptr< ItemBaseType >
 
using ItemLayoutSharedPtr = shared_ptr< TItemLayoutClass >
 

Public Member Functions

void attachItem (ItemBaseTypeSharedPtr item)
 Attaches a List Box item to the List Box Item Container. More...
 
void detachItem ()
 Detaches current List Box item from the List Box Item Container. More...
 
auto getItem () const
 Returns the List Box item that is attached to the List Box Item Container. More...
 
optional< size_t > getItemIndex () const
 Returns the index of the item held by the List Box Item Container. More...
 
optional< size_t > getPresenterIndex () const
 Returns a List Box Presenter item index. More...
 
bool isSelected () const
 Returns the value of SelectedProperty. More...
 
void setPresenterIndex (optional< size_t > itemIndex)
 Sets the List Box Presenter item index. More...
 
void setSelected (bool value)
 Sets the value of SelectedProperty. More...
 
- Public Member Functions inherited from kanzi::ClickConceptImpl< TBaseClass, TDerivedClass >
bool isDoubleClickEnabled () const
 Gets the value of DoubleClickEnabledProperty. More...
 
void setDoubleClickEnabled (bool value)
 Sets the value of DoubleClickEnabledProperty. More...
 

Protected Member Functions

void initialize ()
 
 ListBoxItemContainerImpl (Domain *domain, string_view name)
 
- Protected Member Functions inherited from kanzi::ClickConceptImpl< TBaseClass, TDerivedClass >
 ClickConceptImpl (Domain *domain, string_view name)
 Constructor. More...
 
void configureDoubleClick ()
 Configures a MultiClickManipulator for an ClickConcept-derived class based on the value of the DoubleClickEnabledProperty: More...
 
void onAttached () override
 Overrides TBaseClass::onAttached(). More...
 
void onClicked (ClickManipulator::ClickMessageArguments &messageArguments)
 Handles click event. More...
 
void onDetached () override
 Overrides TBaseClass::onDetached(). More...
 
void onMultiClicked (MultiClickManipulator::MultiClickMessageArguments &messageArguments)
 Handles multi-click event. More...
 
void onNodePropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) override
 Overrides TBaseClass::onNodePropertyChanged(). More...
 

Static Protected Member Functions

static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 

Protected Attributes

ItemBaseTypeSharedPtr m_item
 
- Protected Attributes inherited from kanzi::ClickConcept
ClickManipulatorSharedPtr m_clickManipulator
 The ClickManipulator. More...
 
MultiClickManipulatorSharedPtr m_multiClickManipulator
 Multi-Click manipulator. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from kanzi::ClickConceptImpl< TBaseClass, TDerivedClass >
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Public Member Functions inherited from kanzi::ClickConcept
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Public Member Functions inherited from kanzi::ListBoxItemContainer
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Public Attributes inherited from kanzi::ClickConcept
static PropertyType< bool > DoubleClickEnabledProperty
 Enables the double-click gesture for a node. More...
 
- Static Public Attributes inherited from kanzi::ListBoxItemContainer
static PropertyType< int > ItemIndexProperty
 Reports the index of the item held by the List Box Item Container. More...
 
static PropertyType< bool > SelectedProperty
 Indicates whether a List Box item held by this List Box Item Container is selected. More...
 

Detailed Description

template<typename TBaseClass, typename TDerivedClass, typename TItemLayoutClass>
class kanzi::ListBoxItemContainerImpl< TBaseClass, TDerivedClass, TItemLayoutClass >

Implementation of base List Box Item Container class for List Box.

Template Parameters
TItemLayoutClassType of the layout node that you use together with the "$layout" alias to set the placement of the List Box item inside the List Box Item Container prefab.

Member Typedef Documentation

◆ ItemBaseType

template<typename TBaseClass, typename TDerivedClass, typename TItemLayoutClass>
using kanzi::ListBoxItemContainerImpl< TBaseClass, TDerivedClass, TItemLayoutClass >::ItemBaseType = typename conditional<is_base_of<Node2D, TBaseClass>::value, Node2D, Node3D>::type

◆ ItemBaseTypeSharedPtr

template<typename TBaseClass, typename TDerivedClass, typename TItemLayoutClass>
using kanzi::ListBoxItemContainerImpl< TBaseClass, TDerivedClass, TItemLayoutClass >::ItemBaseTypeSharedPtr = shared_ptr<ItemBaseType>

◆ ItemLayoutSharedPtr

template<typename TBaseClass, typename TDerivedClass, typename TItemLayoutClass>
using kanzi::ListBoxItemContainerImpl< TBaseClass, TDerivedClass, TItemLayoutClass >::ItemLayoutSharedPtr = shared_ptr<TItemLayoutClass>

Constructor & Destructor Documentation

◆ ListBoxItemContainerImpl()

template<typename TBaseClass, typename TDerivedClass, typename TItemLayoutClass>
kanzi::ListBoxItemContainerImpl< TBaseClass, TDerivedClass, TItemLayoutClass >::ListBoxItemContainerImpl ( Domain domain,
string_view  name 
)
inlineexplicitprotected

Member Function Documentation

◆ getItemIndex()

template<typename TBaseClass, typename TDerivedClass, typename TItemLayoutClass>
optional<size_t> kanzi::ListBoxItemContainerImpl< TBaseClass, TDerivedClass, TItemLayoutClass >::getItemIndex ( ) const
inline

Returns the index of the item held by the List Box Item Container.

Returns
Returns the index of the item held by the List Box Item Container. If the List Box Item Container is not attached to the layout, returns nullopt.

◆ isSelected()

template<typename TBaseClass, typename TDerivedClass, typename TItemLayoutClass>
bool kanzi::ListBoxItemContainerImpl< TBaseClass, TDerivedClass, TItemLayoutClass >::isSelected ( ) const
inline

Returns the value of SelectedProperty.

Returns
True if a List Box item is selected.
See also
setSelected()

◆ setSelected()

template<typename TBaseClass, typename TDerivedClass, typename TItemLayoutClass>
void kanzi::ListBoxItemContainerImpl< TBaseClass, TDerivedClass, TItemLayoutClass >::setSelected ( bool  value)
inline

Sets the value of SelectedProperty.

Parameters
valueTrue if a List Box item is selected.
See also
isSelected()

◆ getPresenterIndex()

template<typename TBaseClass, typename TDerivedClass, typename TItemLayoutClass>
optional<size_t> kanzi::ListBoxItemContainerImpl< TBaseClass, TDerivedClass, TItemLayoutClass >::getPresenterIndex ( ) const
inline

Returns a List Box Presenter item index.

Returns
Returns a List Box Presenter item index of the List Box Item Container.

◆ setPresenterIndex()

template<typename TBaseClass, typename TDerivedClass, typename TItemLayoutClass>
void kanzi::ListBoxItemContainerImpl< TBaseClass, TDerivedClass, TItemLayoutClass >::setPresenterIndex ( optional< size_t >  itemIndex)
inline

Sets the List Box Presenter item index.

Parameters
itemIndexPresenter item index to set for the List Box Item Container.

◆ attachItem()

template<typename TBaseClass, typename TDerivedClass, typename TItemLayoutClass>
void kanzi::ListBoxItemContainerImpl< TBaseClass, TDerivedClass, TItemLayoutClass >::attachItem ( ItemBaseTypeSharedPtr  item)
inline

Attaches a List Box item to the List Box Item Container.

If the "$layout" alias is specified and it points to a Content Layout node, List Box Item Container adds the List Box item in that Content Layout node. Otherwise, List Box Item Container adds the List Box item as the last child of the List Box Item Container node.

Parameters
itemList Box item that is attached to the List Box Item Container.
Since
Kanzi 3.9.0

◆ detachItem()

template<typename TBaseClass, typename TDerivedClass, typename TItemLayoutClass>
void kanzi::ListBoxItemContainerImpl< TBaseClass, TDerivedClass, TItemLayoutClass >::detachItem ( )
inline

Detaches current List Box item from the List Box Item Container.

Since
Kanzi 3.9.0

◆ getItem()

template<typename TBaseClass, typename TDerivedClass, typename TItemLayoutClass>
auto kanzi::ListBoxItemContainerImpl< TBaseClass, TDerivedClass, TItemLayoutClass >::getItem ( ) const
inline

Returns the List Box item that is attached to the List Box Item Container.

Returns
List Box item that is attached to the List Box Item Container.
Since
Kanzi 3.9.0

◆ initialize()

template<typename TBaseClass, typename TDerivedClass, typename TItemLayoutClass>
void kanzi::ListBoxItemContainerImpl< TBaseClass, TDerivedClass, TItemLayoutClass >::initialize ( )
inlineprotected

◆ makeEditorInfo()

template<typename TBaseClass, typename TDerivedClass, typename TItemLayoutClass>
static PropertyTypeEditorInfoSharedPtr kanzi::ListBoxItemContainerImpl< TBaseClass, TDerivedClass, TItemLayoutClass >::makeEditorInfo ( )
inlinestaticprotected

Member Data Documentation

◆ m_item

template<typename TBaseClass, typename TDerivedClass, typename TItemLayoutClass>
ItemBaseTypeSharedPtr kanzi::ListBoxItemContainerImpl< TBaseClass, TDerivedClass, TItemLayoutClass >::m_item
protected

The documentation for this class was generated from the following file: