kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView > Class Template Reference

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

Public Types

typedef shared_ptr< TLayout > LayoutSharedPtr
 
typedef shared_ptr< TItemClass > ItemSharedPtr
 
typedef shared_ptr< TScrollView > ScrollViewSharedPtr
 

Public Member Functions

 ListBoxGridPresenter ()
 
void initialize (TFinalClass *listBox, LayoutSharedPtr layout)
 
void scrollDirectionMessageHandler (ScrollViewConcept::ScrollDirectionMessageArguments &arguments)
 
void scrollPageMessageHandler (ScrollViewConcept::ScrollPageMessageArguments &arguments)
 
void scrollEdgeMessageHandler (ScrollViewConcept::ScrollEdgeMessageArguments &arguments)
 
void onKeyDown (Keyboard::KeyDownMessageArguments &arguments)
 Handles key down event. More...
 
void scroll (ScrollViewConcept::ScrollDirection direction)
 Sets scroll delta to one item and starts scrolling to that direction. More...
 
void scroll (ScrollViewConcept::ScrollPage direction)
 Sets scroll delta to one page and starts scrolling to that direction. More...
 
void scroll (ScrollViewConcept::ScrollEdge direction)
 Sets scroll target to content edge and starts scrolling to that direction. More...
 
void notifyItemAdded (size_t)
 Invalidates layout if an item is added. 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 notifyItemContainerChanged ()
 Invalidates layout if the item container is changed. More...
 
void update ()
 
void updateScrollViewBounds ()
 
void updateOffsetProperties ()
 Calculates properties VisibleAmountInParent and GridListBoxOffset for objects in the grid list box. More...
 
bool isStateChanged ()
 Returns KZ_TRUE if presenter's layout state has changed. More...
 
void getScrollBounds (float *out_scrollMinimumX, float *out_scrollMaximumX, float *out_scrollMinimumY, float *out_scrollMaximumY) const
 
Vector2 deduceSkippedOffset () const
 Calculates how much offset is being skipped by skipping non-visible items. More...
 
void updateRenderTransform (Vector2 scroll)
 Updates scroll transform of layout. More...
 
ItemSharedPtr getItem (size_t presenterIndex) const
 
void addToLayout (ItemSharedPtr listBoxItem)
 
void removeFromLayout (ItemSharedPtr listBoxItem)
 
void snap (Vector2 position, Vector2, bool, Vector2 *out_position, int *out_itemIndex)
 
void setScroll (Vector2 scroll)
 
Vector2 bringItemCenter (size_t selection) const
 
size_t getColumnCount () const
 Gets the number of columns that are currently displayed. More...
 
size_t getRowCount () const
 Gets the number of rows that are currently displayed. 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)
 

Member Typedef Documentation

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
typedef shared_ptr<TLayout> kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::LayoutSharedPtr
template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
typedef shared_ptr<TItemClass> kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::ItemSharedPtr
template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
typedef shared_ptr<TScrollView> kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::ScrollViewSharedPtr

Constructor & Destructor Documentation

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

Member Function Documentation

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::initialize ( TFinalClass *  listBox,
LayoutSharedPtr  layout 
)
inline
template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::scrollDirectionMessageHandler ( ScrollViewConcept::ScrollDirectionMessageArguments arguments)
inline
template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::scrollPageMessageHandler ( ScrollViewConcept::ScrollPageMessageArguments arguments)
inline
template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::scrollEdgeMessageHandler ( ScrollViewConcept::ScrollEdgeMessageArguments arguments)
inline
template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::onKeyDown ( Keyboard::KeyDownMessageArguments arguments)
inline

Handles key down event.

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

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

Parameters
directionScroll direction.
template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::scroll ( ScrollViewConcept::ScrollPage  direction)
inline

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

Parameters
directionScroll direction.
template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::scroll ( ScrollViewConcept::ScrollEdge  direction)
inline

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

Parameters
directionScroll direction.
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.

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.

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.

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.

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

Calculates properties VisibleAmountInParent and GridListBoxOffset for objects in the grid list box.

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

Returns KZ_TRUE if presenter's layout state has changed.

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
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.

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
static void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::doUpdateRenderTransform ( Node3D node,
Vector2  scroll 
)
inlinestatic
template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
static void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::doUpdateRenderTransform ( Node2D node,
Vector2  scroll 
)
inlinestatic
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.

template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
ItemSharedPtr kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::getItem ( size_t  presenterIndex) const
inline
template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::addToLayout ( ItemSharedPtr  listBoxItem)
inline
template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::removeFromLayout ( ItemSharedPtr  listBoxItem)
inline
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
template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
void kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::setScroll ( Vector2  scroll)
inline
template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
Vector2 kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::bringItemCenter ( size_t  selection) const
inline
template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
size_t kanzi::ListBoxGridPresenter< TFinalClass, TLayout, TItemClass, TScrollView >::getColumnCount ( ) const
inline

Gets the number of columns that are currently displayed.

Returns
Returns the number of columns.
template<typename TFinalClass , typename TLayout , typename TItemClass , typename TScrollView >
size_t 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: