#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.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.
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 );