Tizen Native API
4.0
|
Concrete implementation of Ruler that has no snapping and has one single page. More...
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 |
Concrete implementation of Ruler that has no snapping and has one single page.
DefaultRuler constructor.
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.
[in] | position | The position on the domain |
[in] | wrap | Enable wrap mode |
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.
[in] | page | The page index |
[out] | volume | The overflow volume when the page exceeds the domain (wrap must be enabled) |
[in] | wrap | Enable wrap mode |
Implements Dali::Toolkit::Ruler.
virtual unsigned int Dali::Toolkit::DefaultRuler::GetTotalPages | ( | ) | const [virtual] |
Returns the total number of pages within this 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.
[in] | x | The 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" |
Implements Dali::Toolkit::Ruler.