Kanzi 4.1.0
kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView > Class Template Reference

ListBoxTrajectoryPresenter implements the List Box presenter that use Scroll View and the trajectory layout in their presentation. More...

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

Inheritance diagram for kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >:
[legend]

Classes

struct  TrajectoryLayoutSnapInfo
 
class  VirtualListBoxItem
 Represents a virtual item within a ListBox. More...
 

Public Types

using BaseClass
 
using ItemSharedPtr
 
using LayoutSharedPtr
 
using ListBoxTrajectoryPresenterType
 
using ScrollViewSharedPtr
 

Public Member Functions

void addToLayout (ItemSharedPtr listBoxItem)
 
void bringItemCenter (size_t selection, bool smooth)
 Brings given item to the selector position.
 
void enableKeyNavigation (bool enabled)
 Enables directional key navigation on the Trajectory Presenter.
 
size_t getItemCount () const
 Gets number of items in presenters list box.
 
LayoutSharedPtr getLayout () const
 
void initialize (TFinalClass *listBox, LayoutSharedPtr layout)
 Initializes the trajectory presenter for the list box.
 
bool isEffectivelyLooping () const
 Returns whether presentation is in looping mode.
 
 ListBoxTrajectoryPresenter ()
 
void notifyItemAdded (size_t index)
 Implements notifyItemAdded for a trajectory list box.
 
void notifyItemContainerChanged ()
 Invalidates layout if the item container is changed.
 
void notifyItemRemoved (size_t index)
 Implements notifyItemRemoved for a trajectory list box.
 
void notifyItemReplaced (size_t)
 Invalidates layout if the item is replaced.
 
void removeFromLayout (ItemSharedPtr listBoxItem)
 
void setScroll (Vector2 scroll)
 ListBoxScrollPresenterConceptImpl::setScroll implementation.
 
void snap (Vector2 position, Vector2 direction, bool changeTarget, Vector2 *out_position, int *out_itemIndex)
 Snaps from a given position towards a given direction.
 
void startNavigation (NavigationDirection direction)
 Defines the behavior on navigational key press.
 
void tryMoveFocusInDirection (ListBoxConcept::FocusMoveTarget target, bool fallback=false)
 Tries to move the focus to the next or previous item in a Trajectory List Box node.
 
void tryMoveFocusToEdge (ListBoxConcept::FocusMoveTarget target, bool fallback=false)
 Tries to move the focus to the first or last item in a Trajectory List Box node.
 
void tryMoveFocusToPage (ListBoxConcept::FocusMoveTarget target, bool fallback=false)
 
void update ()
 Updates presenter's state and visible items.
 
- Public Member Functions inherited from kanzi::ListBoxScrollPresenterConceptImpl< TDerivedClass, TFinalClass, TScrollView >
ScrollViewSharedPtr getScrollView () const
 Returns the Scroll View that the presenter uses.
 
void initialize (TFinalClass *listBox)
 ListBoxScrollPresenterConceptImpl specific initialization.
 
 ListBoxScrollPresenterConceptImpl ()=default
 Constructor.
 

Protected Member Functions

bool calculateAliveItemsRange ()
 Sets indices and offsets of first and last alive items and the number of alive elements.
 
void extendAliveItemsRangeToItem (size_t index)
 Extends the alive items range of the presenter to include the item at a given index.
 
VirtualListBoxItem findMiddleIterator ()
 
ItemSharedPtr getItem (size_t presenterIndex) const
 Returns the item at the given index.
 
Vector3 getItemSize (size_t itemIndex)
 Returns the size of an item at a given index.
 
float getItemSpacing () const
 Returns list box item spacing.
 
bool isHorizontalScroll () const
 Returns whether the Trajectory List Box is scrolling horizontally.
 
void iterateToIndex (VirtualListBoxItem &iterator, size_t index)
 Iterates the virtual list box item to the given index.
 
void snapImprove (TrajectoryLayoutSnapInfo *snap, unsigned int objectIndex, float offset, float selectorOffset, bool snapLeft, bool snapRight)
 Updates the snap info structure to point to the given object index if this object is closer to the selector offset and the snap in the corresponding direction is enabled.
 
void updateAliveItemsRange ()
 Asks the List Box to update the items in the layout according to the currently set firstIndex and rangeSize, also taking into account the keep alive items.
 
- Protected Member Functions inherited from kanzi::ListBoxScrollPresenterConceptImpl< TDerivedClass, TFinalClass, TScrollView >
TDerivedClass * getThisObject ()
 
const TDerivedClass * getThisObject () const
 
