Kanzi Framework  3.9.0
Kanzi Engine API
kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits > Class Template Reference

ListBoxConceptImpl provides common base implementation for different List Boxes. More...

#include <kanzi/ui/node/concept/list_box.hpp>

Inheritance diagram for kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >:
[legend]

Public Types

typedef shared_ptr< DefaultListBoxItemGenerator< ItemGeneratorClass > > DefaultItemGeneratorSharedPtr
 
typedef ListBoxTraits::TItemClass ItemClass
 
typedef ListBoxTraits::TItemContainerClass ItemContainerClass
 
typedef ListBoxTraits::TItemContainerGeneratorClass ItemContainerGeneratorClass
 
typedef shared_ptr< ItemContainerGeneratorClassItemContainerGeneratorSharedPtr
 
typedef shared_ptr< ItemContainerClassItemContainerSharedPtr
 
typedef ListBoxTraits::TItemGeneratorClass ItemGeneratorClass
 
typedef shared_ptr< ItemGeneratorClassItemGeneratorSharedPtr
 
typedef shared_ptr< ItemClassItemSharedPtr
 
typedef TBaseClass::LayoutVectorType LayoutVectorType
 
typedef ListBoxTraits::TPresenterClass PresenterClass
 
typedef shared_ptr< PresenterClassPresenterSharedPtr
 
- Public Types inherited from kanzi::ListBoxConcept
enum  SelectionBehavior { SelectionBehaviorNone, SelectionBehaviorBringToCenter }
 Behaviors for the List Box when an item in the List Box is selected. More...
 

Public Member Functions

bool addContentItem (NodeSharedPtr abstractItem) override
 
void addItem (ItemSharedPtr item)
 Adds an item at the end of a list box when using the default object generator. More...
 
void arrangeOverride (LayoutVectorType actualSize) override
 
void bringItemCenter (size_t itemIndex, bool smooth)
 Requests the List Box to bring the item in the passed itemIndex to the center of the list box area. More...
 
optional< pair< size_t, size_t > > getAliveRange ()
 Returns the range of items being alive in the buffer (based on the KeepItemsAlive property). More...
 
NodeSharedPtr getContentItem (size_t index) override
 
size_t getContentItemCount () override
 
ItemSharedPtr getItem (size_t index)
 Gets the item at the given index in a list box. More...
 
string getItemContainerGeneratorTypeName () const
 Gets the value of ItemContainerGeneratorTypeNameProperty. More...
 
PrefabTemplateSharedPtr getItemContainerTemplate () const
 Gets the value of ItemContainerTemplateProperty. More...
 
size_t getItemCount () const
 Returns the value of the ItemCountProperty. More...
 
string getItemGeneratorTypeName () const
 Gets the value of ItemGeneratorTypeNameProperty. More...
 
optional< size_t > getItemIndex (ItemSharedPtr item)
 Returns index of the given item. If the item does not exist currently, returns empty. More...
 
LayoutVectorType getItemSize (size_t index)
 Returns size of the item at the given index or unbounded layout value if size could not be determined without acquiring the item first. More...
 
PrefabTemplateSharedPtr getItemTemplate () const
 Gets the value of ItemTemplateProperty. More...
 
int getKeepAliveItemCount () const
 Gets the value of KeepAliveItemCountProperty. More...
 
PresenterSharedPtr getPresenter () const
 
int getSelectedItemIndex () const
 Gets the value of SelectedItemIndexProperty. More...
 
SelectionBehavior getSelectionBehavior () const
 Gets the value of SelectionBehavior. More...
 
void insertItem (size_t index, ItemSharedPtr item)
 Inserts an item at the given index in a list box when using the default object generator. More...
 
bool isEmpty ()
 Returns true if the list box has no items. More...
 
LayoutVectorType measureOverride (LayoutVectorType availableSize) override
 
void notifyItemAdded (size_t index) override
 Virtual functions for notifying item changes to list. More...
 
void notifyItemContainerChanged ()
 
void notifyItemCountChanged () override
 
void notifyItemRemoved (size_t index) override
 
void notifyItemReplaced (size_t index) override
 
void removeAllContentItems () override
 
void removeAllItems ()
 Removes all items from a list box when using the default object generator. More...
 
bool removeContentItem (NodeSharedPtr abstractItem) override
 
void removeItem (size_t index)
 Removes the item at the given index from a list box when using the default object generator. More...
 
