static bool gOnScrollStartCalled; ///< Whether the OnScrollStart signal was invoked.
static bool gOnScrollUpdateCalled; ///< Whether the OnScrollUpdate signal was invoked.
static bool gOnScrollCompleteCalled; ///< Whether the OnScrollComplete signal was invoked.
-static bool gOnScrollClampedCalled; ///< Whether the OnScrollClamped signal was invoked.
static bool gOnSnapStartCalled; ///< Whether the OnSnapStart signal was invoked.
-static ClampState3 gLastClampPosition; ///< Clamping information from OnScrollClampedEvent.
static SnapType gLastSnapType; ///< Snaping information from SnapEvent.
static Vector3 gConstraintResult; ///< Result from constraint.
}
/**
- * Invoked when scrolling clamped.
- *
- * @param[in] event The position/scale/rotation axes that were clamped.
- */
-static void OnScrollClamped( const ScrollView::ClampEvent& event )
-{
- gOnScrollClampedCalled = true;
- gLastClampPosition = event.position;
-}
-
-/**
* Invoked when a snap or flick started.
*
* @param[in] event The type of snap and the target position/scale/rotation.
ToolkitTestApplication application;
tet_infoline(" UtcDaliRulerFixedRulerSpacing");
- RulerPtr rulerZero = new FixedRuler( 0.0f );
- rulerZero->SetDomain( RulerDomain(10.0f, 90.0f, true) );
-
RulerPtr rulerNormal = new FixedRuler( 25.0f );
rulerNormal->SetDomain( RulerDomain(10.0f, 90.0f, true) );
unsigned int volume;
float position;
- position = rulerZero->GetPositionFromPage(1, volume, true);
- DALI_TEST_EQUALS( position, 10.0f, TEST_LOCATION );
- DALI_TEST_EQUALS( volume, 1u, TEST_LOCATION );
-
position = rulerNormal->GetPositionFromPage(1, volume, true);
DALI_TEST_EQUALS( position, 35.0f, TEST_LOCATION );
DALI_TEST_EQUALS( volume, 0u, TEST_LOCATION );
- position = rulerZero->GetPositionFromPage(2, volume, true);
- DALI_TEST_EQUALS( position, 10.0f, TEST_LOCATION );
- DALI_TEST_EQUALS( volume, 2u, TEST_LOCATION );
-
position = rulerNormal->GetPositionFromPage(2, volume, true);
DALI_TEST_EQUALS( position, 60.0f, TEST_LOCATION );
DALI_TEST_EQUALS( volume, 0u, TEST_LOCATION );