Tizen Native API
4.0
|
ScrollView contains actors that can be scrolled manually (via touch) or automatically. More...
Classes | |
struct | ClampEvent |
Clamps signal event's data. More... | |
struct | Property |
Enumeration for the instance of properties belonging to the ScrollView class. More... | |
struct | SnapEvent |
Snaps signal event's data. More... | |
Public Types | |
enum | PropertyRange |
Enumeration for the start and end property ranges for this control. More... | |
typedef Signal< void(const SnapEvent &) > | SnapStartedSignalType |
SnapStarted signal type. | |
Public Member Functions | |
ScrollView () | |
Creates an empty ScrollView handle. | |
ScrollView (const ScrollView &handle) | |
Copy constructor. | |
ScrollView & | operator= (const ScrollView &handle) |
Assignment operator. | |
~ScrollView () | |
Destructor. | |
AlphaFunction | GetScrollSnapAlphaFunction () const |
Gets snap-animation's AlphaFunction. | |
void | SetScrollSnapAlphaFunction (AlphaFunction alpha) |
Sets snap-animation's AlphaFunction. | |
AlphaFunction | GetScrollFlickAlphaFunction () const |
Gets flick-animation's AlphaFunction. | |
void | SetScrollFlickAlphaFunction (AlphaFunction alpha) |
Sets flick-animation's AlphaFunction. | |
float | GetScrollSnapDuration () const |
Gets the time for the scroll snap-animation. | |
void | SetScrollSnapDuration (float time) |
Sets the time for the scroll snap-animation. | |
float | GetScrollFlickDuration () const |
Gets the time for the scroll flick-animation. | |
void | SetScrollFlickDuration (float time) |
Sets the time for the scroll flick-animation. | |
void | SetRulerX (RulerPtr ruler) |
Sets X axis ruler. | |
void | SetRulerY (RulerPtr ruler) |
Sets Y axis ruler. | |
void | SetScrollSensitive (bool sensitive) |
Sets scroll sensitivity of pan gesture. | |
void | SetMaxOvershoot (float overshootX, float overshootY) |
Sets maximum overshoot amount. | |
void | SetSnapOvershootAlphaFunction (AlphaFunction alpha) |
Sets Snap Overshoot animation's AlphaFunction. | |
void | SetSnapOvershootDuration (float duration) |
Sets Snap Overshoot animation's Duration. | |
void | SetActorAutoSnap (bool enable) |
Enables or Disables Actor Auto-Snap mode. | |
void | SetWrapMode (bool enable) |
Enables or Disables Wrap mode for ScrollView contents. | |
int | GetScrollUpdateDistance () const |
Gets the current distance needed to scroll for ScrollUpdatedSignal to be emitted. | |
void | SetScrollUpdateDistance (int distance) |
Sets the distance needed to scroll for ScrollUpdatedSignal to be emitted. | |
bool | GetAxisAutoLock () const |
Returns state of Axis Auto Lock mode. | |
void | SetAxisAutoLock (bool enable) |
Enables or Disables Axis Auto Lock mode for panning within the ScrollView. | |
float | GetAxisAutoLockGradient () const |
Gets the gradient threshold at which a panning gesture should be locked to the Horizontal or Vertical axis. | |
void | SetAxisAutoLockGradient (float gradient) |
Sets the gradient threshold at which a panning gesture should be locked to the Horizontal or Vertical axis. | |
float | GetFrictionCoefficient () const |
Gets the friction coefficient setting for ScrollView when flicking in free panning mode. | |
void | SetFrictionCoefficient (float friction) |
Sets the friction coefficient for ScrollView when flicking in free panning mode. | |
float | GetFlickSpeedCoefficient () const |
Gets the flick speed coefficient for ScrollView when flicking in free panning mode. | |
void | SetFlickSpeedCoefficient (float speed) |
Sets the flick speed coefficient for ScrollView when flicking in free panning mode. | |
Vector2 | GetMinimumDistanceForFlick () const |
Returns the minimum pan distance required for a flick gesture in pixels. | |
void | SetMinimumDistanceForFlick (const Vector2 &distance) |
Sets the minimum pan distance required for a flick in pixels. | |
float | GetMinimumSpeedForFlick () const |
Returns the minimum pan speed required for a flick gesture in pixels per second. | |
void | SetMinimumSpeedForFlick (float speed) |
Sets the minimum pan speed required for a flick in pixels per second. | |
float | GetMaxFlickSpeed () const |
Gets the maximum flick speed setting for ScrollView when flicking in free panning mode. | |
void | SetMaxFlickSpeed (float speed) |
Sets the maximum flick speed for the ScrollView when flicking in free panning mode. | |
Vector2 | GetWheelScrollDistanceStep () const |
Gets the step of scroll distance in actor coordinates for each wheel event received in free panning mode. | |
void | SetWheelScrollDistanceStep (Vector2 step) |
Sets the step of scroll distance in actor coordinates for each wheel event received in free panning mode. | |
Vector2 | GetCurrentScrollPosition () const |
Retrieves current scroll position. | |
unsigned int | GetCurrentPage () const |
Retrieves current scroll page based on ScrollView dimensions being the size of one page, and all pages laid out in a grid fashion, increasing from left to right until the end of the X-domain. | |
void | ScrollTo (const Vector2 &position) |
Scrolls View to position specified (contents will scroll to this position). | |
void | ScrollTo (const Vector2 &position, float duration) |
Scrolls View to position specified (contents will scroll to this position). | |
void | ScrollTo (const Vector2 &position, float duration, AlphaFunction alpha) |
Scrolls View to position specified (contents will scroll to this position). | |
void | ScrollTo (const Vector2 &position, float duration, DirectionBias horizontalBias, DirectionBias verticalBias) |
Scrolls View to position specified (contents will scroll to this position). | |
void | ScrollTo (const Vector2 &position, float duration, AlphaFunction alpha, DirectionBias horizontalBias, DirectionBias verticalBias) |
Scrolls View to position specified (contents will scroll to this position). | |
void | ScrollTo (unsigned int page) |
Scrolls View to page currently based on assumption that each page is "(page) * ScrollViewSize.width, 0". | |
void | ScrollTo (unsigned int page, float duration) |
Scrolls View to page currently based on assumption that each page is "(page) * ScrollViewSize.width, 0". | |
void | ScrollTo (unsigned int page, float duration, DirectionBias bias) |
Scrolls View to page currently based on assumption that each page is "(page) * ScrollViewSize.width, 0". | |
void | ScrollTo (Actor &actor) |
Scrolls View such that actor appears in the center of the ScrollView. | |
void | ScrollTo (Actor &actor, float duration) |
Scrolls View such that actor appears in the center of the ScrollView. | |
bool | ScrollToSnapPoint () |
Scrolls View to the nearest snap points as specified by the Rulers. | |
void | ApplyConstraintToChildren (Constraint constraint) |
Applies a constraint that will affect the children of ScrollView. | |
void | RemoveConstraintsFromChildren () |
Removes all constraints that will affect the children of ScrollView. | |
void | ApplyEffect (ScrollViewEffect effect) |
Applies Effect to ScrollView. | |
void | RemoveEffect (ScrollViewEffect effect) |
Removes Effect from ScrollView. | |
void | RemoveAllEffects () |
Remove All Effects from ScrollView. | |
void | BindActor (Actor child) |
Binds actor to this ScrollView. | |
void | UnbindActor (Actor child) |
Unbinds Actor from this ScrollView. | |
void | SetScrollingDirection (Radian direction, Radian threshold=PanGestureDetector::DEFAULT_THRESHOLD) |
Allows the user to constrain the scroll view in a particular direction. | |
void | RemoveScrollingDirection (Radian direction) |
Removes a direction constraint from the scroll view. | |
SnapStartedSignalType & | SnapStartedSignal () |
Signal emitted when the ScrollView has started to snap or flick (it tells the target position, scale, rotation for the snap or flick). | |
Static Public Member Functions | |
static ScrollView | New () |
Creates an initialized ScrollView. | |
static ScrollView | DownCast (BaseHandle handle) |
Downcasts a handle to ScrollView handle. |
ScrollView contains actors that can be scrolled manually (via touch) or automatically.
Signals | Signal Name | Method | |-------------------|----------------------------| | snap-started | SnapStartedSignal() |
typedef Signal< void ( const SnapEvent& ) > Dali::Toolkit::ScrollView::SnapStartedSignalType |
SnapStarted signal type.
Enumeration for the start and end property ranges for this control.
Reimplemented from Dali::Toolkit::Scrollable.
Creates an empty ScrollView handle.
Dali::Toolkit::ScrollView::ScrollView | ( | const ScrollView & | handle | ) |
Copy constructor.
Creates another handle that points to the same real object.
[in] | handle | Handle to copy from |
Destructor.
This is non-virtual since derived Handle types must not contain data or virtual methods.
void Dali::Toolkit::ScrollView::ApplyConstraintToChildren | ( | Constraint | constraint | ) |
Applies a constraint that will affect the children of ScrollView.
[in] | constraint | The constraint to apply |
void Dali::Toolkit::ScrollView::ApplyEffect | ( | ScrollViewEffect | effect | ) |
Applies Effect to ScrollView.
[in] | effect | The effect to apply to scroll view |
void Dali::Toolkit::ScrollView::BindActor | ( | Actor | child | ) |
Binds actor to this ScrollView.
Once an actor is bound to a ScrollView, it will be subject to that ScrollView's properties.
[in] | child | The actor to add to this ScrollView |
static ScrollView Dali::Toolkit::ScrollView::DownCast | ( | BaseHandle | handle | ) | [static] |
Downcasts a handle to ScrollView handle.
If handle points to a ScrollView, the downcast produces valid handle. If not, the returned handle is left uninitialized.
[in] | handle | Handle to an object |
Reimplemented from Dali::Toolkit::Scrollable.
bool Dali::Toolkit::ScrollView::GetAxisAutoLock | ( | ) | const |
Returns state of Axis Auto Lock mode.
float Dali::Toolkit::ScrollView::GetAxisAutoLockGradient | ( | ) | const |
Gets the gradient threshold at which a panning gesture should be locked to the Horizontal or Vertical axis.
unsigned int Dali::Toolkit::ScrollView::GetCurrentPage | ( | ) | const |
Retrieves current scroll page based on ScrollView dimensions being the size of one page, and all pages laid out in a grid fashion, increasing from left to right until the end of the X-domain.
Retrieves current scroll position.
float Dali::Toolkit::ScrollView::GetFlickSpeedCoefficient | ( | ) | const |
Gets the flick speed coefficient for ScrollView when flicking in free panning mode.
This is a constant which multiplies the input touch flick velocity to determine the actual velocity at which to move the scrolling area.
float Dali::Toolkit::ScrollView::GetFrictionCoefficient | ( | ) | const |
Gets the friction coefficient setting for ScrollView when flicking in free panning mode.
This is a value in stage-diagonals per second^2. stage-diagonal = Length( stage.width, stage.height )
float Dali::Toolkit::ScrollView::GetMaxFlickSpeed | ( | ) | const |
Gets the maximum flick speed setting for ScrollView when flicking in free panning mode.
This is a value in stage-diagonals per second. stage-diagonal = Length( stage.width, stage.height )
Returns the minimum pan distance required for a flick gesture in pixels.
float Dali::Toolkit::ScrollView::GetMinimumSpeedForFlick | ( | ) | const |
Returns the minimum pan speed required for a flick gesture in pixels per second.
Gets flick-animation's AlphaFunction.
float Dali::Toolkit::ScrollView::GetScrollFlickDuration | ( | ) | const |
Gets the time for the scroll flick-animation.
This animation occurs when the user flicks scroll view.
Gets snap-animation's AlphaFunction.
float Dali::Toolkit::ScrollView::GetScrollSnapDuration | ( | ) | const |
Gets the time for the scroll snap-animation.
This animation occurs when the user drags, and releases.
int Dali::Toolkit::ScrollView::GetScrollUpdateDistance | ( | ) | const |
Gets the current distance needed to scroll for ScrollUpdatedSignal to be emitted.
Gets the step of scroll distance in actor coordinates for each wheel event received in free panning mode.
static ScrollView Dali::Toolkit::ScrollView::New | ( | ) | [static] |
Creates an initialized ScrollView.
Reimplemented from Dali::Toolkit::Control.
ScrollView& Dali::Toolkit::ScrollView::operator= | ( | const ScrollView & | handle | ) |
Assignment operator.
Changes this handle to point to another real object.
[in] | handle | The handle to copy from |
Remove All Effects from ScrollView.
Removes all constraints that will affect the children of ScrollView.
void Dali::Toolkit::ScrollView::RemoveEffect | ( | ScrollViewEffect | effect | ) |
Removes Effect from ScrollView.
[in] | effect | The effect to remove |
void Dali::Toolkit::ScrollView::RemoveScrollingDirection | ( | Radian | direction | ) |
Removes a direction constraint from the scroll view.
[in] | direction | The axis to stop constraining to. Usually will be PanGestureDetector::DIRECTION_VERTICAL or PanGestureDetector::DIRECTION_HORIZONTAL (but can be any other angle if desired). |
void Dali::Toolkit::ScrollView::ScrollTo | ( | const Vector2 & | position | ) |
Scrolls View to position specified (contents will scroll to this position).
Position 0,0 is the origin. Increasing X scrolls contents left, while increasing Y scrolls contents up.
[in] | position | The position to scroll to |
void Dali::Toolkit::ScrollView::ScrollTo | ( | const Vector2 & | position, |
float | duration | ||
) |
Scrolls View to position specified (contents will scroll to this position).
Position 0,0 is the origin. Increasing X scrolls contents left, while increasing Y scrolls contents up.
[in] | position | The position to scroll to |
[in] | duration | The duration of the animation in seconds |
void Dali::Toolkit::ScrollView::ScrollTo | ( | const Vector2 & | position, |
float | duration, | ||
AlphaFunction | alpha | ||
) |
Scrolls View to position specified (contents will scroll to this position).
Position 0,0 is the origin. Increasing X scrolls contents left, while increasing Y scrolls contents up.
[in] | position | The position to scroll to |
[in] | duration | The duration of the animation in seconds |
[in] | alpha | The alpha function to use |
void Dali::Toolkit::ScrollView::ScrollTo | ( | const Vector2 & | position, |
float | duration, | ||
DirectionBias | horizontalBias, | ||
DirectionBias | verticalBias | ||
) |
Scrolls View to position specified (contents will scroll to this position).
Position 0,0 is the origin. Increasing X scrolls contents left, while increasing Y scrolls contents up.
[in] | position | The position to scroll to |
[in] | duration | The duration of the animation in seconds |
[in] | horizontalBias | Whether to bias scrolling to left or right |
[in] | verticalBias | Whether to bias scrolling to top or bottom |
void Dali::Toolkit::ScrollView::ScrollTo | ( | const Vector2 & | position, |
float | duration, | ||
AlphaFunction | alpha, | ||
DirectionBias | horizontalBias, | ||
DirectionBias | verticalBias | ||
) |
Scrolls View to position specified (contents will scroll to this position).
Position 0,0 is the origin. Increasing X scrolls contents left, while increasing Y scrolls contents up.
[in] | position | The position to scroll to |
[in] | duration | The duration of the animation in seconds |
[in] | horizontalBias | Whether to bias scrolling to left or right |
[in] | verticalBias | Whether to bias scrolling to top or bottom |
[in] | alpha | Alpha function to use |
void Dali::Toolkit::ScrollView::ScrollTo | ( | unsigned int | page | ) |
Scrolls View to page currently based on assumption that each page is "(page) * ScrollViewSize.width, 0".
[in] | page | The page to scroll to |
void Dali::Toolkit::ScrollView::ScrollTo | ( | unsigned int | page, |
float | duration | ||
) |
Scrolls View to page currently based on assumption that each page is "(page) * ScrollViewSize.width, 0".
[in] | page | The page to scroll to |
[in] | duration | The duration of the animation in seconds |
void Dali::Toolkit::ScrollView::ScrollTo | ( | unsigned int | page, |
float | duration, | ||
DirectionBias | bias | ||
) |
Scrolls View to page currently based on assumption that each page is "(page) * ScrollViewSize.width, 0".
[in] | page | The page to scroll to |
[in] | duration | The duration of the animation in seconds |
[in] | bias | Whether to bias scrolling to left or right |
void Dali::Toolkit::ScrollView::ScrollTo | ( | Actor & | actor | ) |
Scrolls View such that actor appears in the center of the ScrollView.
[in] | actor | The actor to center in on (via Scrolling) |
void Dali::Toolkit::ScrollView::ScrollTo | ( | Actor & | actor, |
float | duration | ||
) |
Scrolls View such that actor appears in the center of the ScrollView.
[in] | actor | The actor to center in on (via Scrolling) |
[in] | duration | The duration of the animation in seconds |
Scrolls View to the nearest snap points as specified by the Rulers.
If already at snap points, then will return false, and not scroll.
void Dali::Toolkit::ScrollView::SetActorAutoSnap | ( | bool | enable | ) |
Enables or Disables Actor Auto-Snap mode.
When Actor Auto-Snap mode has been enabled, ScrollView will automatically snap to the closest actor (The closest actor will appear in the center of the ScrollView).
[in] | enable | Enables (true), or disables (false) Actor AutoSnap |
void Dali::Toolkit::ScrollView::SetAxisAutoLock | ( | bool | enable | ) |
Enables or Disables Axis Auto Lock mode for panning within the ScrollView.
When enabled, any pan gesture that appears mostly horizontal or mostly vertical, will be automatically restricted to horizontal only or vertical only panning, until the pan gesture has completed.
[in] | enable | Enables (true), or disables (false) AxisAutoLock mode |
void Dali::Toolkit::ScrollView::SetAxisAutoLockGradient | ( | float | gradient | ) |
Sets the gradient threshold at which a panning gesture should be locked to the Horizontal or Vertical axis.
By default, this is 0.36 (0.36:1) which means angles less than 20 degrees to an axis will lock to that axis.
[in] | gradient | A value between 0.0 and 1.0 (auto-lock for all angles) |
void Dali::Toolkit::ScrollView::SetFlickSpeedCoefficient | ( | float | speed | ) |
Sets the flick speed coefficient for ScrollView when flicking in free panning mode.
This is a constant which multiplies the input touch flick velocity to determine the actual velocity at which to move the scrolling area.
[in] | speed | The flick speed coefficient (default = 1.0) |
void Dali::Toolkit::ScrollView::SetFrictionCoefficient | ( | float | friction | ) |
Sets the friction coefficient for ScrollView when flicking in free panning mode.
This is a value in stage-diagonals per second^2. stage-diagonal = Length( stage.width, stage.height ). example: A stage 480x800 in size has a diagonal length of 933. Friction coefficient of 1.0 means the swipe velocity will reduce by 1.0 * 933 pixels/sec^2.
[in] | friction | Friction coefficient must be greater than 0.0 (default = 1.0) |
void Dali::Toolkit::ScrollView::SetMaxFlickSpeed | ( | float | speed | ) |
Sets the maximum flick speed for the ScrollView when flicking in free panning mode.
This is a value in stage-diagonals per second. stage-diagonal = Length( stage.width, stage.height ) example: A stage 480x800 in size has a diagonal length of 933. Max Flick speed of 1.0 means the maximum velocity of a swipe can be 1.0 * 933 pixels/sec.
[in] | speed | Maximum flick speed (default = 3.0) |
void Dali::Toolkit::ScrollView::SetMaxOvershoot | ( | float | overshootX, |
float | overshootY | ||
) |
Sets maximum overshoot amount.
The final overshoot value is within 0.0f to 1.0f, but the maximum overshoot is in pixels (e.g. if you scroll 75 pixels beyond the edge of a scrollable area and the maximum overshoot is 100 then the final overshoot value will be 0.75f).
[in] | overshootX | The maximum number of horizontally scrolled pixels before overshoot X reaches 1.0f |
[in] | overshootY | The maximum number of vertically scrolled pixels before overshoot Y reaches 1.0f |
void Dali::Toolkit::ScrollView::SetMinimumDistanceForFlick | ( | const Vector2 & | distance | ) |
Sets the minimum pan distance required for a flick in pixels.
Takes a Vector2 containing separate x and y values. As long as the pan distance exceeds one of these axes, a flick will be allowed.
[in] | distance | The minimum pan distance for a flick |
void Dali::Toolkit::ScrollView::SetMinimumSpeedForFlick | ( | float | speed | ) |
Sets the minimum pan speed required for a flick in pixels per second.
[in] | speed | The minimum pan speed for a flick |
void Dali::Toolkit::ScrollView::SetRulerX | ( | RulerPtr | ruler | ) |
Sets X axis ruler.
Defines how scrolling horizontally is snapped, and the boundary (domain) in which the ScrollView can pan.
[in] | ruler | The ruler to be used for the X axis |
void Dali::Toolkit::ScrollView::SetRulerY | ( | RulerPtr | ruler | ) |
Sets Y axis ruler.
Defines how scrolling vertically is snapped, and the boundary (domain) in which the ScrollView can pan.
[in] | ruler | The ruler to be used for the Y axis |
Sets flick-animation's AlphaFunction.
[in] | alpha | Easing alpha function of the flick animation |
void Dali::Toolkit::ScrollView::SetScrollFlickDuration | ( | float | time | ) |
Sets the time for the scroll flick-animation.
This animation occurs when the user flicks scroll view.
[in] | time | The time in seconds for the animation to take |
void Dali::Toolkit::ScrollView::SetScrollingDirection | ( | Radian | direction, |
Radian | threshold = PanGestureDetector::DEFAULT_THRESHOLD |
||
) |
Allows the user to constrain the scroll view in a particular direction.
[in] | direction | The axis to constrain the scroll-view to. Usually set to PanGestureDetector::DIRECTION_VERTICAL or PanGestureDetector::DIRECTION_HORIZONTAL (but can be any other angle if desired). |
[in] | threshold | The threshold to apply around the axis |
void Dali::Toolkit::ScrollView::SetScrollSensitive | ( | bool | sensitive | ) |
Sets scroll sensitivity of pan gesture.
[in] | sensitive | true to enable scroll, false to disable scrolling |
Sets snap-animation's AlphaFunction.
[in] | alpha | Easing alpha function of the snap animation |
void Dali::Toolkit::ScrollView::SetScrollSnapDuration | ( | float | time | ) |
Sets the time for the scroll snap-animation.
This animation occurs when the user drags, and releases.
[in] | time | The time in seconds for the animation to take |
void Dali::Toolkit::ScrollView::SetScrollUpdateDistance | ( | int | distance | ) |
Sets the distance needed to scroll for ScrollUpdatedSignal to be emitted.
The scroll update distance tells ScrollView how far to move before ScrollUpdatedSignal the informs application. Each time the ScrollView crosses this distance the signal will be emitted.
[in] | distance | The distance for ScrollView to move before emitting update signal |
Sets Snap Overshoot animation's AlphaFunction.
[in] | alpha | Easing alpha function of the overshoot snap animation |
void Dali::Toolkit::ScrollView::SetSnapOvershootDuration | ( | float | duration | ) |
Sets Snap Overshoot animation's Duration.
[in] | duration | The duration of the overshoot snap animation |
Sets the step of scroll distance in actor coordinates for each wheel event received in free panning mode.
[in] | step | The step of scroll distance(pixel) in X and Y axes |
void Dali::Toolkit::ScrollView::SetWrapMode | ( | bool | enable | ) |
Enables or Disables Wrap mode for ScrollView contents.
When enabled, the ScrollView contents are wrapped over the X/Y Domain.
[in] | enable | Enables (true), or disables (false) Wrap Mode |
Signal emitted when the ScrollView has started to snap or flick (it tells the target position, scale, rotation for the snap or flick).
A callback of the following type may be connected:
void YourCallbackName(const SnapEvent& event);
void Dali::Toolkit::ScrollView::UnbindActor | ( | Actor | child | ) |
Unbinds Actor from this ScrollView.
Once Unbound, this ScrollView will not affect the actor.
[in] | child | The actor to be unbound |