void removeLastItem ()
 Removes the last item from a list box when using the default object generator. More...
 
void replaceItem (size_t index, ItemSharedPtr item)
 Replaces the item at the given index from a list box when using the default object generator. More...
 
void selectItem (optional< size_t > itemIndex)
 Requests the list box to select the item in the given index. More...
 
void setItemContainerGenerator (ItemContainerGeneratorSharedPtr itemContainerGenerator)
 Sets the list box item container generator. More...
 
void setItemContainerGeneratorTypeName (string_view value)
 Sets the value of ItemContainerGeneratorTypeNameProperty. More...
 
void setItemContainerTemplate (PrefabTemplateSharedPtr value)
 Sets the value of ItemContainerTemplateProperty. More...
 
void setItemGenerator (ItemGeneratorSharedPtr itemGenerator)
 Sets the list box item generator. More...
 
void setItemGeneratorTypeName (string_view value)
 Sets the value of ItemGeneratorTypeNameProperty. More...
 
void setItemTemplate (PrefabTemplateSharedPtr value)
 Sets the value of ItemTemplateProperty. More...
 
void setKeepAliveItemCount (int value)
 Sets the value of KeepAliveItemCountProperty. More...
 
void setSelectedItemIndex (int value)
 Sets the value of SelectedItemIndexProperty. More...
 
void setSelectionBehavior (SelectionBehavior value)
 Sets the value of SelectionBehavior. More...
 
void updateVisibleRange (size_t beginIndex, size_t itemCount)
 Requests items from the item generator. More...
 
void updateVisibleRange (size_t beginIndex, size_t itemCount, bool sendMessages)
 
void updateVisibleRangeQuiet (size_t beginIndex, size_t itemCount)
 Requests items from the item generator. More...
 
- Public Member Functions inherited from kanzi::ContentItemCollectionModel
virtual ~ContentItemCollectionModel ()
 

Static Public Member Functions

static Vector2 doMeasure (Node2D &node)
 
static Vector3 doMeasure (Node3D &node)
 
- Static Public Member Functions inherited from kanzi::ListBoxConcept
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 

Protected Member Functions

void applySelectionBehavior (size_t itemIndex, bool smooth)
 Applies selection behavior to specified item. More...
 
void assignItemContainerGenerator (ItemContainerGeneratorSharedPtr itemContainerGenerator)
 Assigns list box item container generator to list box. More...
 
void assignItemGenerator (ItemGeneratorSharedPtr itemGenerator)
 Assigns list box item generator to list box. More...
 
void initialize (PresenterSharedPtr presenter)
 
 ListBoxConceptImpl (Domain *domain, string_view name)
 
void onAttached () override
 Node::onAttached() implementation. More...
 
void onClicked (ClickManipulator::ClickMessageArguments &messageArguments)
 Handles ClickManipulator::ClickMessage. More...
 
void onDetached () override
 Node::onDetached() implementation. More...
 
void onNodePropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) override
 Node::onNodePropertyChanged() implementation. More...
 
void setItemContainerGeneratorByProperty ()
 Creates and assigns item container generator by ItemGeneratorTypeName property value. More...
 
void setItemGeneratorByProperty ()
 Creates and assigns item generator by ItemGeneratorTypeName property value. More...
 
void synchronizeItemCountProperty ()
 Updates the ItemCountProperty. More...
 
void synchronizeSelectedItemIndexProperty ()
 Updates SelectedItemIndex property after selected item index changes internally by list box. More...
 
void updateGenerators (ItemGeneratorSharedPtr itemGenerator, ItemContainerGeneratorSharedPtr itemContainerGenerator)
 Replaces item and item container generators with new objects. Updates items and layout accordingly. More...
 
 ~ListBoxConceptImpl () override
 

Static Protected Member Functions

static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 

Additional Inherited Members

- Static Public Attributes inherited from kanzi::ListBoxConcept
static MessageType< ItemHiddenMessageArgumentsItemHiddenMessage
 List Box node dispatches this message whenever the List Box hides one of its items. More...
 
static MessageType< ItemSelectedMessageArgumentsItemSelectedMessage
 List Box node dispatches this message whenever an item in the List Box is selected. More...
 
static MessageType< ItemVisibleMessageArgumentsItemVisibleMessage
 List Box node dispatches this message whenever the List Box brings one of its items visible. More...
 
