Kanzi  3.9.5
Kanzi Engine API
kanzi::ListBoxScrollPresenterConceptImpl< TDerivedClass, TListBoxClass, TScrollView > Class Template Reference

ListBoxScrollPresenterConceptImpl is the base class concept implementation for the List Box presenters that use Scroll View in their presentation. More...

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

Public Member Functions

ScrollViewSharedPtr getScrollView () const
 Returns the Scroll View that the presenter uses. More...
 
void initialize (TListBoxClass *listBox)
 ListBoxScrollPresenterConceptImpl specific initialization. More...
 
 ListBoxScrollPresenterConceptImpl ()=default
 Constructor. More...
 

Protected Member Functions

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

TListBoxClass * m_listBox
 List Box that owns this presenter. More...
 

Detailed Description

template<typename TDerivedClass, typename TListBoxClass, typename TScrollView>
class kanzi::ListBoxScrollPresenterConceptImpl< TDerivedClass, TListBoxClass, TScrollView >

ListBoxScrollPresenterConceptImpl is the base class concept implementation for the List Box presenters that use Scroll View in their presentation.

TDerivedClass must implement:

  • void setScroll(Vector2 scroll)
  • void snap(Vector2 position, Vector2 direction , bool changeTarget, Vector2* out_position, int* out_itemIndex)
Since
Kanzi 3.9.0

Constructor & Destructor Documentation

◆ ListBoxScrollPresenterConceptImpl()

template<typename TDerivedClass, typename TListBoxClass, typename TScrollView>
kanzi::ListBoxScrollPresenterConceptImpl< TDerivedClass, TListBoxClass, TScrollView >::ListBoxScrollPresenterConceptImpl ( )
explicitdefault

Constructor.

Member Function Documentation

◆ initialize()

template<typename TDerivedClass , typename TListBoxClass, typename TScrollView >
void kanzi::ListBoxScrollPresenterConceptImpl< TDerivedClass, TListBoxClass, TScrollView >::initialize ( TListBoxClass *  listBox)

ListBoxScrollPresenterConceptImpl specific initialization.

Parameters
listBoxThe List Box that owns this presenter.

◆ getScrollView()

template<typename TDerivedClass , typename TListBoxClass , typename TScrollView >
ListBoxScrollPresenterConceptImpl< TDerivedClass, TListBoxClass, TScrollView >::ScrollViewSharedPtr kanzi::ListBoxScrollPresenterConceptImpl< TDerivedClass, TListBoxClass, TScrollView >::getScrollView ( ) const

Returns the Scroll View that the presenter uses.

Returns
The Scroll View that the presenter uses.

◆ onScrolled()

template<typename TDerivedClass , typename TListBoxClass , typename TScrollView >
void kanzi::ListBoxScrollPresenterConceptImpl< TDerivedClass, TListBoxClass, TScrollView >::onScrolled ( ScrollViewConcept::ScrolledMessageArguments messageArguments)
protected

Handles ScrollViewClass::ScrolledMessage.

◆ onScrollStarted()

template<typename TDerivedClass , typename TListBoxClass , typename TScrollView >
void kanzi::ListBoxScrollPresenterConceptImpl< TDerivedClass, TListBoxClass, TScrollView >::onScrollStarted ( ScrollViewConcept::ScrollStartedMessageArguments messageArguments)
protected

Handles ScrollViewClass::ScrollStartedMessage.

◆ onScrollFinished()

template<typename TDerivedClass , typename TListBoxClass , typename TScrollView >
void kanzi::ListBoxScrollPresenterConceptImpl< TDerivedClass, TListBoxClass, TScrollView >::onScrollFinished ( ScrollViewConcept::ScrollFinishedMessageArguments messageArguments)
protected

Handles ScrollViewClass::ScrollFinishedMessage.

◆ onUserScrollStarted()

template<typename TDerivedClass , typename TListBoxClass , typename TScrollView >
void kanzi::ListBoxScrollPresenterConceptImpl< TDerivedClass, TListBoxClass, TScrollView >::onUserScrollStarted ( ScrollViewConcept::UserScrollStartedMessageArguments messageArguments)
protected

Handles ScrollViewClass::UserScrollStartedMessage.

◆ onUserScrollFinished()

template<typename TDerivedClass , typename TListBoxClass , typename TScrollView >
void kanzi::ListBoxScrollPresenterConceptImpl< TDerivedClass, TListBoxClass, TScrollView >::onUserScrollFinished ( ScrollViewConcept::UserScrollFinishedMessageArguments messageArguments)
protected

Handles ScrollViewClass::UserScrollFinishedMessage.

◆ onSnapRequested()

template<typename TDerivedClass , typename TListBoxClass , typename TScrollView >
void kanzi::ListBoxScrollPresenterConceptImpl< TDerivedClass, TListBoxClass, TScrollView >::onSnapRequested ( ScrollViewConcept::SnapRequestMessageArguments messageArguments)
protected

Handles ScrollViewClass::SnapRequestMessage.

◆ onClickBegin()

template<typename TDerivedClass , typename TListBoxClass , typename TScrollView >
void kanzi::ListBoxScrollPresenterConceptImpl< TDerivedClass, TListBoxClass, TScrollView >::onClickBegin ( ClickManipulator::ClickBeginMessageArguments messageArguments)
protected

Handles ClickManipulator::onClickBeginMessage.

◆ onItemSelected()

template<typename TBaseClass , typename TDerivedClass , typename ListBoxTraits >
void kanzi::ListBoxScrollPresenterConceptImpl< TBaseClass, TDerivedClass, ListBoxTraits >::onItemSelected ( ListBoxConcept::ItemSelectedMessageArguments messageArguments)
protected

◆ scrollToTargetItem()

template<typename TBaseClass , typename TListBoxClass , typename TScrollView >
void kanzi::ListBoxScrollPresenterConceptImpl< TBaseClass, TListBoxClass, TScrollView >::scrollToTargetItem ( size_t  itemIndex,
Vector2  scrollPosition,
bool  smooth 
) const
protected

Requests Scroll View to scroll to target item position.

Parameters
itemIndexThe index of the List Box item that the presenter brings to the center of the list box area.
scrollPositionThe scroll target position for the Scroll View.
smoothFor animated scrolling, set to true. For immediate scrolling, set to false.

◆ sendScrollViewSetScrollTargetMessage()

template<typename TDerivedClass , typename TListBoxClass , typename TScrollView >
void kanzi::ListBoxScrollPresenterConceptImpl< TDerivedClass, TListBoxClass, TScrollView >::sendScrollViewSetScrollTargetMessage ( const Vector2 scrollTarget) const
protected

Sends ScrollViewConcept::SetScrollTargetMessage message to Scroll View.

Parameters
scrollTargetThe scroll target for the Scroll View.

◆ sendScrollViewSetScrollMessage()

template<typename TDerivedClass , typename TListBoxClass , typename TScrollView >
void kanzi::ListBoxScrollPresenterConceptImpl< TDerivedClass, TListBoxClass, TScrollView >::sendScrollViewSetScrollMessage ( const Vector2 scrollPosition) const
protected

Sends ScrollViewConcept::SetScrollMessage message to Scroll View.

Parameters
scrollPositionThe scroll position for the Scroll View.

◆ sendListBoxTargetChangedMessage()

template<typename TDerivedClass , typename TListBoxClass , typename TScrollView >
void kanzi::ListBoxScrollPresenterConceptImpl< TDerivedClass, TListBoxClass, TScrollView >::sendListBoxTargetChangedMessage ( size_t  targetItem) const
protected

Sends ListBoxScrollPresenterConcept::TargetChangedMessage message to List Box.

Parameters
targetItemNew scroll target item in a List Box.

Member Data Documentation

◆ m_listBox

template<typename TDerivedClass, typename TListBoxClass, typename TScrollView>
TListBoxClass* kanzi::ListBoxScrollPresenterConceptImpl< TDerivedClass, TListBoxClass, TScrollView >::m_listBox
protected

List Box that owns this presenter.


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