Kanzi 3.9.10
kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits > Class Template Reference

ListBoxConceptImpl provides the common base implementation for the List Box nodes, such as GridListBox2D, GridListBox3D, and TrajectoryListBox3D. 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.
 
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.
 
void enableKeyNavigation (bool enabled)
 Enables directional key navigation on the List Box.
 
optional< pair< size_t, size_t > > getAliveRange ()
 Returns the range of list items that are alive.
 
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.
 
string getItemContainerGeneratorTypeName () const
 Gets the value of ItemContainerGeneratorTypeNameProperty.
 
PrefabTemplateSharedPtr getItemContainerTemplate () const
 Gets the value of ItemContainerTemplateProperty.
 
size_t getItemCount () const
 Returns the value of the ItemCountProperty.
 
string getItemGeneratorTypeName () const
 Gets the value of ItemGeneratorTypeNameProperty.
 
optional< size_t > getItemIndex (ItemSharedPtr item)
 Returns the index of the given item. If the item does not exist, returns empty.
 
LayoutVectorType getItemSize (size_t index)
 Returns the size of the item at the given index.
 
PrefabTemplateSharedPtr getItemTemplate () const
 Gets the value of ItemTemplateProperty.
 
int getKeepAliveItemCount () const
 Gets the value of KeepAliveItemCountProperty.
 
PresenterSharedPtr getPresenter () const
 
int getSelectedItemIndex () const
 Gets the value of SelectedItemIndexProperty.
 
SelectionBehavior getSelectionBehavior () const
 Gets the value of SelectionBehavior.
 
void insertItem (size_t index, ItemSharedPtr item)
 Inserts an item at the given index in a List Box when using the default object generator.
 
bool isEmpty ()
 Indicates whether a List Box has no items.
 
LayoutVectorType measureOverride (LayoutVectorType availableSize) override
 
void notifyItemAdded (size_t index) override
 Virtual functions for notifying item changes to list.
 
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.
 
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.
 
void removeLastItem ()
 Removes the last item from a List Box when using the default object generator.
 
void replaceItem (size_t index, ItemSharedPtr item)
 Replaces the item at the given index in a List Box when using the default object generator.
 
void selectItem (optional< size_t > itemIndex)
 Requests the List Box to select the item at the given index.
 
void setItemContainerGenerator (ItemContainerGeneratorSharedPtr itemContainerGenerator)
 Sets the list box item container generator.
 
void setItemContainerGeneratorTypeName (string_view value)
 Sets the value of ItemContainerGeneratorTypeNameProperty.
 
void setItemContainerTemplate (PrefabTemplateSharedPtr value)
 Sets the value of ItemContainerTemplateProperty.
 
void setItemGenerator (ItemGeneratorSharedPtr itemGenerator)
 Sets the list box item generator.
 
void setItemGeneratorTypeName (string_view value)
 Sets the value of ItemGeneratorTypeNameProperty.
 
void setItemTemplate (PrefabTemplateSharedPtr value)
 Sets the value of ItemTemplateProperty.
 
void setKeepAliveItemCount (int value)
 Sets the value of KeepAliveItemCountProperty.
 
void setSelectedItemIndex (int value)
 Sets the value of SelectedItemIndexProperty.
 
void setSelectionBehavior (SelectionBehavior value)
 Sets the value of SelectionBehavior.
 
void updateVisibleRange (size_t beginIndex, size_t itemCount)
 Requests items from the item generator.
 
void updateVisibleRange (size_t beginIndex, size_t itemCount, bool sendMessages)
 
void updateVisibleRangeQuiet (size_t beginIndex, size_t itemCount)
 Requests items from the item generator.
 
- 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 the selected item.
 
void assignItemContainerGenerator (ItemContainerGeneratorSharedPtr itemContainerGenerator)
 Assigns list box item container generator to list box.
 
void assignItemGenerator (ItemGeneratorSharedPtr itemGenerator)
 Assigns list box item generator to list box.
 
void initialize (PresenterSharedPtr presenter)
 
 ListBoxConceptImpl (Domain *domain, string_view name)
 
bool listBoxContainsKeyFocus () const
 Returns whether the key focus is on the List Box node or on one of the list items.
 
void onAttached () override
 Node::onAttached() implementation.
 
void onClicked (ClickManipulator::ClickMessageArguments &messageArguments)
 Handles ClickManipulator::ClickMessage.
 
void onDetached () override
 Node::onDetached() implementation.
 
void onFocusGained (FocusManager::PostFocusMessageArguments &messageArguments)
 Handles FocusManager::FocusGainedMessage.
 
void onNodePropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) override
 Node::onNodePropertyChanged() implementation.
 
void setItemContainerGeneratorByProperty ()
 Creates and assigns item container generator by ItemGeneratorTypeName property value.
 
void setItemGeneratorByProperty ()
 Creates and assigns item generator by ItemGeneratorTypeName property value.
 
void synchronizeFocusAndSelection (Node &selectedItemContainer)
 ListBoxConcept uses this function to update the focus in the List Box to the selected item.
 
void synchronizeItemCountProperty ()
 Updates the ItemCountProperty.
 
void synchronizeSelectedItemIndexProperty ()
 Updates the SelectedItemIndexProperty after the List Box internally changes the selected item index.
 
void tryMoveFocusToListBox ()
 Tries to move focus to List Box node itself.
 
void updateFocusScopeInfo (FocusScopePtr &nodeScopeInfo) override
 Overrides Node::updateFocusScopeInfo().
 
void updateGenerators (ItemGeneratorSharedPtr itemGenerator, ItemContainerGeneratorSharedPtr itemContainerGenerator)
 Replaces item and item container generators with new objects. Updates items and layout accordingly.
 
 ~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.
 
static MessageType< ItemSelectedMessageArgumentsItemSelectedMessage
 List Box node dispatches this message whenever an item in the List Box is selected.
 
static MessageType< ItemVisibleMessageArgumentsItemVisibleMessage
 List Box node dispatches this message whenever the List Box brings one of its items visible.
 
static PropertyType< intItemCountProperty
 Reports the number of items in a List Box, including virtual items.
 
static PropertyType< intKeepAliveItemCountProperty
 Sets the size of the buffer for invisible List Box items.
 
static PropertyType< ListBoxConcept::SelectionBehaviorSelectionBehaviorProperty
 Sets how a List Box node behaves when the user selects an item.
 
static PropertyType< string > ItemGeneratorTypeNameProperty
 Sets the name of the item generator type to use to provide items dynamically for a List Box node.
 
static PropertyType< string > ItemContainerGeneratorTypeNameProperty
 Sets the name of the item container generator type to use to provide item containers dynamically for a List Box node.
 
static PropertyType< ResourceSharedPtrItemTemplateProperty
 Sets the prefab template to use for the List Box items.
 
static PropertyType< ResourceSharedPtrItemContainerTemplateProperty
 Sets the ListBoxItemContainer prefab that sets the appearance and behavior of the List Box items.
 
static PropertyType< intSelectedItemIndexProperty
 Sets and reports the index of the item that is currently selected in a List Box node.
 

Detailed Description

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

ListBoxConceptImpl provides the common base implementation for the List Box nodes, such as GridListBox2D, GridListBox3D, and TrajectoryListBox3D.

Use the List Box nodes to create lists of selectable items. For example, use the List Box nodes to create contact lists, playlists in a media player, or car settings lists.

A List Box node provides an invisible hit testable area that listens to input and reacts when the user pans the area to browse the list. When the user browses the list, the List Box moves the items so that new items become visible and old items disappear. How this happens depends on the specific List Box.

Item generator

A List Box node gets its items from an item generator. By default, the List Box uses the DefaultListBoxItemGenerator that only stores the items that are added to it. To create dynamic content for a List Box, replace the item generator with a custom implementation.

Item container

A List Box node wraps its items in container nodes that are created by an item container generator. The default item generator creates invisible nodes that do nothing.

Enabling a List Box node to handle the key focus and key input

To enable a List Box node to handle the key focus and key input:

  1. In the List Box node, attach the FocusManager::FocusScopeTypeProperty.
  2. Create for the List Box a custom ListBoxItemContainer prefab template.
  3. In the root node of the ListBoxItemContainer:
  4. In any descendant nodes of the ListBoxItemContainer or in any nodes in the list item, attach the Node::FocusableProperty and set it to true.

    This way, you enable these nodes to gain the key focus and react to key input.

Kanzi now synchronizes the key focus and item selection in the List Box:

  • If the key focus of the application is in the List Box and a focusable list item in that List Box gets selected, Kanzi transfers the key focus to that item. Note that a virtualized list item is not focusable.
  • When the key focus moves to another list item, that item gets selected.

The synchronization works only when both the List Box and the List Box Item Container are focus scopes.

To set a List Box to not handle key focus and key input, in that List Box and its List Box Item Container, remove the FocusManager::FocusScopeTypeProperty.

See also
FocusManager

Disabling a List Box node

Disabled List Box nodes do not respond to input. When Kanzi disables a List Box node, it cancels the ongoing gestures and preserves the position of that List Box node.

To disable a List Box node, set the Node::EnabledProperty to false.

To visually indicate the disabled state of a List Box node, create a state manager and use the Node::EffectivelyEnabledProperty as its controller property.

Member Typedef Documentation

◆ ItemClass

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

◆ ItemContainerClass

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

◆ PresenterClass

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

◆ ItemGeneratorClass

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

◆ ItemContainerGeneratorClass

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

◆ LayoutVectorType

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

◆ ItemSharedPtr

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

◆ ItemContainerSharedPtr

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

◆ DefaultItemGeneratorSharedPtr

◆ ItemGeneratorSharedPtr

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

◆ ItemContainerGeneratorSharedPtr

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

◆ PresenterSharedPtr

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

Constructor & Destructor Documentation

◆ ListBoxConceptImpl()

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

◆ ~ListBoxConceptImpl()

Member Function Documentation

◆ addContentItem()

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

◆ removeContentItem()

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

◆ removeAllContentItems()

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

◆ getContentItemCount()

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

◆ getContentItem()

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

◆ getPresenter()

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

◆ getAliveRange()

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

Returns the range of list items that are alive.

By using virtualization a List Box node keeps alive and in memory only the items that are visible and the number of items that you set with the KeepAliveItemCountProperty. The returned pair contains the index of the first item and the number of items. If there are no alive items in the List Box, returns (0, 0). If there are no items in the List Box, returns nullopt.

◆ isEmpty()

Indicates whether a List Box has no items.

◆ getItemSize()

Returns the size of the item at the given index.

If it is not possible to determine the size without first acquiring the item, returns an unbound layout value.

◆ getItemIndex()

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

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

◆ getItem()

Gets the item at the given index in a List Box.

◆ insertItem()

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()

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()

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

Replaces the item at the given index in a List Box when using the default object generator.

◆ addItem()

Adds an item at the end of a List Box when using the default object generator.

◆ removeLastItem()

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

Removes the last item from a List Box when using the default object generator.

◆ removeAllItems()

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

Removes all items from a List Box when using the default object generator.

◆ selectItem()

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

Requests the List Box to select the item at the given index.

Parameters
itemIndexThe index of the selected item. To clear the selection, set to empty.

◆ enableKeyNavigation()

void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::enableKeyNavigation ( bool enabled)

Enables directional key navigation on the List Box.

Parameters
enabledTo enable key navigation, pass true. To disable key navigation, pass false.
Since
Kanzi 3.9.1

◆ notifyItemAdded()

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

Virtual functions for notifying item changes to list.

Implements kanzi::ListBoxConcept.

◆ notifyItemRemoved()

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

Implements kanzi::ListBoxConcept.

◆ notifyItemReplaced()

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

Implements kanzi::ListBoxConcept.

◆ notifyItemCountChanged()

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

Implements kanzi::ListBoxConcept.

◆ notifyItemContainerChanged()

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

◆ doMeasure() [1/2]

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

◆ doMeasure() [2/2]

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

◆ measureOverride()

◆ arrangeOverride()

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

◆ updateVisibleRangeQuiet()

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]

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]

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

◆ bringItemCenter()

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()

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()

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

◆ setKeepAliveItemCount()

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

◆ getSelectedItemIndex()

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

◆ setSelectedItemIndex()

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

◆ getSelectionBehavior()

◆ setSelectionBehavior()

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

Sets the value of SelectionBehavior.

See also
getSelectionBehavior()

◆ getItemGeneratorTypeName()

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

◆ setItemGeneratorTypeName()

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

◆ getItemContainerGeneratorTypeName()

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

◆ setItemContainerGeneratorTypeName()

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

◆ getItemTemplate()

Gets the value of ItemTemplateProperty.

See also
getItemTemplate()

◆ setItemTemplate()

◆ getItemContainerTemplate()

◆ setItemContainerTemplate()

◆ setItemGenerator()

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

Sets the list box item generator.

Parameters
itemGeneratorNew item generator.

◆ setItemContainerGenerator()

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

Sets the list box item container generator.

Parameters
itemContainerGeneratorNew item container generator.

◆ initialize()

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

◆ onClicked()

◆ onFocusGained()

◆ onAttached()

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

Node::onAttached() implementation.

Reimplemented in kanzi::TrajectoryListBox3D.

◆ onDetached()

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

Node::onDetached() implementation.

◆ onNodePropertyChanged()

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

Node::onNodePropertyChanged() implementation.

Reimplemented in kanzi::TrajectoryListBox3D.

◆ applySelectionBehavior()

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

Applies selection behavior to the selected item.

Parameters
itemIndexThe index of the item to which you want to apply selection behavior.
smoothFor a List Box whose SelectionBehaviorProperty is set to ListBoxConcept::SelectionBehaviorBringToCenter, this parameter determines whether to animate the movement of the selected item to the center of the List Box area. To bring the item to the center immediately, pass false.

◆ assignItemGenerator()

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

Assigns list box item generator to list box.

◆ setItemGeneratorByProperty()

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

Creates and assigns item generator by ItemGeneratorTypeName property value.

◆ assignItemContainerGenerator()

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

Assigns list box item container generator to list box.

◆ setItemContainerGeneratorByProperty()

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

Creates and assigns item container generator by ItemGeneratorTypeName property value.

◆ updateGenerators()

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()

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

Updates the SelectedItemIndexProperty after the List Box internally changes the selected item index.

◆ synchronizeItemCountProperty()

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

Updates the ItemCountProperty.

◆ synchronizeFocusAndSelection()

void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::synchronizeFocusAndSelection ( Node & selectedItemContainer)
protected

ListBoxConcept uses this function to update the focus in the List Box to the selected item.

When the item selection changes while the List Box contains the focus:

  • If the selected item contains a node that can receive the focus, that node gets the focus.
  • If the selected item does not contain focusable nodes, the List Box gets the focus.

When the item selection changes while the List Box does not contain the focus, Kanzi sets the selected item as the focus node in the List Box. This way, when the user navigates the focus to the List Box, the selected item gets the focus.

Parameters
selectedItemContainerItem container of the selected List Box item.
Since
Kanzi 3.9.7

◆ listBoxContainsKeyFocus()

bool kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::listBoxContainsKeyFocus ( ) const
protected

Returns whether the key focus is on the List Box node or on one of the list items.

Returns
If the key focus is on the List Box or on one of the list items, true, otherwise false.
Since
Kanzi 3.9.7

◆ tryMoveFocusToListBox()

void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::tryMoveFocusToListBox ( )
protected

Tries to move focus to List Box node itself.

Since
Kanzi 3.9.7

◆ updateFocusScopeInfo()

void kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::updateFocusScopeInfo ( FocusScopePtr & nodeScopeInfo)
overrideprotected

◆ makeEditorInfo()

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

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