static PropertyType< int > ItemCountProperty
 Reports the number of items in the List Box, including virtual items. More...
 
static PropertyType< int > KeepAliveItemCountProperty
 KeepAliveItemCount property. More...
 
static PropertyType< ListBoxConcept::SelectionBehaviorSelectionBehaviorProperty
 SelectionBehavior property. More...
 
static PropertyType< string > ItemGeneratorTypeNameProperty
 ItemGeneratorTypeName property. More...
 
static PropertyType< string > ItemContainerGeneratorTypeNameProperty
 ItemContainerGeneratorTypeName property. More...
 
static PropertyType< ResourceSharedPtrItemTemplateProperty
 ItemTemplate property. More...
 
static PropertyType< ResourceSharedPtrItemContainerTemplateProperty
 ItemContainerTemplate property. More...
 
static PropertyType< int > SelectedItemIndexProperty
 SelectedItemIndex property. More...
 

Detailed Description

template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
class kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >

ListBoxConceptImpl provides common base implementation for different List Boxes.

List box is a layout node that contain other nodes as items. The list box provides an invisible hit testable area that listens to input and reacts when the user pans the area. The List Box then moves the items so that new items become visible and old items disappear. How this actually happens depends on the specific List Boxes.

To disable a List Box node, set the Node::EnabledProperty to false. A disabled List Box does not respond to input. To visually indicate the disabled state of a List Box node, create a state manager and use the Node::EffectivelyEnabledProperty as its controller property. When Kanzi disables a List Box node, it cancels the ongoing gestures and preserves the scroll position of that List Box node.

The list box gets its items from an item generator. By default the list box uses the DefaultListBoxItemGenerator that simply stores the items that have been added to it. It is possible to create dynamic content for the list box by replacing the item generator with a custom implementation.

The list box wraps its items in container nodes that are created by an item container generator. The default item generator creates invisible nodes that don't do anything.

Member Typedef Documentation

◆ ItemClass

template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef ListBoxTraits::TItemClass kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::ItemClass

◆ ItemContainerClass

template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef ListBoxTraits::TItemContainerClass kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::ItemContainerClass

◆ PresenterClass

template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef ListBoxTraits::TPresenterClass kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::PresenterClass

◆ ItemGeneratorClass

template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef ListBoxTraits::TItemGeneratorClass kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::ItemGeneratorClass

◆ ItemContainerGeneratorClass

template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef ListBoxTraits::TItemContainerGeneratorClass kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::ItemContainerGeneratorClass

◆ LayoutVectorType

template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef TBaseClass::LayoutVectorType kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::LayoutVectorType

◆ ItemSharedPtr

template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef shared_ptr<ItemClass> kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::ItemSharedPtr

◆ ItemContainerSharedPtr

template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef shared_ptr<ItemContainerClass> kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::ItemContainerSharedPtr

◆ DefaultItemGeneratorSharedPtr

template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef shared_ptr<DefaultListBoxItemGenerator<ItemGeneratorClass> > kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::DefaultItemGeneratorSharedPtr

◆ ItemGeneratorSharedPtr

template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef shared_ptr<ItemGeneratorClass> kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::ItemGeneratorSharedPtr

◆ ItemContainerGeneratorSharedPtr

template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef shared_ptr<ItemContainerGeneratorClass> kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::ItemContainerGeneratorSharedPtr

◆ PresenterSharedPtr

template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef shared_ptr<PresenterClass> kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::PresenterSharedPtr

Constructor & Destructor Documentation

◆ ListBoxConceptImpl()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::ListBoxConceptImpl ( Domain domain,
string_view  name 
)
explicitprotected

◆ ~ListBoxConceptImpl()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::~ListBoxConceptImpl ( )
overrideprotected

Member Function Documentation

◆ addContentItem()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
bool kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::addContentItem ( NodeSharedPtr  abstractItem)
overridevirtual

◆ removeContentItem()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
bool kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::removeContentItem ( NodeSharedPtr  abstractItem)
overridevirtual

◆ removeAllContentItems()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::removeAllContentItems ( )
overridevirtual

◆ getContentItemCount()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
size_t kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::getContentItemCount ( )
overridevirtual

◆ getContentItem()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
NodeSharedPtr kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::getContentItem ( size_t  index)
overridevirtual

◆ getPresenter()

template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
PresenterSharedPtr kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::getPresenter ( ) const
inline

