Kanzi 3.9.10
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.
 
void initialize (TListBoxClass *listBox)
 ListBoxScrollPresenterConceptImpl specific initialization.
 
 ListBoxScrollPresenterConceptImpl ()=default
 Constructor.
 

Protected Member Functions

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

TListBoxClassm_listBox
 List Box that owns this presenter.
 

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()

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

Constructor.

Member Function Documentation

◆ initialize()

ListBoxScrollPresenterConceptImpl specific initialization.

Parameters
listBoxThe List Box that owns this presenter.

◆ getScrollView()

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()

Handles ScrollViewClass::ScrolledMessage.

◆ onScrollStarted()

Handles ScrollViewClass::ScrollStartedMessage.

◆ onScrollFinished()

Handles ScrollViewClass::ScrollFinishedMessage.

◆ onUserScrollStarted()

Handles ScrollViewClass::UserScrollStartedMessage.

◆ onUserScrollFinished()

Handles ScrollViewClass::UserScrollFinishedMessage.

◆ onSnapRequested()

Handles ScrollViewClass::SnapRequestMessage.

◆ onClickBegin()

Handles ClickManipulator::onClickBeginMessage.

◆ onItemSelected()

◆ 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()

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()

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()

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

List Box that owns this presenter.


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