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 >:
kanzi::ListBoxConcept kanzi::ContentItemCollectionModel

Public Types

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

Public Member Functions

virtual bool addContentItem (NodeSharedPtr abstractItem) KZ_OVERRIDE
 
virtual bool removeContentItem (NodeSharedPtr abstractItem) KZ_OVERRIDE
 
virtual void removeAllContentItems () KZ_OVERRIDE
 
virtual size_t getContentItemCount () KZ_OVERRIDE
 
virtual NodeSharedPtr getContentItem (size_t index) KZ_OVERRIDE
 
PresenterSharedPtr getPresenter () const
 
size_t getItemCount ()
 Returns the total item count of the list box. Includes all virtual items. More...
 
optional< pair< size_t, size_t > > getAliveRange ()
 Returns the range of items being alive in the buffer (based on the KeepItemsAlive property). More...
 
bool isEmpty ()
 Returns true if the list box has no items. 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...
 
optional< size_t > getItemIndex (ItemSharedPtr item)
 Returns index of the given item. If the item does not exist currently, returns empty. More...
 
ItemSharedPtr getItem (size_t index)
 Gets the item at the given index in a list box. 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...
 
void removeItem (size_t index)
 Removes the item at the given index 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 addItem (ItemSharedPtr item)
 Adds an item at the end of 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 removeAllItems ()
 Removes all items 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...
 
virtual void notifyItemAdded (size_t index) KZ_OVERRIDE
 Virtual functions for notifying item changes to list. More...
 
virtual void notifyItemRemoved (size_t index) KZ_OVERRIDE
 
virtual void notifyItemReplaced (size_t index) KZ_OVERRIDE
 
virtual void notifyItemCountChanged () KZ_OVERRIDE
 
void notifyItemContainerChanged ()
 
virtual LayoutVectorType measureOverride (LayoutVectorType availableSize) KZ_OVERRIDE
 
virtual void arrangeOverride (LayoutVectorType actualSize) KZ_OVERRIDE
 
void updateVisibleRangeQuiet (size_t beginIndex, size_t itemCount)
 Requests items from the item generator. 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)
 
ScrollViewSharedPtr getScrollView () const
 Returns scroll view used for scrolling list box. More...
 
void bringItemCenter (size_t itemIndex, bool smooth)
 Requests the list box to focus on the item in the given index. More...
 
int getKeepAliveItemCount () const
 Gets the value of #KeepAliveItemCount. More...
 
void setKeepAliveItemCount (int value)
 Sets the value of #KeepAliveItemCount. More...
 
int getSelectedItemIndex () const
 Gets the value of #SelectedItemIndex. More...
 
void setSelectedItemIndex (int value)
 Sets the value of #SelectedItemIndex. More...
 
SelectionBehavior getSelectionBehavior () const
 Gets the value of SelectionBehavior. More...
 
void setSelectionBehavior (SelectionBehavior value)
 Sets the value of SelectionBehavior. More...
 
string getItemGeneratorTypeName () const
 Gets the value of #ObjectGeneratorTypeName. More...
 
void setItemGeneratorTypeName (string_view value)
 Sets the value of #ObjectGeneratorTypeName. More...
 
string getItemContainerGeneratorTypeName () const
 Gets the value of #ItemContainerGeneratorTypeName. More...
 
void setItemContainerGeneratorTypeName (string_view value)
 Sets the value of #ItemContainerGeneratorTypeName. More...
 
PrefabTemplateSharedPtr getItemTemplate () const
 Gets the value of #ItemTemplate. More...
 
void setItemTemplate (PrefabTemplateSharedPtr value)
 Sets the value of #ItemTemplate. More...
 
PrefabTemplateSharedPtr getItemContainerTemplate () const
 Gets the value of #ItemContainerTemplate. More...
 
void setItemContainerTemplate (PrefabTemplateSharedPtr value)
 Sets the value of #ItemContainerTemplate. More...
 
void setItemGenerator (ItemGeneratorSharedPtr itemGenerator)
 Sets the list box item generator. More...
 