◆ getAliveRange()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
optional< pair< size_t, size_t > > kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::getAliveRange ( )

Returns the range of items being alive in the buffer (based on the KeepItemsAlive property).

Returned pair contains the index of the first and the item count. If the virtual range does not exist, returns empty.

◆ isEmpty()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
bool kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::isEmpty ( )

Returns true if the list box has no items.

◆ getItemSize()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::LayoutVectorType kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::getItemSize ( size_t  index)

Returns size of the item at the given index or unbounded layout value if size could not be determined without acquiring the item first.

◆ getItemIndex()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
optional< size_t > kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::getItemIndex ( ItemSharedPtr  item)

Returns index of the given item. If the item does not exist currently, returns empty.

◆ getItem()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::ItemSharedPtr kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::getItem ( size_t  index)

Gets the item at the given index in a list box.

◆ insertItem()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::insertItem ( size_t  index,
ItemSharedPtr  item 
)

Inserts an item at the given index in a list box when using the default object generator.

◆ removeItem()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::removeItem ( size_t  index)

Removes the item at the given index from a list box when using the default object generator.

◆ replaceItem()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::replaceItem ( size_t  index,
ItemSharedPtr  item 
)

Replaces the item at the given index from a list box when using the default object generator.

◆ addItem()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::addItem ( ItemSharedPtr  item)

Adds an item at the end of a list box when using the default object generator.

◆ removeLastItem()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::removeLastItem ( )

Removes the last item from a list box when using the default object generator.

◆ removeAllItems()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::removeAllItems ( )

Removes all items from a list box when using the default object generator.

◆ selectItem()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::selectItem ( optional< size_t >  itemIndex)

Requests the list box to select the item in the given index.

Parameters
itemIndexThe index of the selected item. Set to empty to clear the selection.

◆ notifyItemAdded()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::notifyItemAdded ( size_t  index)
overridevirtual

Virtual functions for notifying item changes to list.

Implements kanzi::ListBoxConcept.

◆ notifyItemRemoved()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::notifyItemRemoved ( size_t  index)
overridevirtual

Implements kanzi::ListBoxConcept.

◆ notifyItemReplaced()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::notifyItemReplaced ( size_t  index)
overridevirtual

Implements kanzi::ListBoxConcept.

◆ notifyItemCountChanged()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::notifyItemCountChanged ( )
overridevirtual

Implements kanzi::ListBoxConcept.

◆ notifyItemContainerChanged()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::notifyItemContainerChanged ( )

◆ doMeasure() [1/2]

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
Vector2 kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::doMeasure ( Node2D node)
static

◆ doMeasure() [2/2]

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
Vector3 kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::doMeasure ( Node3D node)
static

◆ measureOverride()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::LayoutVectorType kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::measureOverride ( LayoutVectorType  availableSize)
override

◆ arrangeOverride()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::arrangeOverride ( LayoutVectorType  actualSize)
override

◆ updateVisibleRangeQuiet()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::updateVisibleRangeQuiet ( size_t  beginIndex,
size_t  itemCount 
)

Requests items from the item generator.

Called by the presenter when new items are displayed or old items hidden.

◆ updateVisibleRange() [1/2]

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::updateVisibleRange ( size_t  beginIndex,
size_t  itemCount 
)

Requests items from the item generator.

Called by the presenter when new items are displayed or old items hidden. Sends messages about hidden and revealed items.

◆ updateVisibleRange() [2/2]

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::updateVisibleRange ( size_t  beginIndex,
size_t  itemCount,
bool  sendMessages 
)

◆ bringItemCenter()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::bringItemCenter ( size_t  itemIndex,
bool  smooth 
)

Requests the List Box to bring the item in the passed itemIndex to the center of the list box area.

Parameters
itemIndexThe index of the focused item.
smoothTo animate the movement of the target item to the center of the list box area, set to true. To move the target item to the center of the list box area immediately, set to false.

◆ getItemCount()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
size_t kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::getItemCount ( ) const

Returns the value of the ItemCountProperty.

Returns
The number of items in the List Box, including virtual items.

◆ getKeepAliveItemCount()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
int kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::getKeepAliveItemCount ( ) const

◆ setKeepAliveItemCount()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::setKeepAliveItemCount ( int  value)

◆ getSelectedItemIndex()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
int kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::getSelectedItemIndex ( ) const

