: DummyControlImpl(),
initializeCalled(false),
activatedCalled(false),
- onAccTouchedCalled(false),
onAccValueChangeCalled(false),
themeChangeCalled(false),
fontChangeCalled(false),
void Impl::DummyControl::OnInitialize() { initializeCalled = true; }
bool Impl::DummyControl::OnAccessibilityActivated() { activatedCalled = true; return true; }
-bool Impl::DummyControl::OnAccessibilityTouch(const TouchEvent& touch) { onAccTouchedCalled = true; return true; }
bool Impl::DummyControl::OnAccessibilityValueChange( bool isIncrease )
{
onAccValueChangeCalled = true; return true;
virtual void OnInitialize();
virtual bool OnAccessibilityActivated();
- virtual bool OnAccessibilityTouch( const TouchEvent& touch );
virtual bool OnAccessibilityValueChange( bool isIncrease );
virtual void OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change );
bool initializeCalled;
bool activatedCalled;
- bool onAccTouchedCalled;
bool onAccValueChangeCalled;
bool themeChangeCalled;
bool fontChangeCalled;
bool HandleActionDownEvent();
bool HandleActionClearFocusEvent();
bool HandleActionScrollEvent(const TouchPoint& point, unsigned long timeStamp);
- bool HandleActionTouchEvent(const TouchPoint& point, unsigned long timeStamp);
bool HandleActionBackEvent();
bool HandleActionEnableEvent();
bool HandleActionDisableEvent();
return false;
}
-bool AccessibilityAdaptor::HandleActionTouchEvent(const TouchPoint& point, unsigned long timeStamp)
-{
- if( mActionHandler )
- {
- Dali::TouchEvent touch = Integration::NewTouchEvent(timeStamp, point);
- return mActionHandler->AccessibilityActionTouch( touch );
- }
- return false;
-}
-
bool AccessibilityAdaptor::HandleActionBackEvent()
{
if( mActionHandler )
return Internal::Adaptor::GetImplementation(*this).HandleActionScrollEvent(point, timeStamp);
}
-bool AccessibilityAdaptor::HandleActionTouchEvent(const TouchPoint& point, unsigned long timeStamp)
-{
- return Internal::Adaptor::GetImplementation(*this).HandleActionTouchEvent(point, timeStamp);
-}
-
bool AccessibilityAdaptor::HandleActionBackEvent()
{
return Internal::Adaptor::GetImplementation(*this).HandleActionBackEvent();
END_TEST;
}
-int UtcDaliAccessibilityManagerActionTouch(void)
-{
- ToolkitTestApplication application;
- tet_infoline( " UtcDaliAccessibilityManagerActionTouch" );
-
- AccessibilityManager manager = AccessibilityManager::Get();
- DALI_TEST_CHECK( manager );
-
- Dali::AccessibilityAdaptor accessibilityAdaptor = Dali::AccessibilityAdaptor::Get();
-
- DummyControl dummyControl = DummyControl::New(true);
- Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummyControl.GetImplementation());
- dummyControl.SetProperty( Actor::Property::SIZE, Vector2(480, 800) );
- manager.SetFocusOrder( dummyControl, 1 );
- application.GetScene().Add( dummyControl );
- manager.SetCurrentFocusActor( dummyControl );
-
- TouchPoint point( 0, TouchPoint::Started, 100.0f, 200.0f );
- accessibilityAdaptor.HandleActionTouchEvent( point, 0u );
-
- DALI_TEST_CHECK( dummyImpl.onAccTouchedCalled );
-
- END_TEST;
-}
-
-
int UtcDaliAccessibilityManagerHandlePanGesture(void)
{
// Pan gesture sent from adaptor to manager via AccessibilityGestureHandler
END_TEST;
}
-int UtcDaliControlImplOnAccessibilityTouchP(void)
-{
- ToolkitTestApplication application;
- Control dummy = Control::New();
- Toolkit::Internal::Control& controlImpl = Toolkit::Internal::GetImplementation( dummy );
- TouchEvent touch;
- DALI_TEST_EQUALS( false, controlImpl.OnAccessibilityTouch( touch ), TEST_LOCATION );
-
- END_TEST;
-}
int UtcDaliControlImplOnAccessibilityActivatedP(void)
{
return mIsAccessibilityTtsEnabled;
}
-bool AccessibilityManager::AccessibilityActionTouch(const TouchEvent& touch)
-{
- bool handled = false;
-
- // TODO: Need to convert the touchevent for the focused actor?
-
- Dali::Toolkit::Control control = Dali::Toolkit::Control::DownCast(GetCurrentFocusActor());
- if(control)
- {
- handled = GetImplementation( control ).OnAccessibilityTouch(touch);
- }
-
- return handled;
-}
-
bool AccessibilityManager::HandlePanGesture(const AccessibilityGestureEvent& panEvent)
{
bool handled = false;
virtual bool AccessibilityActionStartStop();
/**
- * Perform the accessibility action to mouse move (by one finger tap & hold and move).
- * @param touch touch point and time of the event
- * @return whether the accessibility action is performed or not.
- */
- virtual bool AccessibilityActionTouch(const TouchEvent& touch);
-
- /**
* This function is connected to the TtsPlayer StateChangeSignal.
* It is called when the TTS players state changes.
* @param previousState The previous state of the TTS player (for comparison)
// Updates the vertical pen's position.
penY += -layout.descender + layout.lineSpacing + mDefaultLineSpacing;
+ // If there is a defaultLineSize, updates the pen's position.
+ if( mDefaultLineSize > 0.f )
+ {
+ float lineSpacing = mDefaultLineSize - ( layout.ascender + -layout.descender );
+ lineSpacing = lineSpacing < 0.f ? 0.f : lineSpacing;
+ penY += lineSpacing;
+ }
// Increase the glyph index.
index = nextIndex;
return false; // Accessibility pan gesture is not handled by default
}
-bool Control::OnAccessibilityTouch(const TouchEvent& touch)
-{
- return false; // Accessibility touch event is not handled by default
-}
-
bool Control::OnAccessibilityValueChange(bool isIncrease)
{
return false; // Accessibility value change action is not handled by default
virtual bool OnAccessibilityPan( PanGesture gesture );
/**
- * @brief This method should be overridden by deriving classes when they wish to respond the accessibility
- * touch event.
- *
- * @SINCE_1_0.0
- * @param[in] touch The touch event
- * @return true if the touch event has been consumed by this control
- */
- virtual bool OnAccessibilityTouch( const TouchEvent& touch );
-
- /**
* @brief This method should be overridden by deriving classes when they wish to respond
* the accessibility up and down action (i.e. value change of slider control).
*