Tizen Native API
5.0
|
Concrete implementation of Ruler that has fixed snapping. More...
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 |
Concrete implementation of Ruler that has fixed snapping.
Dali::Toolkit::FixedRuler::FixedRuler | ( | float | spacing = 1.0f | ) |
Constructor.
[in] | spacing | The spacing between each interval on this ruler |
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.
[in] | position | The position on the domain |
[in] | wrap | Enable wrap mode |
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.
[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::FixedRuler::GetTotalPages | ( | ) | const [virtual] |
Returns the total number of pages within this 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.
[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.