◆ setSelectedItemIndex()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::setSelectedItemIndex ( int  value)

◆ getSelectionBehavior()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
ListBoxConcept::SelectionBehavior kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::getSelectionBehavior ( ) const

Gets the value of SelectionBehavior.

See also
setSelectionBehavior()

◆ setSelectionBehavior()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::setSelectionBehavior ( SelectionBehavior  value)

Sets the value of SelectionBehavior.

See also
getSelectionBehavior()

◆ getItemGeneratorTypeName()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
string kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::getItemGeneratorTypeName ( ) const

Gets the value of ItemGeneratorTypeNameProperty.

See also
getObjectGeneratorTypeName()

◆ setItemGeneratorTypeName()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::setItemGeneratorTypeName ( string_view  value)

Sets the value of ItemGeneratorTypeNameProperty.

See also
setObjectGeneratorTypeName()

◆ getItemContainerGeneratorTypeName()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
string kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::getItemContainerGeneratorTypeName ( ) const

◆ setItemContainerGeneratorTypeName()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::setItemContainerGeneratorTypeName ( string_view  value)

◆ getItemTemplate()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
PrefabTemplateSharedPtr kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::getItemTemplate ( ) const

Gets the value of ItemTemplateProperty.

See also
getItemTemplate()

◆ setItemTemplate()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::setItemTemplate ( PrefabTemplateSharedPtr  value)

Sets the value of ItemTemplateProperty.

See also
setItemTemplate()

◆ getItemContainerTemplate()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
PrefabTemplateSharedPtr kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::getItemContainerTemplate ( ) const

◆ setItemContainerTemplate()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::setItemContainerTemplate ( PrefabTemplateSharedPtr  value)

◆ setItemGenerator()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::setItemGenerator ( ItemGeneratorSharedPtr  itemGenerator)

Sets the list box item generator.

Parameters
itemGeneratorNew item generator.

◆ setItemContainerGenerator()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::setItemContainerGenerator ( ItemContainerGeneratorSharedPtr  itemContainerGenerator)

Sets the list box item container generator.

Parameters
itemContainerGeneratorNew item container generator.

◆ initialize()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::initialize ( PresenterSharedPtr  presenter)
protected

◆ onClicked()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::onClicked ( ClickManipulator::ClickMessageArguments messageArguments)
protected

◆ onAttached()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::onAttached ( )
overrideprotected

Node::onAttached() implementation.

◆ onDetached()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::onDetached ( )
overrideprotected

Node::onDetached() implementation.

◆ onNodePropertyChanged()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::onNodePropertyChanged ( AbstractPropertyType  propertyType,
PropertyNotificationReason  reason 
)
overrideprotected

◆ applySelectionBehavior()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::applySelectionBehavior ( size_t  itemIndex,
bool  smooth 
)
protected

Applies selection behavior to specified item.

Parameters
itemIndexindex of the item to which selection behavior should be applied.
smoothindicates if selection should be immediate or smooth.

◆ assignItemGenerator()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::assignItemGenerator ( ItemGeneratorSharedPtr  itemGenerator)
protected

Assigns list box item generator to list box.

◆ setItemGeneratorByProperty()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::setItemGeneratorByProperty ( )
protected

Creates and assigns item generator by ItemGeneratorTypeName property value.

◆ assignItemContainerGenerator()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::assignItemContainerGenerator ( ItemContainerGeneratorSharedPtr  itemContainerGenerator)
protected

Assigns list box item container generator to list box.

◆ setItemContainerGeneratorByProperty()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::setItemContainerGeneratorByProperty ( )
protected

Creates and assigns item container generator by ItemGeneratorTypeName property value.

◆ updateGenerators()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::updateGenerators ( ItemGeneratorSharedPtr  itemGenerator,
ItemContainerGeneratorSharedPtr  itemContainerGenerator 
)
protected

Replaces item and item container generators with new objects. Updates items and layout accordingly.

◆ synchronizeSelectedItemIndexProperty()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::synchronizeSelectedItemIndexProperty ( )
protected

Updates SelectedItemIndex property after selected item index changes internally by list box.

◆ synchronizeItemCountProperty()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::synchronizeItemCountProperty ( )
protected

Updates the ItemCountProperty.

◆ makeEditorInfo()

template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
static PropertyTypeEditorInfoSharedPtr kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::makeEditorInfo ( )
inlinestaticprotected

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