Kanzi  3.9.6
Kanzi Engine API
kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView > Class Template Reference

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

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

Public Types

using BaseClass = ListBoxScrollPresenterConceptImpl< ListBoxGridPresenterType, TFinalClass, TScrollView >
 
using ItemSharedPtr = shared_ptr< TItemClass >
 
using LayoutSharedPtr = shared_ptr< TLayout >
 
using ListBoxGridPresenterType = ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >
 
using ScrollViewSharedPtr = shared_ptr< TScrollView >
 

Public Member Functions

void addToLayout (ItemSharedPtr listBoxItem)
 
Vector2 bringItemCenter (size_t selection) const
 
void bringItemCenter (size_t selection, bool smooth) const
 
Vector2 deduceSkippedOffset () const
 Calculates how much offset is being skipped by skipping non-visible items. More...
 
void enableKeyNavigation (bool enabled)
 Enables directional key navigation on the Grid Presenter. More...
 
unsigned int getColumnCount () const
 Gets the number of columns that are currently displayed. More...
 
ItemSharedPtr getItem (size_t presenterIndex) const
 
unsigned int getRowCount () const
 Gets the number of rows that are currently displayed. More...
 
void getScrollBounds (float *out_scrollMinimumX, float *out_scrollMaximumX, float *out_scrollMinimumY, float *out_scrollMaximumY) const
 
void initialize (TFinalClass *listBox, LayoutSharedPtr layout)
 
bool isStateChanged ()
 Checks whether the layout state of the presenter has changed. More...
 
 ListBoxGridPresenter ()
 
void notifyItemAdded (size_t)
 Invalidates layout if an item is added. More...
 
void notifyItemContainerChanged ()
 Invalidates layout if the item container is changed. More...
 
void notifyItemRemoved (size_t)
 Invalidates layout if an item is removed. More...
 
void notifyItemReplaced (size_t)
 Invalidates layout if an item is replaced. More...
 
void removeFromLayout (ItemSharedPtr listBoxItem)
 
void scrollDirectionMessageHandler (ScrollViewConcept::ScrollDirectionMessageArguments &arguments)
 
void scrollEdgeMessageHandler (ScrollViewConcept::ScrollEdgeMessageArguments &arguments)
 
void scrollPage (ScrollViewConcept::ScrollPage direction)
 Sets scroll delta to one page and starts scrolling to that direction. More...
 
void scrollPageMessageHandler (ScrollViewConcept::ScrollPageMessageArguments &arguments)
 
void scrollToDirection (ScrollViewConcept::ScrollDirection direction)
 Sets scroll delta to one item and starts scrolling to that direction. More...
 
void scrollToEdge (ScrollViewConcept::ScrollEdge direction)
 Sets scroll target to content edge and starts scrolling to that direction. More...
 
void setScroll (Vector2 scroll)
 
void snap (Vector2 position, Vector2, bool, Vector2 *out_position, int *out_itemIndex)
 
void update ()
 
void updateOffsetProperties ()
 Calculates the values of the Node::VisibleAmountInParentProperty and GridListBoxConcept::CalculatedOffsetProperty properties for items in the Grid List Box. More...
 
void updateRenderTransform (Vector2 scroll)
 Updates scroll transform of layout. More...
 
void updateScrollViewBounds ()
 
- Public Member Functions inherited from kanzi::ListBoxScrollPresenterConceptImpl< ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >, TFinalClass, TScrollView >
ScrollViewSharedPtr getScrollView () const
 Returns the Scroll View that the presenter uses. More...
 
void initialize (TFinalClass *listBox)
 ListBoxScrollPresenterConceptImpl specific initialization. More...
 
 ListBoxScrollPresenterConceptImpl ()=default
 Constructor. More...
 

Static Public Member Functions

static void doRemeasure (Node3D &node)
 
static void doRemeasure (Node2D &node)
 
static void doUpdateRenderTransform (Node3D &node, Vector2 scroll)
 
static void doUpdateRenderTransform (Node2D &node, Vector2 scroll)
 

Additional Inherited Members

- Protected Member Functions inherited from kanzi::ListBoxScrollPresenterConceptImpl< ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >, TFinalClass, TScrollView >
void onClickBegin (ClickManipulator::ClickBeginMessageArguments &messageArguments)
 Handles ClickManipulator::onClickBeginMessage. More...
 
void onItemSelected (ListBoxConcept::ItemSelectedMessageArguments &messageArguments)
 Handles ListBoxConcept::ItemSelectedMessage. More...
 
void onScrolled (ScrollViewConcept::ScrolledMessageArguments &messageArguments)
 Handles ScrollViewClass::ScrolledMessage. More...
 
void onScrollFinished (ScrollViewConcept::ScrollFinishedMessageArguments &messageArguments)
 Handles ScrollViewClass::ScrollFinishedMessage. More...
 
void onScrollStarted (ScrollViewConcept::ScrollStartedMessageArguments &messageArguments)
 Handles ScrollViewClass::ScrollStartedMessage. More...
 
void onSnapRequested (ScrollViewConcept::SnapRequestMessageArguments &messageArguments)
 Handles ScrollViewClass::SnapRequestMessage. More...
 
void onUserScrollFinished (ScrollViewConcept::UserScrollFinishedMessageArguments &messageArguments)
 Handles ScrollViewClass::UserScrollFinishedMessage. More...
 
void onUserScrollStarted (ScrollViewConcept::UserScrollStartedMessageArguments &messageArguments)
 Handles ScrollViewClass::UserScrollStartedMessage. More...
 
void scrollToTargetItem (size_t itemIndex, Vector2 scrollPosition, bool smooth) const
 Requests Scroll View to scroll to target item position. More...
 
void sendListBoxTargetChangedMessage (size_t targetItem) const
 Sends ListBoxScrollPresenterConcept::TargetChangedMessage message to List Box. More...
 
void sendScrollViewSetScrollMessage (const Vector2 &scrollPosition) const
 Sends ScrollViewConcept::SetScrollMessage message to Scroll View. More...
 
void sendScrollViewSetScrollTargetMessage (const Vector2 &scrollTarget) const
 Sends ScrollViewConcept::SetScrollTargetMessage message to Scroll View. More...
 
- Protected Attributes inherited from kanzi::ListBoxScrollPresenterConceptImpl< ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >, TFinalClass, TScrollView >
TFinalClass * m_listBox
 List Box that owns this presenter. More...
 

Member Typedef Documentation

◆ ListBoxGridPresenterType

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
using kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::ListBoxGridPresenterType = ListBoxGridPresenter<TFinalClass, TLayout, TItemClass, TScrollView>

◆ BaseClass

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
using kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::BaseClass = ListBoxScrollPresenterConceptImpl<ListBoxGridPresenterType, TFinalClass, TScrollView>

◆ LayoutSharedPtr

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
using kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::LayoutSharedPtr = shared_ptr<TLayout>

◆ ItemSharedPtr

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
using kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::ItemSharedPtr = shared_ptr<TItemClass>

◆ ScrollViewSharedPtr

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
using kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::ScrollViewSharedPtr = shared_ptr<TScrollView>

Constructor & Destructor Documentation

◆ ListBoxGridPresenter()

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

Member Function Documentation

◆ initialize()

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

◆ enableKeyNavigation()

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

Enables directional key navigation on the Grid Presenter.

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

◆ scrollDirectionMessageHandler()

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::scrollDirectionMessageHandler ( ScrollViewConcept::ScrollDirectionMessageArguments arguments)
inline

◆ scrollPageMessageHandler()

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::scrollPageMessageHandler ( ScrollViewConcept::ScrollPageMessageArguments arguments)
inline

◆ scrollEdgeMessageHandler()

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::scrollEdgeMessageHandler ( ScrollViewConcept::ScrollEdgeMessageArguments arguments)
inline

◆ scrollToDirection()

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::scrollToDirection ( ScrollViewConcept::ScrollDirection  direction)
inline

Sets scroll delta to one item and starts scrolling to that direction.

Parameters
directionScroll direction.

◆ scrollPage()

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::scrollPage ( ScrollViewConcept::ScrollPage  direction)
inline

Sets scroll delta to one page and starts scrolling to that direction.

Parameters
directionScroll direction.

◆ scrollToEdge()

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::scrollToEdge ( ScrollViewConcept::ScrollEdge  direction)
inline

Sets scroll target to content edge and starts scrolling to that direction.

Parameters
directionScroll direction.

◆ notifyItemAdded()

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

Invalidates layout if an item is added.

◆ notifyItemRemoved()

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

Invalidates layout if an item is removed.

◆ notifyItemReplaced()

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

Invalidates layout if an item is replaced.

◆ notifyItemContainerChanged()

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

Invalidates layout if the item container is changed.

◆ doRemeasure() [1/2]

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
static void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::doRemeasure ( Node3D node)
inlinestatic

◆ doRemeasure() [2/2]

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
static void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::doRemeasure ( Node2D node)
inlinestatic

◆ update()

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

◆ updateScrollViewBounds()

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::updateScrollViewBounds ( )
inline

◆ updateOffsetProperties()

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::updateOffsetProperties ( )
inline

Calculates the values of the Node::VisibleAmountInParentProperty and GridListBoxConcept::CalculatedOffsetProperty properties for items in the Grid List Box.

◆ isStateChanged()

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
bool kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::isStateChanged ( )
inline

Checks whether the layout state of the presenter has changed.

If the layout state of the presenter has changed, returns KZ_TRUE.

◆ getScrollBounds()

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::getScrollBounds ( float *  out_scrollMinimumX,
float *  out_scrollMaximumX,
float *  out_scrollMinimumY,
float *  out_scrollMaximumY 
) const
inline

◆ deduceSkippedOffset()

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
Vector2 kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::deduceSkippedOffset ( ) const
inline

Calculates how much offset is being skipped by skipping non-visible items.

◆ doUpdateRenderTransform() [1/2]

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
static void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::doUpdateRenderTransform ( Node3D node,
Vector2  scroll 
)
inlinestatic

◆ doUpdateRenderTransform() [2/2]

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
static void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::doUpdateRenderTransform ( Node2D node,
Vector2  scroll 
)
inlinestatic

◆ updateRenderTransform()

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::updateRenderTransform ( Vector2  scroll)
inline

Updates scroll transform of layout.

◆ getItem()

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
ItemSharedPtr kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::getItem ( size_t  presenterIndex) const
inline

◆ addToLayout()

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

◆ removeFromLayout()

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

◆ snap()

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

◆ setScroll()

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

◆ bringItemCenter() [1/2]

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
Vector2 kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::bringItemCenter ( size_t  selection) const
inline

◆ bringItemCenter() [2/2]

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

◆ getColumnCount()

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
unsigned int kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::getColumnCount ( ) const
inline

Gets the number of columns that are currently displayed.

Returns
Returns the number of columns.

◆ getRowCount()

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
unsigned int kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::getRowCount ( ) const
inline

Gets the number of rows that are currently displayed.

Returns
Returns the number of rows.

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