void onClickBegin (ClickManipulator::ClickBeginMessageArguments &messageArguments)
 Handles ClickManipulator::onClickBeginMessage.
 
void onItemSelected (ListBoxConcept::ItemSelectedMessageArguments &messageArguments)
 Handles ListBoxConcept::ItemSelectedMessage.
 
void onScrolled (ScrollViewConcept::ScrolledMessageArguments &messageArguments)
 Handles ScrollViewClass::ScrolledMessage.
 
void onScrollFinished (ScrollViewConcept::ScrollFinishedMessageArguments &messageArguments)
 Handles ScrollViewClass::ScrollFinishedMessage.
 
void onScrollStarted (ScrollViewConcept::ScrollStartedMessageArguments &messageArguments)
 Handles ScrollViewClass::ScrollStartedMessage.
 
void onSnapRequested (ScrollViewConcept::SnapRequestMessageArguments &messageArguments)
 Handles ScrollViewClass::SnapRequestMessage.
 
void onUserScrollFinished (ScrollViewConcept::UserScrollFinishedMessageArguments &messageArguments)
 Handles ScrollViewClass::UserScrollFinishedMessage.
 
void onUserScrollStarted (ScrollViewConcept::UserScrollStartedMessageArguments &messageArguments)
 Handles ScrollViewClass::UserScrollStartedMessage.
 
void scrollToTargetItem (size_t itemIndex, Vector2 scrollPosition, bool smooth) const
 Requests Scroll View to scroll to target item position.
 
void sendListBoxTargetChangedMessage (size_t targetItem) const
 Sends ListBoxScrollPresenterConcept::TargetChangedMessage message to List Box.
 
void sendScrollViewSetScrollMessage (const Vector2 &scrollPosition) const
 Sends ScrollViewConcept::SetScrollMessage message to Scroll View.
 
void sendScrollViewSetScrollTargetMessage (const Vector2 &scrollTarget) const
 Sends ScrollViewConcept::SetScrollTargetMessage message to Scroll View.
 

Protected Attributes

int m_fixedPointIndex
 Index of an item that is currently acting as a fixed point in the list.
 
float m_fixedPointOffset
 The offset of the fixed point.
 
size_t m_lastItemCount
 Item count from the previous update(), used to detect bulk item count decreases.
 
size_t m_rangeSize
 Number of items in the visible area.
 
float m_scrollOffset
 Offset of scrolling. In proportional space.
 
VirtualListBoxItem m_viewIntervalLeft
 Virtual leftmost item in the visible area.
 
VirtualListBoxItem m_viewIntervalRight
 Virtual rightmost item in the visible area.
 
- Protected Attributes inherited from kanzi::ListBoxScrollPresenterConceptImpl< TDerivedClass, TFinalClass, TScrollView >
TFinalClass * m_listBox
 List Box that owns this presenter.
 

Detailed Description

template<typename TDerivedClass, typename TFinalClass, typename TLayout, typename TItemClass, typename TScrollView>
class kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >

ListBoxTrajectoryPresenter implements the List Box presenter that use Scroll View and the trajectory layout in their presentation.

You can change the scrolling behavior by subclassing and implementing the following functions:

You can change the navigational key press behavior by subclassing and implementing the following function:

Example

To create a custom Trajectory Presenter:

template <class TListBoxClass>
class CustomTrajectoryListBoxPresenter : public ListBoxTrajectoryPresenter<CustomTrajectoryListBoxPresenter<TListBoxClass>, TListBoxClass, TrajectoryLayout3D, ListBoxItemContainer3D, ScrollView3D>
{
using ParentClass = ListBoxTrajectoryPresenter<CustomTrajectoryListBoxPresenter<TListBoxClass>, TListBoxClass, TrajectoryLayout3D, ListBoxItemContainer3D, ScrollView3D>;
public:
explicit CustomTrajectoryListBoxPresenter() :
ParentClass()
{
}
// Custom implementation of snap. Kanzi uses static polymorphism to select the appropriate method implementations.
void snap(Vector2 position, Vector2 /*direction*/, bool changeTarget, Vector2* out_position, int* out_itemIndex)
{
// In this implementation we ignore the scroll direction. Instead we pass (0.0f, 0.0f) to the parent's class snap() method,
// which effectively enables snap to closest item in both directions, not only in the direction of the scroll.
ParentClass::snap(position, Vector2{ 0.0f, 0.0f }, changeTarget, out_position, out_itemIndex);
}
// Invert navigational keys behavior.
void startNavigation(NavigationDirection direction)
{
switch (direction)
{
case NavigationDirection::Up:
case NavigationDirection::Left:
{
this->tryMoveFocusInDirection(ListBoxConcept::FocusMoveTarget::NextItem);
break;
}
case NavigationDirection::Down:
case NavigationDirection::Right:
{
this->tryMoveFocusInDirection(ListBoxConcept::FocusMoveTarget::PreviousItem);
break;
}
case NavigationDirection::Home:
{
this->tryMoveFocusToEdge(ListBoxConcept::FocusMoveTarget::FirstItem);
break;
}
case NavigationDirection::End:
{
this->tryMoveFocusToEdge(ListBoxConcept::FocusMoveTarget::LastItem);
break;
}
default:
break;
}
}
};
Since
Kanzi 4.1.0 Supports CRTP in derived presenter classes.

Member Typedef Documentation

◆ ListBoxTrajectoryPresenterType

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
using kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::ListBoxTrajectoryPresenterType

◆ BaseClass

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
using kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::BaseClass

◆ LayoutSharedPtr

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
using kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::LayoutSharedPtr

◆ ItemSharedPtr

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
using kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::ItemSharedPtr

◆ ScrollViewSharedPtr

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
using kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::ScrollViewSharedPtr

Constructor & Destructor Documentation

◆ ListBoxTrajectoryPresenter()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::ListBoxTrajectoryPresenter ( )
inlineexplicit

Member Function Documentation

◆ getLayout()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
LayoutSharedPtr kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::getLayout ( ) const
inline

◆ getItemCount()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
size_t kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::getItemCount ( ) const
inline

Gets number of items in presenters list box.

Returns
Item count.

◆ isEffectivelyLooping()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
bool kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::isEffectivelyLooping ( ) const
inline

Returns whether presentation is in looping mode.

Since
Kanzi 4.0.0

◆ notifyItemAdded()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::notifyItemAdded ( size_t index)
inline

Implements notifyItemAdded for a trajectory list box.

Called by the ListBoxConceptImpl after the item has been added.

Parameters
indexIndex of the item that was added.

◆ notifyItemRemoved()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::notifyItemRemoved ( size_t index)
inline

Implements notifyItemRemoved for a trajectory list box.

Called by the ListBoxConceptImpl after the item is removed.

Parameters
indexIndex of the item that will be removed.

◆ notifyItemReplaced()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::notifyItemReplaced ( size_t )
inline

Invalidates layout if the item is replaced.

◆ notifyItemContainerChanged()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::notifyItemContainerChanged ( )
inline

Invalidates layout if the item container is changed.

◆ initialize()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::initialize ( TFinalClass * listBox,
LayoutSharedPtr layout )
inline

Initializes the trajectory presenter for the list box.

Parameters
listBoxList box which items to present.
layoutThe trajectory layout used in the List Box.

◆ startNavigation()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::startNavigation ( NavigationDirection direction)
inline

Defines the behavior on navigational key press.

Default implementation moves focus in the specified direction.

Parameters
directionNavigation direction.
Since
Kanzi 4.1.0

◆ enableKeyNavigation()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::enableKeyNavigation ( bool enabled)
inline

Enables directional key navigation on the Trajectory Presenter.

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

◆ tryMoveFocusInDirection()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::tryMoveFocusInDirection ( ListBoxConcept::FocusMoveTarget target,
bool fallback = false )
inline

Tries to move the focus to the next or previous item in a Trajectory List Box node.

Parameters
targetWhere to move the focus:
fallbackWhether to set the focus to the List Box node when there is no focusable list item in the target.
Since
Kanzi 4.0.0

◆ tryMoveFocusToPage()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::tryMoveFocusToPage ( ListBoxConcept::FocusMoveTarget target,
bool fallback = false )
inline

◆ tryMoveFocusToEdge()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::tryMoveFocusToEdge ( ListBoxConcept::FocusMoveTarget target,
bool fallback = false )
inline

Tries to move the focus to the first or last item in a Trajectory List Box node.

Parameters
targetWhere to move the focus:
fallbackWhether to set the focus to the List Box node when there is no focusable list item in the target.
Since
Kanzi 4.0.0

◆ update()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::update ( )
inline

Updates presenter's state and visible items.

◆ setScroll()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::setScroll ( Vector2 scroll)
inline

ListBoxScrollPresenterConceptImpl::setScroll implementation.

◆ addToLayout()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::addToLayout ( ItemSharedPtr listBoxItem)
inline

◆ removeFromLayout()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::removeFromLayout ( ItemSharedPtr listBoxItem)
inline

◆ bringItemCenter()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::bringItemCenter ( size_t selection,
bool smooth )
inline

Brings given item to the selector position.

◆ snap()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::snap ( Vector2 position,
Vector2 direction,
bool changeTarget,
Vector2 * out_position,
int * out_itemIndex )
inline

Snaps from a given position towards a given direction.

Returns the snapping target and the index of the item to which the scrolling snapped, unless they are given as nullptr. If the list box target changes to the snapped item, changeTarget is true. If the snapping did not target any item, the index is -1.

◆ findMiddleIterator()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
VirtualListBoxItem kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::findMiddleIterator ( )
inlineprotected

◆ calculateAliveItemsRange()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
bool kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::calculateAliveItemsRange ( )
inlineprotected

Sets indices and offsets of first and last alive items and the number of alive elements.

Sets the values of viewInternal member.

Since
Kanzi 4.0.0 changed calculateVisibleRange to calculateAliveItemsRange.

◆ getItem()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
ItemSharedPtr kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::getItem ( size_t presenterIndex) const
inlineprotected

Returns the item at the given index.

Parameters
presenterIndexIndex of the item in the layout.
Returns
The item at the given index.

◆ extendAliveItemsRangeToItem()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::extendAliveItemsRangeToItem ( size_t index)
inlineprotected

Extends the alive items range of the presenter to include the item at a given index.

If the item is already in the alive items range, the range does not change.

Parameters
indexIndex of the item to include in the alive items range.
Since
Kanzi 4.0.0 changed extendVisibleItemsRangeToItem to extendAliveItemsRangeToItem.

◆ getItemSize()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
Vector3 kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::getItemSize ( size_t itemIndex)
inlineprotected

Returns the size of an item at a given index.

If the item is outside the alive items range of the presenter and the List Box cannot determine the size of the item, this operation extends the alive items range.

Parameters
itemIndexThe index of the item whose size you want to get.
Returns
The size of the item.

◆ updateAliveItemsRange()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::updateAliveItemsRange ( )
inlineprotected

Asks the List Box to update the items in the layout according to the currently set firstIndex and rangeSize, also taking into account the keep alive items.

Since
Kanzi 4.0.0 changed updateVisibleRange to updateAliveItemsRange.

◆ snapImprove()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::snapImprove ( TrajectoryLayoutSnapInfo * snap,
unsigned int objectIndex,
float offset,
float selectorOffset,
bool snapLeft,
bool snapRight )
inlineprotected

Updates the snap info structure to point to the given object index if this object is closer to the selector offset and the snap in the corresponding direction is enabled.

Parameters
snapSnap structure to update.
objectIndexThe index of the object to test.
offsetThe offset of the object to test.
selectorOffsetThe selector offset.
snapLeftWhether snap to the left is allowed.
snapRightWhether snap to the right is allowed.

◆ getItemSpacing()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
float kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::getItemSpacing ( ) const
inlineprotected

Returns list box item spacing.

Returns
List box item spacing.

◆ iterateToIndex()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::iterateToIndex ( VirtualListBoxItem & iterator,
size_t index )
inlineprotected

Iterates the virtual list box item to the given index.

◆ isHorizontalScroll()

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
bool kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::isHorizontalScroll ( ) const
inlineprotected

Returns whether the Trajectory List Box is scrolling horizontally.

Returns
If the Trajectory List Box is scrolling horizontally, true. If the Trajectory List Box is scrolling vertically, false.

Member Data Documentation

◆ m_scrollOffset

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
float kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::m_scrollOffset
protected

Offset of scrolling. In proportional space.

◆ m_rangeSize

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
size_t kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::m_rangeSize
protected

Number of items in the visible area.

◆ m_fixedPointIndex

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
int kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::m_fixedPointIndex
protected

Index of an item that is currently acting as a fixed point in the list.

◆ m_fixedPointOffset

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
float kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::m_fixedPointOffset
protected

The offset of the fixed point.

This maps all items to the their places in the list: even when object sizes change between updates, the location of the item in fixedPointIndex stays constant.

◆ m_lastItemCount

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
size_t kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::m_lastItemCount
protected

Item count from the previous update(), used to detect bulk item count decreases.

◆ m_viewIntervalLeft

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
VirtualListBoxItem kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::m_viewIntervalLeft
protected

Virtual leftmost item in the visible area.

◆ m_viewIntervalRight

template<typename TDerivedClass , typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
VirtualListBoxItem kanzi::ListBoxTrajectoryPresenter< TDerivedClass, TFinalClass, TLayout, TItemClass, TScrollView >::m_viewIntervalRight
protected

Virtual rightmost item in the visible area.


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