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

Concrete implementation of Ruler that has fixed snapping. More...

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

Public Member Functions

 FixedRuler (float spacing=1.0f)
 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 fixed snapping.

Since:
2.4, DALi version 1.0.0

Constructor & Destructor Documentation

Dali::Toolkit::FixedRuler::FixedRuler ( float  spacing = 1.0f)

Constructor.

Since:
2.4, DALi version 1.0.0
Parameters:
[in]spacingThe spacing between each interval on this ruler

Member Function Documentation

virtual unsigned int Dali::Toolkit::FixedRuler::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::FixedRuler::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::FixedRuler::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::FixedRuler::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.