void setItemContainerGenerator (ItemContainerGeneratorSharedPtr itemContainerGenerator)
 Sets the list box item container 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

 ListBoxConceptImpl (Domain *domain, string_view name)
 
 ~ListBoxConceptImpl ()
 
void initialize (ScrollViewSharedPtr scroll, PresenterSharedPtr pres)
 
void onClicked (ClickManipulator::ClickMessageArguments &messageArguments)
 
void onScrolled (ScrollViewConcept::ScrollMessageArguments &messageArguments)
 
void onSnapRequested (ScrollViewConcept::SnapRequestMessageArguments &messageArguments)
 
void sendScrollViewScrollTargetMessage (const Vector2 &scrollTarget)
 Sends new scroll target to scroll view. More...
 
void sendSetScrollViewScrollMessage (const Vector2 &scrollPosition)
 Sends new current scroll position to scroll view. More...
 
void sendListBoxTargetChangedMessage (size_t targetItem)
 Sends new current scroll position to scroll view. More...
 
virtual void onAttached () KZ_OVERRIDE
 Node::onAttached() implementation. More...
 
virtual void onDetached () KZ_OVERRIDE
 Node::onDetached() implementation. More...
 
virtual void onNodePropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) KZ_OVERRIDE
 Node::onNodePropertyChanged() implementation. More...
 
void applySelectionBehavior (size_t itemIndex, bool smooth)
 Applies selection behavior to specified item. More...
 
void assignItemGenerator (ItemGeneratorSharedPtr itemGenerator)
 Assigns list box item generator to list box. More...
 
void setItemGeneratorByProperty ()
 Creates and assigns item generator by ItemGeneratorTypeName property value. More...
 
void assignItemContainerGenerator (ItemContainerGeneratorSharedPtr itemContainerGenerator)
 Assigns list box item container generator to list box. More...
 
void setItemContainerGeneratorByProperty ()
 Creates and assigns item container generator by ItemGeneratorTypeName property value. More...
 
void updateGenerators (ItemGeneratorSharedPtr itemGenerator, ItemContainerGeneratorSharedPtr itemContainerGenerator)
 Replaces item and item container generators with new objects. Updates items and layout accordingly. More...
 
void synchronizeSelectedItemIndexProperty ()
 Updates SelectedItemIndex property after selected item index changes internally by list box. More...
 

Static Protected Member Functions

static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 

Additional Inherited Members

- Static Public Attributes inherited from kanzi::ListBoxConcept
static MessageType< ItemSelectedMessageArgumentsItemSelectedMessage
 ItemSelected message type. More...
 
static MessageType< ItemVisibleMessageArgumentsItemVisibleMessage
 ItemVisible message type. More...
 
static MessageType< ItemHiddenMessageArgumentsItemHiddenMessage
 ItemHidden message type. More...
 
static MessageType< TargetChangedMessageArgumentsTargetChangedMessage
 TargetChanged message type. 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 scrolls the items so that new items become visible and old items disappear. How this actually happens depends on the specific list boxes.

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

template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef ListBoxTraits::TScrollViewClass kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::ScrollViewClass
template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef ListBoxTraits::TItemClass kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::ItemClass
template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef ListBoxTraits::TItemContainerClass kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::ItemContainerClass
template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef ListBoxTraits::TPresenterClass kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::PresenterClass
template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef ListBoxTraits::TItemGeneratorClass kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::ItemGeneratorClass
template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef ListBoxTraits::TItemContainerGeneratorClass kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::ItemContainerGeneratorClass
template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef TBaseClass::LayoutVectorType kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::LayoutVectorType
template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef shared_ptr<ScrollViewClass> kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::ScrollViewSharedPtr
template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef shared_ptr<ItemClass> kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::ItemSharedPtr
template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef shared_ptr<ItemContainerClass> kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::ItemContainerSharedPtr
template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef shared_ptr<DefaultListBoxItemGenerator<ItemGeneratorClass> > kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::DefaultItemGeneratorSharedPtr
template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef shared_ptr<ItemGeneratorClass> kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::ItemGeneratorSharedPtr
template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef shared_ptr<ItemContainerGeneratorClass> kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::ItemContainerGeneratorSharedPtr
template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
typedef shared_ptr<PresenterClass> kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::PresenterSharedPtr

Constructor & Destructor Documentation

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

Member Function Documentation

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
bool kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::addContentItem ( NodeSharedPtr  abstractItem)
virtual
template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
bool kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::removeContentItem ( NodeSharedPtr  abstractItem)
virtual
template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::removeAllContentItems ( )
virtual
template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
size_t kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::getContentItemCount ( )
virtual
template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
NodeSharedPtr kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::getContentItem ( size_t  index)
virtual
template<typename TBaseClass, typename TDerivedClass, typename ListBoxTraits>
PresenterSharedPtr kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::getPresenter ( ) const
inline
template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
size_t kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::getItemCount ( )

Returns the total item count of the list box. Includes all virtual items.

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.

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

Returns true if the list box has no items.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.
template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::notifyItemAdded ( size_t  index)
virtual

Virtual functions for notifying item changes to list.

Implements kanzi::ListBoxConcept.

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

Implements kanzi::ListBoxConcept.

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

Implements kanzi::ListBoxConcept.

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

Implements kanzi::ListBoxConcept.

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::notifyItemContainerChanged ( )
template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
Vector2 kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::doMeasure ( Node2D node)
static
template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
Vector3 kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::doMeasure ( Node3D node)
static
template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::LayoutVectorType kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::measureOverride ( LayoutVectorType  availableSize)
virtual
template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::arrangeOverride ( LayoutVectorType  actualSize)
virtual
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.

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.

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

Returns scroll view used for scrolling list box.

Use it to access properties of the scroll view or modify the scrolling behaviour.

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

Requests the list box to focus on the item in the given index.

Parameters
itemIndexThe index of the focused item.
smoothIf set to true, the list box scroll to the target item smoothly. If set to false, the list box jumps to the target item immediately.
template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
int kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::getKeepAliveItemCount ( ) const

Gets the value of #KeepAliveItemCount.

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

Sets the value of #KeepAliveItemCount.

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

Gets the value of #SelectedItemIndex.

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

Sets the value of #SelectedItemIndex.

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

Gets the value of SelectionBehavior.

See also
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()
template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
string kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::getItemGeneratorTypeName ( ) const

Gets the value of #ObjectGeneratorTypeName.

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

Sets the value of #ObjectGeneratorTypeName.

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

Gets the value of #ItemContainerGeneratorTypeName.

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

Sets the value of #ItemContainerGeneratorTypeName.

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

Gets the value of #ItemTemplate.

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

Sets the value of #ItemTemplate.

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

Gets the value of #ItemContainerTemplate.

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

Sets the value of #ItemContainerTemplate.

See also
setItemContainerTemplate()
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.
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.
template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::initialize ( ScrollViewSharedPtr  scroll,
PresenterSharedPtr  pres 
)
protected
template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::onClicked ( ClickManipulator::ClickMessageArguments messageArguments)
protected
template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::onScrolled ( ScrollViewConcept::ScrollMessageArguments messageArguments)
protected
template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::onSnapRequested ( ScrollViewConcept::SnapRequestMessageArguments messageArguments)
protected
template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::sendScrollViewScrollTargetMessage ( const Vector2 scrollTarget)
protected

Sends new scroll target to scroll view.

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::sendSetScrollViewScrollMessage ( const Vector2 scrollPosition)
protected

Sends new current scroll position to scroll view.

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::sendListBoxTargetChangedMessage ( size_t  targetItem)
protected

Sends new current scroll position to scroll view.

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

Node::onDetached() implementation.

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::onNodePropertyChanged ( AbstractPropertyType  propertyType,
PropertyNotificationReason  reason 
)
protectedvirtual
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.
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.

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

Creates and assigns item generator by ItemGeneratorTypeName property value.

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.

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.

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.

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.

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: