Use the Trajectory List Box 3D node to create scrollable lists of items arranged along a Trajectory. More...
#include <kanzi/ui/node/trajectory_list_box3d.hpp>
Static Public Member Functions | |
| static TrajectoryListBox3DSharedPtr | create (Domain *domain, string_view name) |
| Creates a TrajectoryListBox3D node. | |
| static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Static Public Member Functions inherited from kanzi::TrajectoryListBoxConceptImpl< Node3D, TrajectoryListBox3D, TrajectoryListBox3DTraits > | |
| static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Static Public Member Functions inherited from kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits > | |
| static Vector2 | doMeasure (Node2D &node) |
| static Vector3 | doMeasure (Node3D &node) |
Static Public Member Functions inherited from kanzi::ListBoxConcept | |
| static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Static Public Member Functions inherited from kanzi::ListBoxScrollingConcept | |
| static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Static Public Member Functions inherited from kanzi::TrajectoryListBoxConcept | |
| static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Additional Inherited Members | |
Public Types inherited from kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits > | |
| typedef shared_ptr< DefaultListBoxItemGenerator< ItemGeneratorClass > > | DefaultItemGeneratorSharedPtr |
| typedef ListBoxTraits::TItemClass | ItemClass |
| typedef ListBoxTraits::TItemContainerClass | ItemContainerClass |
| typedef ListBoxTraits::TItemContainerGeneratorClass | ItemContainerGeneratorClass |
| typedef shared_ptr< ItemContainerGeneratorClass > | ItemContainerGeneratorSharedPtr |
| typedef shared_ptr< ItemContainerClass > | ItemContainerSharedPtr |
| typedef ListBoxTraits::TItemGeneratorClass | ItemGeneratorClass |
| typedef shared_ptr< ItemGeneratorClass > | ItemGeneratorSharedPtr |
| typedef shared_ptr< ItemClass > | ItemSharedPtr |
| typedef TBaseClass::LayoutVectorType | LayoutVectorType |
| typedef ListBoxTraits::TPresenterClass | PresenterClass |
| typedef shared_ptr< PresenterClass > | PresenterSharedPtr |
Public Types inherited from kanzi::ListBoxConcept | |
| enum class | FocusMoveTarget { NextItem , PreviousItem , NextPage , PreviousPage , LastItem , FirstItem } |
| Specifies the targets to which the focus can move in a List Box. More... | |
| enum | SelectionBehavior { SelectionBehaviorNone , SelectionBehaviorBringToCenter } |
| Behaviors for the List Box when an item in the List Box is selected. More... | |
Public Member Functions inherited from kanzi::TrajectoryListBoxConceptImpl< Node3D, TrajectoryListBox3D, TrajectoryListBox3DTraits > | |
| ScrollViewSharedPtr | getScrollView () const |
| Returns the Scroll View that scrolls the Trajectory List Box. | |
| ResourceSharedPtr | getTrajectory () const |
| Gets the value of the TrajectoryProperty. | |
| void | setTrajectory (ResourceSharedPtr value) |
| Sets the value of the TrajectoryProperty. | |
| float | getItemAreaBegin () const |
| Gets the value of the ItemAreaBeginProperty. | |
| void | setItemAreaBegin (float value) |
| Sets the value of the ItemAreaBeginProperty. | |
| float | getItemAreaEnd () const |
| Gets the value of the ItemAreaEndProperty. | |
| void | setItemAreaEnd (float value) |
| Sets the value of the ItemAreaEndProperty. | |
| Vector2 | getScrollPosition () const |
| Returns the value of the ScrollPositionProperty. | |
| void | setScrollPosition (Vector2 scrollPosition) |
| Sets the value of the ScrollPositionProperty. | |
| bool | isAlignToTangent () const |
| Gets the value of the AlignToTangentProperty. | |
| void | setAlignToTangent (bool value) |
| Sets the value of the AlignToTangentProperty. | |
| float | getSpacing () const |
| Gets the value of the SpacingProperty. | |
| void | setSpacing (float value) |
| Sets the value of the SpacingProperty. | |
| float | getCursorOffset () const |
| Gets the value of the CursorOffsetProperty. | |
| void | setCursorOffset (float value) |
| Sets the value of the CursorOffsetProperty. | |
| float | getRecognitionThreshold () const |
| Gets the value of the RecognitionThresholdProperty. | |
| void | setRecognitionThreshold (float value) |
| Sets the value of the RecognitionThresholdProperty. | |
| int | getMinimumNumberOfTouches () const |
| Gets the value of the MinimumNumberOfTouchesProperty. | |
| void | setMinimumNumberOfTouches (int value) |
| Sets the value of the MinimumNumberOfTouchesProperty. | |
| int | getMaximumNumberOfTouches () const |
| Gets the value of the MaximumNumberOfTouchesProperty. | |
| void | setMaximumNumberOfTouches (int value) |
| Sets the value of the MaximumNumberOfTouchesProperty. | |
| float | getSensitivity () const |
| Gets the value of the SensitivityProperty. | |
| void | setSensitivity (float value) |
| Sets the value of the SensitivityProperty. | |
| float | getSlidingAccelerationCoefficient () const |
| Gets the value of the SlidingAccelerationCoefficientProperty. | |
| void | setSlidingAccelerationCoefficient (float value) |
| Sets the value of the SlidingAccelerationCoefficientProperty. | |
| float | getSlidingDragCoefficient () const |
| Gets the value of the SlidingDragCoefficientProperty. | |
| void | setSlidingDragCoefficient (float value) |
| Sets the value of the SlidingDragCoefficientProperty. | |
| float | getDraggingAccelerationCoefficient () const |
| Gets the value of the DraggingAccelerationCoefficientProperty. | |
| void | setDraggingAccelerationCoefficient (float value) |
| Sets the value of the DraggingAccelerationCoefficientProperty. | |
| float | getDraggingDragCoefficient () const |
| Gets the value of the DraggingDragCoefficientProperty. | |
| void | setDraggingDragCoefficient (float value) |
| Sets the value of the DraggingDragCoefficientProperty. | |
| float | getDraggingImpulseFactor () const |
| Gets the value of the DraggingImpulseFactorProperty. | |
| void | setDraggingImpulseFactor (float value) |
| Sets the value of the DraggingImpulseFactorProperty. | |
| float | getSwipeDistance () const |
| Gets the value of the SwipeDistanceProperty. | |
| void | setSwipeDistance (float value) |
| Sets the value of the SwipeDistanceProperty. | |
| bool | isLooping () const |
| Gets the value of the LoopingProperty. | |
| void | setLooping (bool value) |
| Sets the value of the LoopingProperty. | |
| ScrollViewConcept::AllowedScrollAxis | getAllowedScrollAxis () const |
| Returns the value of the AllowedScrollAxisProperty. | |
| void | setAllowedScrollAxis (ScrollViewConcept::AllowedScrollAxis axis) |
| Sets the AllowedScrollAxisProperty value. | |
| bool | isReversedScrolling () const |
| Returns the value of the ReversedScrollingProperty. | |
| void | setReversedScrolling (bool enable) |
| Sets the value of the ReversedScrollingProperty. | |
Public Member Functions inherited from kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits > | |
| 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 between focusable items in a List Box. | |
| void | extendAliveItemsRangeToItemIndex (size_t itemIndex) |
| Extends the alive items range to contain the item at a given index. | |
| optional< pair< size_t, size_t > > | getAliveItemsRange () |
| Returns the range of list items that are alive. | |
| NodeSharedPtr | getContentItem (size_t index) override |
| size_t | getContentItemCount () override |
| optional< size_t > | getFocusedItemIndex () const |
| Returns the index of the item that holds the focus in the List Box. | |
| 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. | |
| bool | trySetFocusItem (size_t itemIndex, bool fallback) |
| Tries to set the application focus to an item at a given index and brings the item alive. | |
| void | updateAliveItemsRange (size_t beginIndex, size_t itemCount, bool sendMessages=true) |
| Requests items from the item generator. | |
| void | updateAliveItemsRangeQuiet (size_t beginIndex, size_t itemCount) |
| Requests items from the item generator. | |
Public Member Functions inherited from kanzi::ContentItemCollectionModel | |
| virtual | ~ContentItemCollectionModel () |
Static Public Attributes inherited from kanzi::ListBoxConcept | |
| static MessageType< ItemLoadedMessageArguments > | ItemLoadedMessage |
| List Box node dispatches this message whenever the List Box loads one of its items. | |
| static MessageType< ItemSelectedMessageArguments > | ItemSelectedMessage |
| List Box node dispatches this message whenever an item in the List Box is selected. | |
| static MessageType< ItemUnloadedMessageArguments > | ItemUnloadedMessage |
| List Box node dispatches this message whenever the List Box unloads one of its items. | |
| static PropertyType< int > | ItemCountProperty |
| Reports the number of items in a List Box, including virtual items. | |
| static PropertyType< int > | KeepAliveItemCountProperty |
| Sets the size of the buffer for invisible List Box items. | |
| static PropertyType< ListBoxConcept::SelectionBehavior > | SelectionBehaviorProperty |
| 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< ResourceSharedPtr > | ItemTemplateProperty |
| Sets the prefab template to use for the List Box items. | |
| static PropertyType< ResourceSharedPtr > | ItemContainerTemplateProperty |
| Sets the ListBoxItemContainer prefab that sets the appearance and behavior of the List Box items. | |
| static PropertyType< int > | SelectedItemIndexProperty |
| Sets and reports the index of the item that is currently selected in a List Box node. | |
| static MessageType< TrySetFocusToItemMessageArguments > | TrySetFocusToListItemMessage |
| Dispatch this message to set the focus to the list item at a given index. | |
| static MessageType< MoveFocusMessageArguments > | MoveFocusMessage |
| Dispatch this message to move the focus between List Box items to a given target. | |
Static Public Attributes inherited from kanzi::ListBoxScrollingConcept | |
| static MessageType< ScrolledMessageArguments > | ScrolledMessage |
| List Box node dispatches this message whenever the List Box node scrolls. | |
| static MessageType< ScrollFinishedMessageArguments > | ScrollFinishedMessage |
| List Box node dispatches this message whenever the List Box stops scrolling. | |
| static MessageType< ScrollStartedMessageArguments > | ScrollStartedMessage |
| List Box node dispatches this message whenever the List Box starts to scroll. | |
| static MessageType< TargetChangedMessageArguments > | TargetChangedMessage |
| List Box node dispatches this message whenever there is a change in scroll target item in List Box. | |
| static MessageType< UserScrollFinishedMessageArguments > | UserScrollFinishedMessage |
| List Box node dispatches this message when the user stops scrolling the List Box content. | |
| static MessageType< UserScrollStartedMessageArguments > | UserScrollStartedMessage |
| List Box node dispatches this message when the user starts to scroll the List Box content. | |
Static Public Attributes inherited from kanzi::TrajectoryListBoxConcept | |
| static PropertyType< ResourceSharedPtr > | TrajectoryProperty |
| Sets the resource ID of the Trajectory along which the Trajectory List Box 3D arranges its items. | |
| static PropertyType< float > | ItemAreaBeginProperty |
| Defines the starting point of the Trajectory segment meant for the fully visible Trajectory List Box 3D items. | |
| static PropertyType< float > | ItemAreaEndProperty |
| Defines the ending point of the Trajectory segment meant for the fully visible Trajectory List Box 3D items. | |
| static PropertyType< Vector2 > | ScrollPositionProperty |
| Reports the scroll position of a Trajectory List Box 3D node along the x and y axes as a relative position within the Trajectory List Box 3D area. | |
| static PropertyType< bool > | AlignToTangentProperty |
| Indicates whether to align the Trajectory List Box 3D items to match the tangent of the Trajectory. | |
| static PropertyType< float > | SpacingProperty |
| Sets the distance between the items in the Trajectory List Box 3D node. | |
| static PropertyType< float > | CursorOffsetProperty |
| Sets the offset of the position to use to select the active item, in proportional range [0,1]. | |
| static PropertyType< float > | RecognitionThresholdProperty |
| Sets the distance in pixels that the pointer has to move for the scrolling to start in the Trajectory List Box 3D node. | |
| static PropertyType< int > | MinimumNumberOfTouchesProperty |
| Sets the minimum number of touch points required on the Trajectory List Box 3D area for scrolling. | |
| static PropertyType< int > | MaximumNumberOfTouchesProperty |
| Sets the maximum number of touch points allowed on the Trajectory List Box 3D area for scrolling. | |
| static PropertyType< float > | SensitivityProperty |
| Sets the amount that the scroll value changes relative to the movement of the pointer on the scroll view plane of a Trajectory List Box 3D node. | |
| static PropertyType< float > | SlidingAccelerationCoefficientProperty |
| Sets the acceleration of a Trajectory List Box 3D node after the user releases the pointer with which they scroll the Trajectory List Box 3D. | |
| static PropertyType< float > | SlidingDragCoefficientProperty |
| Sets the amount that drag affects the movement of a Trajectory List Box 3D node after the user releases the pointer with which they scroll the Trajectory List Box 3D. | |
| static PropertyType< float > | DraggingAccelerationCoefficientProperty |
| Sets the acceleration of a Trajectory List Box 3D node when the user scrolls the Trajectory List Box 3D by dragging the pointer. | |
| static PropertyType< float > | DraggingDragCoefficientProperty |
| Sets the amount that drag affects the movement of a Trajectory List Box 3D node when the user scrolls the Trajectory List Box 3D by dragging the pointer. | |
| static PropertyType< float > | DraggingImpulseFactorProperty |
| Sets the amount of impulse to generate from the pointer movement when the user scrolls a Trajectory List Box 3D node by dragging the pointer. | |
| static PropertyType< float > | SwipeDistanceProperty |
| Sets the distance that a swipe sends the scroll value in a Trajectory List Box 3D node, relative to the speed of the pointer. | |
| static PropertyType< bool > | LoopingProperty |
| Indicates whether to show items in a Trajectory List Box 3D from the beginning after reaching the last item, and the other way around. | |
| static PropertyType< ScrollViewConcept::AllowedScrollAxis > | AllowedScrollAxisProperty |
| Sets the axis on which you want to allow a Trajectory List Box 3D node to scroll. | |
| static PropertyType< bool > | ReversedScrollingProperty |
| Indicates whether the change in the scroll position is reversed in relation to the direction of the pan gesture. | |
Static Protected Member Functions inherited from kanzi::ListBoxConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits > | |
| static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Use the Trajectory List Box 3D node to create scrollable lists of items arranged along a Trajectory.
Trajectory List Box 3D measures the width of its items and shows those items that fit on the trajectory. To add space between the list items use the SpacingProperty or make the list items artificially wider. If the list is looping and all items fit on the trajectory, Kanzi increases the spacing automatically to distribute the items evenly on the trajectory.
Trajectory List Box 3D has a cursor that is by default positioned in the middle of the trajectory. To move the cursor, use the CursorOffsetProperty. When the user is not giving input to the Trajectory List Box 3D and the scrolling has slowed down, the Trajectory List Box 3D selects the nearest item and snaps it to the cursor.
To handle input, the Trajectory List Box 3D internally uses ScrollView3D. To make the input work:
To configure the scroll view, Kanzi forwards to the scroll view those scroll view properties that you set in the Trajectory List Box 3D.
To create a Trajectory List Box 3D node:
To set the trajectory that you want the list box to use:
To add items to the list box:
To make the list box loop:
To set the selection behavior:
|
explicitprotected |
|
static |
Creates a TrajectoryListBox3D node.
| domain | The UI domain to which the node belongs. |
| name | The name of the node. |
|
static |