*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <dali/integration-api/debug.h>
#include <dali/public-api/actors/layer.h>
#include <dali/public-api/adaptor-framework/timer.h>
#include <dali/integration-api/debug.h>
#include <dali/public-api/actors/layer.h>
#include <dali/public-api/adaptor-framework/timer.h>
#include <dali/public-api/object/property-notification.h>
#include <dali/public-api/rendering/geometry.h>
#include <dali/public-api/rendering/renderer.h>
#include <dali/public-api/object/property-notification.h>
#include <dali/public-api/rendering/geometry.h>
#include <dali/public-api/rendering/renderer.h>
{
grabHandle.actor = ImageView::New( mHandleImages[GRAB_HANDLE][HANDLE_IMAGE_RELEASED] );
GetImpl( grabHandle.actor).SetDepthIndex( DepthIndex::DECORATION );
{
grabHandle.actor = ImageView::New( mHandleImages[GRAB_HANDLE][HANDLE_IMAGE_RELEASED] );
GetImpl( grabHandle.actor).SetDepthIndex( DepthIndex::DECORATION );
grabHandle.actor.Add( grabHandle.grabArea );
grabHandle.actor.SetProperty( Actor::Property::COLOR, mHandleColor );
grabHandle.actor.Add( grabHandle.grabArea );
grabHandle.actor.SetProperty( Actor::Property::COLOR, mHandleColor );
// The grab handle's actor is attached to the tap and long press detectors in order to consume these events.
// Note that no callbacks are connected to any signal emitted by the tap and long press detectors.
// The grab handle's actor is attached to the tap and long press detectors in order to consume these events.
// Note that no callbacks are connected to any signal emitted by the tap and long press detectors.
{
handle.markerActor = ImageView::New( image );
handle.markerActor.SetProperty( Actor::Property::COLOR, mHandleColor );
{
handle.markerActor = ImageView::New( image );
handle.markerActor.SetProperty( Actor::Property::COLOR, mHandleColor );
primary.grabArea.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
primary.grabArea.SetProperty( Actor::Property::SIZE_MODE_FACTOR, DEFAULT_SELECTION_HANDLE_RELATIVE_SIZE );
primary.grabArea.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
primary.grabArea.SetProperty( Actor::Property::SIZE_MODE_FACTOR, DEFAULT_SELECTION_HANDLE_RELATIVE_SIZE );
// The handle's actor is attached to the tap and long press detectors in order to consume these events.
// Note that no callbacks are connected to any signal emitted by the tap and long press detectors.
// The handle's actor is attached to the tap and long press detectors in order to consume these events.
// Note that no callbacks are connected to any signal emitted by the tap and long press detectors.
secondary.grabArea.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
secondary.grabArea.SetProperty( Actor::Property::SIZE_MODE_FACTOR, DEFAULT_SELECTION_HANDLE_RELATIVE_SIZE );
secondary.grabArea.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
secondary.grabArea.SetProperty( Actor::Property::SIZE_MODE_FACTOR, DEFAULT_SELECTION_HANDLE_RELATIVE_SIZE );
// The handle's actor is attached to the tap and long press detectors in order to consume these events.
// Note that no callbacks are connected to any signal emitted by the tap and long press detectors.
// The handle's actor is attached to the tap and long press detectors in order to consume these events.
// Note that no callbacks are connected to any signal emitted by the tap and long press detectors.
- handle.grabDisplacementX += gesture.displacement.x;
- handle.grabDisplacementY += ( handle.verticallyFlipped ? -gesture.displacement.y : gesture.displacement.y );
+ const Vector2& displacement = gesture.GetDisplacement();
+ handle.grabDisplacementX += displacement.x;
+ handle.grabDisplacementY += ( handle.verticallyFlipped ? -displacement.y : displacement.y );
const float x = handle.globalPosition.x + handle.grabDisplacementX;
const float y = handle.globalPosition.y + handle.grabDisplacementY + 0.5f * handle.lineHeight;
const float yVerticallyFlippedCorrected = y - ( handle.verticallyFlippedOnTouch ? handle.lineHeight : 0.f );
const float x = handle.globalPosition.x + handle.grabDisplacementX;
const float y = handle.globalPosition.y + handle.grabDisplacementY + 0.5f * handle.lineHeight;
const float yVerticallyFlippedCorrected = y - ( handle.verticallyFlippedOnTouch ? handle.lineHeight : 0.f );
LessThanCondition( mBoundingBox.y + topHeight ) );
// Notifies the change from false to true and from true to false.
LessThanCondition( mBoundingBox.y + topHeight ) );
// Notifies the change from false to true and from true to false.
// Connects the signals with the callbacks.
mHandleVerticalLessThanNotification.NotifySignal().Connect( this, &Decorator::Impl::HandleResetPosition );
// Connects the signals with the callbacks.
mHandleVerticalLessThanNotification.NotifySignal().Connect( this, &Decorator::Impl::HandleResetPosition );
GreaterThanCondition( mBoundingBox.w - bottomHeight ) );
// Notifies the change from false to true and from true to false.
GreaterThanCondition( mBoundingBox.w - bottomHeight ) );
// Notifies the change from false to true and from true to false.
// Connects the signals with the callbacks.
mHandleVerticalGreaterThanNotification.NotifySignal().Connect( this, &Decorator::Impl::HandleResetPosition );
// Connects the signals with the callbacks.
mHandleVerticalGreaterThanNotification.NotifySignal().Connect( this, &Decorator::Impl::HandleResetPosition );
LessThanCondition( mBoundingBox.y + topHeight ) );
// Notifies the change from false to true and from true to false.
LessThanCondition( mBoundingBox.y + topHeight ) );
// Notifies the change from false to true and from true to false.
// Connects the signals with the callbacks.
mHandleVerticalLessThanNotification.NotifySignal().Connect( this, &Decorator::Impl::HandleResetPosition );
// Connects the signals with the callbacks.
mHandleVerticalLessThanNotification.NotifySignal().Connect( this, &Decorator::Impl::HandleResetPosition );
GreaterThanCondition( mBoundingBox.w - bottomHeight ) );
// Notifies the change from false to true and from true to false.
GreaterThanCondition( mBoundingBox.w - bottomHeight ) );
// Notifies the change from false to true and from true to false.
// Connects the signals with the callbacks.
mHandleVerticalGreaterThanNotification.NotifySignal().Connect( this, &Decorator::Impl::HandleResetPosition );
// Connects the signals with the callbacks.
mHandleVerticalGreaterThanNotification.NotifySignal().Connect( this, &Decorator::Impl::HandleResetPosition );
LessThanCondition( mBoundingBox.y + topHeight ) );
// Notifies the change from false to true and from true to false.
LessThanCondition( mBoundingBox.y + topHeight ) );
// Notifies the change from false to true and from true to false.
// Connects the signals with the callbacks.
mHandleVerticalLessThanNotification.NotifySignal().Connect( this, &Decorator::Impl::HandleResetPosition );
// Connects the signals with the callbacks.
mHandleVerticalLessThanNotification.NotifySignal().Connect( this, &Decorator::Impl::HandleResetPosition );
GreaterThanCondition( mBoundingBox.w - bottomHeight ) );
// Notifies the change from false to true and from true to false.
GreaterThanCondition( mBoundingBox.w - bottomHeight ) );
// Notifies the change from false to true and from true to false.
// Connects the signals with the callbacks.
mHandleVerticalGreaterThanNotification.NotifySignal().Connect( this, &Decorator::Impl::HandleResetPosition );
// Connects the signals with the callbacks.
mHandleVerticalGreaterThanNotification.NotifySignal().Connect( this, &Decorator::Impl::HandleResetPosition );
LessThanCondition( mBoundingBox.x + leftWidth ) );
// Notifies the change from false to true and from true to false.
LessThanCondition( mBoundingBox.x + leftWidth ) );
// Notifies the change from false to true and from true to false.
// Connects the signals with the callbacks.
mHandleHorizontalLessThanNotification.NotifySignal().Connect( this, &Decorator::Impl::HandleResetPosition );
// Connects the signals with the callbacks.
mHandleHorizontalLessThanNotification.NotifySignal().Connect( this, &Decorator::Impl::HandleResetPosition );
GreaterThanCondition( mBoundingBox.z - rightWidth ) );
// Notifies the change from false to true and from true to false.
GreaterThanCondition( mBoundingBox.z - rightWidth ) );
// Notifies the change from false to true and from true to false.
// Connects the signals with the callbacks.
mHandleHorizontalGreaterThanNotification.NotifySignal().Connect( this, &Decorator::Impl::HandleResetPosition );
// Connects the signals with the callbacks.
mHandleHorizontalGreaterThanNotification.NotifySignal().Connect( this, &Decorator::Impl::HandleResetPosition );
GreaterThanCondition( mBoundingBox.w - popupHalfSize.height ) );
// Notifies the change from false to true and from true to false.
GreaterThanCondition( mBoundingBox.w - popupHalfSize.height ) );
// Notifies the change from false to true and from true to false.
- mPopupTopExceedNotification.SetNotifyMode( PropertyNotification::NotifyOnChanged );
- mPopupBottomExceedNotification.SetNotifyMode( PropertyNotification::NotifyOnChanged );
+ mPopupTopExceedNotification.SetNotifyMode( PropertyNotification::NOTIFY_ON_CHANGED );
+ mPopupBottomExceedNotification.SetNotifyMode( PropertyNotification::NOTIFY_ON_CHANGED );
mPopupTopExceedNotification.NotifySignal().Connect( this, &Decorator::Impl::PopUpLeavesTopBoundary );
mPopupBottomExceedNotification.NotifySignal().Connect( this, &Decorator::Impl::PopUpLeavesBottomBoundary );
}
mPopupTopExceedNotification.NotifySignal().Connect( this, &Decorator::Impl::PopUpLeavesTopBoundary );
mPopupBottomExceedNotification.NotifySignal().Connect( this, &Decorator::Impl::PopUpLeavesBottomBoundary );
}
- void SetHandleImage( HandleType handleType, HandleImageType handleImageType, Dali::Image image )
+ void SetHandleImage( HandleType handleType, HandleImageType handleImageType, const std::string& imageFileName )
TextSelectionPopup::Buttons mEnabledPopupButtons; /// Bit mask of currently enabled Popup buttons
TextSelectionPopupCallbackInterface& mTextSelectionPopupCallbackInterface;
TextSelectionPopup::Buttons mEnabledPopupButtons; /// Bit mask of currently enabled Popup buttons
TextSelectionPopupCallbackInterface& mTextSelectionPopupCallbackInterface;
// The problem is the handle actor does not receive the touch event with the Interrupt
// state when the power button is pressed and the application goes to background.
mImpl->mHandle[handleType].pressed = false;
// The problem is the handle actor does not receive the touch event with the Interrupt
// state when the power button is pressed and the application goes to background.
mImpl->mHandle[handleType].pressed = false;
-void Decorator::SetHandleImage( HandleType handleType, HandleImageType handleImageType, Dali::Image image )
+void Decorator::SetHandleImage( HandleType handleType, HandleImageType handleImageType, const std::string& imageFileName )