THuiInteractionInterval Class Reference
class THuiInteractionInterval
|
THuiInteractionInterval
is a utility class that can be used to determine the correct animation interval time, while taking into account how much time has elapsed since the last time the interval was determined.
An interaction interval is useful for example when animating a list selector. By default, the time interval for moving between two items could be 500 ms, but if the user moves faster than this, the selector's animation may be unnecessarily delayed. In this situation, the interaction interval would shorten the time interval for the moving animation, if necessary, to keep better in sync with how quickly the user is moving in the list.
Constructor & Destructor Documentation
THuiInteractionInterval(TReal32)
IMPORT_C
|
THuiInteractionInterval
|
(
|
TReal32
|
aScalar = 2.0f
|
)
|
|
Parameters
TReal32
aScalar = 2.0f
|
Determines how strongly the interval adapts.
|
Member Functions Documentation
Interval(TInt)
IMPORT_C
TInt
|
Interval
|
(
|
TInt
|
aIntervalTime
|
)
|
|
Evaluates the current interval. The evaluated interval will always be at least as large as the elapsed time since the last evaluation, but at most
aIntervalTime
.
SetScalar()
Parameters
TInt
aIntervalTime
|
The requested normal interval time.
|
Scalar()
Returns the current adapation scalar.
SetScalar(TReal32)
IMPORT_C void
|
SetScalar
|
(
|
TReal32
|
aScalar
|
)
|
|
Sets the adaptation scalar. Determines how strongly the interval will adapt to the elapsed time since the last evaluation.
For example, 1.0 would mean that the maximum interval time is the time elapsed between the current evaluation and the previous one. In this case, when the animation frequency stays the same, each sequence would have time to complete before the next sequence begins. When the scalar is 2.0, the maximum is twice the elapsed time, meaning that the ongoing animation sequence would always be finished halfway when the next sequence begins. This produces a smoother end result.
Parameters
TReal32
aScalar
|
New adaptation scalar.
|
Member Data Documentation
TUint32
iLastTimeMs
Last time interaction interval was determined.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.