Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CScroller Class Reference

#include <VisibleEffect.h>

Public Member Functions

 CScroller (unsigned int duration=200, std::shared_ptr< Tweener > tweener=std::shared_ptr< Tweener >())
 
 CScroller (const CScroller &right)
 
CScrolleroperator= (const CScroller &src)
 
 ~CScroller ()
 
void ScrollTo (float endPos)
 
void Stop ()
 
bool Update (unsigned int time)
 
float GetValue () const
 
void SetValue (float scrollValue)
 
bool IsScrolling () const
 
bool IsScrollingUp () const
 
bool IsScrollingDown () const
 
unsigned int GetDuration () const
 

Detailed Description

Class used to handle scrolling, allow using tweeners. Usage: start scrolling using ScrollTo() method / stop scrolling using Stop() method update scroll value each frame with current time using Update() method get/set scroll value using GetValue()/SetValue()

Constructor & Destructor Documentation

◆ CScroller() [1/2]

CScroller::CScroller ( unsigned int duration = 200,
std::shared_ptr< Tweener > tweener = std::shared_ptr<Tweener>() )

◆ CScroller() [2/2]

CScroller::CScroller ( const CScroller & right)

◆ ~CScroller()

CScroller::~CScroller ( )
default

Member Function Documentation

◆ GetDuration()

unsigned int CScroller::GetDuration ( ) const
inline

◆ GetValue()

float CScroller::GetValue ( ) const
inline

Value of scroll

◆ IsScrolling()

bool CScroller::IsScrolling ( ) const
inline

◆ IsScrollingDown()

bool CScroller::IsScrollingDown ( ) const
inline

◆ IsScrollingUp()

bool CScroller::IsScrollingUp ( ) const
inline

◆ operator=()

CScroller & CScroller::operator= ( const CScroller & src)

◆ ScrollTo()

void CScroller::ScrollTo ( float endPos)

Set target value scroller will be scrolling to

Parameters
endPostarget

◆ SetValue()

void CScroller::SetValue ( float scrollValue)
inline

◆ Stop()

void CScroller::Stop ( )
inline

Immediately stop scrolling

◆ Update()

bool CScroller::Update ( unsigned int time)

Update the scroller to where it would be at the given time point, calculating a new Value.

Parameters
timetime point
Returns
True if we are scrolling at given time point

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