Tizen Native API  6.5
Dali::Toolkit::DefaultRuler Class Reference

Concrete implementation of Ruler that has no snapping and has one single page. More...

Inheritance diagram for Dali::Toolkit::DefaultRuler:
Dali::Toolkit::Ruler Dali::RefObject

Public Member Functions

 DefaultRuler ()
 DefaultRuler constructor.
virtual float Snap (float x, float bias) const
virtual float GetPositionFromPage (unsigned int page, unsigned int &volume, bool wrap) const
virtual unsigned int GetPageFromPosition (float position, bool wrap) const
virtual unsigned int GetTotalPages () const

Detailed Description

Concrete implementation of Ruler that has no snapping and has one single page.

Since:
2.4, DALi version 1.0.0

Constructor & Destructor Documentation

DefaultRuler constructor.

Since:
2.4, DALi version 1.0.0

Member Function Documentation

virtual unsigned int Dali::Toolkit::DefaultRuler::GetPageFromPosition ( float  position,
bool  wrap 
) const [virtual]

Returns page from position, based on whatever the ruler defines as a page.

If (wrap) is true, then will return a page wrapped within the domain.

Since:
2.4, DALi version 1.0.0
Parameters:
[in]positionThe position on the domain
[in]wrapEnable wrap mode
Returns:
The page where this position resides

Implements Dali::Toolkit::Ruler.

virtual float Dali::Toolkit::DefaultRuler::GetPositionFromPage ( unsigned int  page,
unsigned int &  volume,
bool  wrap 
) const [virtual]

Returns position from page, based on whatever the ruler defines as a page.

If (wrap) is true, then will set volume to the number of times page has exceeded the domain's volume (volume being the number of pages within the domain), while wrapping the position within the domain.

Since:
2.4, DALi version 1.0.0
Parameters:
[in]pageThe page index
[out]volumeThe overflow volume when the page exceeds the domain (wrap must be enabled)
[in]wrapEnable wrap mode
Returns:
The position representing this page point

Implements Dali::Toolkit::Ruler.

virtual unsigned int Dali::Toolkit::DefaultRuler::GetTotalPages ( ) const [virtual]

Returns the total number of pages within this Ruler.

Since:
2.4, DALi version 1.0.0
Returns:
The number of pages in the Ruler

Implements Dali::Toolkit::Ruler.

virtual float Dali::Toolkit::DefaultRuler::Snap ( float  x,
float  bias 
) const [virtual]

Snaps (x) in accordance to the ruler settings.

Since:
2.4, DALi version 1.0.0
Parameters:
[in]xThe input value on the ruler to be snapped
[in]bias(optional) The biasing employed for snapping 0 floor input (floor x) "Used for Flick Left" 0.5 round input (floor x + 0.5) "Used for Release" 1 ceil input (floor x + 1.0) "Used for Flick Right"
Returns:
The position of the one dimensional point passed in once snapped.

Implements Dali::Toolkit::Ruler.