Merge "Removed On(...)Event()" into devel/master
[platform/core/uifw/dali-core.git] / dali / public-api / actors / custom-actor-impl.cpp
index 557d94e..19f03e9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 namespace Dali
 {
 
-CustomActorImpl::~CustomActorImpl()
-{
-}
-
 CustomActor CustomActorImpl::Self() const
 {
   return CustomActor(mOwner);
 }
 
-void CustomActorImpl::OnPropertySet( Property::Index index, Property::Value propertyValue )
+void CustomActorImpl::OnPropertySet( Property::Index index, const Property::Value& propertyValue )
 {
 }
 
-CustomActorImpl::CustomActorImpl(bool requiresTouchEvents)
+CustomActorImpl::CustomActorImpl( ActorFlags flags )
 : mOwner(NULL),
-  mRequiresTouchEvents(requiresTouchEvents),
-  mRequiresHoverEvents(false),
-  mRequiresMouseWheelEvents(false)
+  mFlags( flags )
+{
+}
+
+CustomActorImpl::~CustomActorImpl()
 {
 }
 
@@ -58,42 +56,32 @@ Internal::CustomActor* CustomActorImpl::GetOwner() const
   return mOwner;
 }
 
-bool CustomActorImpl::RequiresTouchEvents() const
-{
-  return mRequiresTouchEvents;
-}
-
-bool CustomActorImpl::RequiresHoverEvents() const
-{
-  return mRequiresHoverEvents;
-}
-
-void CustomActorImpl::SetRequiresHoverEvents(bool requiresHoverEvents)
+bool CustomActorImpl::IsRelayoutEnabled() const
 {
-  mRequiresHoverEvents = requiresHoverEvents;
+  return ( mFlags & DISABLE_SIZE_NEGOTIATION ) == 0;
 }
 
-bool CustomActorImpl::RequiresMouseWheelEvents() const
+void CustomActorImpl::RelayoutRequest()
 {
-  return mRequiresMouseWheelEvents;
+  mOwner->RelayoutRequest();
 }
 
-void CustomActorImpl::SetRequiresMouseWheelEvents(bool requiresMouseWheelEvents)
+float CustomActorImpl::GetHeightForWidthBase( float width )
 {
-  mRequiresMouseWheelEvents = requiresMouseWheelEvents;
+  return mOwner->GetHeightForWidthBase( width );
 }
 
-void CustomActorImpl::RelayoutRequest()
+float CustomActorImpl::GetWidthForHeightBase( float height )
 {
-  mOwner->RelayoutRequest();
+  return mOwner->GetWidthForHeightBase( height );
 }
 
-float CustomActorImpl::CalculateChildSizeBase( const Dali::Actor& child, Dimension dimension )
+float CustomActorImpl::CalculateChildSizeBase( const Dali::Actor& child, Dimension::Type dimension )
 {
   return mOwner->CalculateChildSizeBase( child, dimension );
 }
 
-bool CustomActorImpl::RelayoutDependentOnChildrenBase( Dimension dimension )
+bool CustomActorImpl::RelayoutDependentOnChildrenBase( Dimension::Type dimension )
 {
   return mOwner->RelayoutDependentOnChildrenBase( dimension );
 }