#include <dali/devel-api/actors/actor-devel.h>
#include <dali/internal/event/actors/actor-impl.h>
+#include <dali/internal/event/actors/actor-relayouter.h>
+#include <dali/internal/event/actors/actor-sizer.h>
#include <dali/internal/event/common/property-helper.h>
#include <dali/internal/update/nodes/node-declarations.h>
#include <dali/internal/update/nodes/node-messages.h>
case Dali::Actor::Property::WIDTH_RESIZE_POLICY:
{
- ResizePolicy::Type type = actor.GetResizePolicy(Dimension::WIDTH);
+ ResizePolicy::Type type = actor.mSizer.GetResizePolicy(Dimension::WIDTH);
if(Scripting::GetEnumerationProperty<ResizePolicy::Type>(property, RESIZE_POLICY_TABLE, RESIZE_POLICY_TABLE_COUNT, type))
{
- actor.SetResizePolicy(type, Dimension::WIDTH);
+ actor.mSizer.SetResizePolicy(type, Dimension::WIDTH);
}
break;
}
case Dali::Actor::Property::HEIGHT_RESIZE_POLICY:
{
- ResizePolicy::Type type = actor.GetResizePolicy(Dimension::HEIGHT);
+ ResizePolicy::Type type = actor.mSizer.GetResizePolicy(Dimension::HEIGHT);
if(Scripting::GetEnumerationProperty<ResizePolicy::Type>(property, RESIZE_POLICY_TABLE, RESIZE_POLICY_TABLE_COUNT, type))
{
- actor.SetResizePolicy(type, Dimension::HEIGHT);
+ actor.mSizer.SetResizePolicy(type, Dimension::HEIGHT);
}
break;
}
case Dali::Actor::Property::SIZE_SCALE_POLICY:
{
- SizeScalePolicy::Type type = actor.GetSizeScalePolicy();
+ SizeScalePolicy::Type type = actor.mSizer.GetSizeScalePolicy();
if(Scripting::GetEnumerationProperty<SizeScalePolicy::Type>(property, SIZE_SCALE_POLICY_TABLE, SIZE_SCALE_POLICY_TABLE_COUNT, type))
{
- actor.SetSizeScalePolicy(type);
+ actor.mSizer.SetSizeScalePolicy(type);
}
break;
}
{
if(property.Get<bool>())
{
- actor.SetResizePolicy(ResizePolicy::DIMENSION_DEPENDENCY, Dimension::WIDTH);
+ actor.mSizer.SetResizePolicy(ResizePolicy::DIMENSION_DEPENDENCY, Dimension::WIDTH);
}
break;
}
{
if(property.Get<bool>())
{
- actor.SetResizePolicy(ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT);
+ actor.mSizer.SetResizePolicy(ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT);
}
break;
}
if(Scripting::GetEnumerationProperty<LayoutDirection::Type>(property, LAYOUT_DIRECTION_TABLE, LAYOUT_DIRECTION_TABLE_COUNT, direction))
{
- actor.InheritLayoutDirectionRecursively(direction, true);
+ actor.mParentImpl.InheritLayoutDirectionRecursively(direction, true);
}
break;
}
break;
}
+ case Dali::DevelActor::Property::KEYBOARD_FOCUSABLE_CHILDREN:
+ {
+ bool value = false;
+ if(property.Get(value))
+ {
+ actor.SetKeyboardFocusableChildren(value);
+ }
+ break;
+ }
+
default:
{
// this can happen in the case of a non-animatable default property so just do nothing
{
case Dali::Actor::Property::SIZE:
{
- if(value.Get(actor.mTargetSize))
+ Vector3 targetSize;
+ if(value.Get(targetSize))
{
- actor.mAnimatedSize = actor.mTargetSize;
- actor.mUseAnimatedSize = AnimatedSizeFlag::WIDTH | AnimatedSizeFlag::HEIGHT | AnimatedSizeFlag::DEPTH;
-
- // Notify deriving classes
- actor.OnSizeAnimation(animation, actor.mTargetSize);
+ actor.mSizer.OnAnimateSize(animation, targetSize, false);
}
break;
}
case Dali::Actor::Property::SIZE_WIDTH:
{
- if(value.Get(actor.mTargetSize.width))
+ float width;
+ if(value.Get(width))
{
- actor.mAnimatedSize.width = actor.mTargetSize.width;
- actor.mUseAnimatedSize |= AnimatedSizeFlag::WIDTH;
-
- // Notify deriving classes
- actor.OnSizeAnimation(animation, actor.mTargetSize);
+ actor.mSizer.OnAnimateWidth(animation, width, false);
}
break;
}
case Dali::Actor::Property::SIZE_HEIGHT:
{
- if(value.Get(actor.mTargetSize.height))
+ float height;
+ if(value.Get(height))
{
- actor.mAnimatedSize.height = actor.mTargetSize.height;
- actor.mUseAnimatedSize |= AnimatedSizeFlag::HEIGHT;
-
- // Notify deriving classes
- actor.OnSizeAnimation(animation, actor.mTargetSize);
+ actor.mSizer.OnAnimateHeight(animation, height, false);
}
break;
}
case Dali::Actor::Property::SIZE_DEPTH:
{
- if(value.Get(actor.mTargetSize.depth))
+ float depth;
+ if(value.Get(depth))
{
- actor.mAnimatedSize.depth = actor.mTargetSize.depth;
- actor.mUseAnimatedSize |= AnimatedSizeFlag::DEPTH;
-
- // Notify deriving classes
- actor.OnSizeAnimation(animation, actor.mTargetSize);
+ actor.mSizer.OnAnimateDepth(animation, depth, false);
}
break;
}
{
case Dali::Actor::Property::SIZE:
{
- if(AdjustValue<Vector3>(actor.mTargetSize, value))
+ Vector3 targetSize;
+ if(value.Get(targetSize))
{
- actor.mAnimatedSize = actor.mTargetSize;
- actor.mUseAnimatedSize = AnimatedSizeFlag::WIDTH | AnimatedSizeFlag::HEIGHT | AnimatedSizeFlag::DEPTH;
-
- // Notify deriving classes
- actor.OnSizeAnimation(animation, actor.mTargetSize);
+ actor.mSizer.OnAnimateSize(animation, targetSize, true);
}
break;
}
case Dali::Actor::Property::SIZE_WIDTH:
{
- if(AdjustValue<float>(actor.mTargetSize.width, value))
+ float width;
+ if(value.Get(width))
{
- actor.mAnimatedSize.width = actor.mTargetSize.width;
- actor.mUseAnimatedSize |= AnimatedSizeFlag::WIDTH;
-
- // Notify deriving classes
- actor.OnSizeAnimation(animation, actor.mTargetSize);
+ actor.mSizer.OnAnimateWidth(animation, width, true);
}
break;
}
case Dali::Actor::Property::SIZE_HEIGHT:
{
- if(AdjustValue<float>(actor.mTargetSize.height, value))
+ float height;
+ if(value.Get(height))
{
- actor.mAnimatedSize.height = actor.mTargetSize.height;
- actor.mUseAnimatedSize |= AnimatedSizeFlag::HEIGHT;
-
- // Notify deriving classes
- actor.OnSizeAnimation(animation, actor.mTargetSize);
+ actor.mSizer.OnAnimateHeight(animation, height, true);
}
break;
}
case Dali::Actor::Property::SIZE_DEPTH:
{
- if(AdjustValue<float>(actor.mTargetSize.depth, value))
+ float depth;
+ if(value.Get(depth))
{
- actor.mAnimatedSize.depth = actor.mTargetSize.depth;
- actor.mUseAnimatedSize |= AnimatedSizeFlag::DEPTH;
-
- // Notify deriving classes
- actor.OnSizeAnimation(animation, actor.mTargetSize);
+ actor.mSizer.OnAnimateDepth(animation, depth, true);
}
break;
}
case Dali::Actor::Property::WIDTH_RESIZE_POLICY:
{
- value = Scripting::GetLinearEnumerationName<ResizePolicy::Type>(actor.GetResizePolicy(Dimension::WIDTH), RESIZE_POLICY_TABLE, RESIZE_POLICY_TABLE_COUNT);
+ value = Scripting::GetLinearEnumerationName<ResizePolicy::Type>(actor.mSizer.GetResizePolicy(Dimension::WIDTH), RESIZE_POLICY_TABLE, RESIZE_POLICY_TABLE_COUNT);
break;
}
case Dali::Actor::Property::HEIGHT_RESIZE_POLICY:
{
- value = Scripting::GetLinearEnumerationName<ResizePolicy::Type>(actor.GetResizePolicy(Dimension::HEIGHT), RESIZE_POLICY_TABLE, RESIZE_POLICY_TABLE_COUNT);
+ value = Scripting::GetLinearEnumerationName<ResizePolicy::Type>(actor.mSizer.GetResizePolicy(Dimension::HEIGHT), RESIZE_POLICY_TABLE, RESIZE_POLICY_TABLE_COUNT);
break;
}
case Dali::Actor::Property::SIZE_SCALE_POLICY:
{
- value = actor.GetSizeScalePolicy();
+ value = actor.mSizer.GetSizeScalePolicy();
break;
}
case Dali::Actor::Property::WIDTH_FOR_HEIGHT:
{
- value = (actor.GetResizePolicy(Dimension::WIDTH) == ResizePolicy::DIMENSION_DEPENDENCY) && (actor.GetDimensionDependency(Dimension::WIDTH) == Dimension::HEIGHT);
+ value = (actor.mSizer.GetResizePolicy(Dimension::WIDTH) == ResizePolicy::DIMENSION_DEPENDENCY) && (actor.mSizer.GetDimensionDependency(Dimension::WIDTH) == Dimension::HEIGHT);
break;
}
case Dali::Actor::Property::HEIGHT_FOR_WIDTH:
{
- value = (actor.GetResizePolicy(Dimension::HEIGHT) == ResizePolicy::DIMENSION_DEPENDENCY) && (actor.GetDimensionDependency(Dimension::HEIGHT) == Dimension::WIDTH);
+ value = (actor.mSizer.GetResizePolicy(Dimension::HEIGHT) == ResizePolicy::DIMENSION_DEPENDENCY) && (actor.mSizer.GetDimensionDependency(Dimension::HEIGHT) == Dimension::WIDTH);
break;
}
break;
}
+ case Dali::DevelActor::Property::KEYBOARD_FOCUSABLE_CHILDREN:
+ {
+ value = actor.AreChildrenKeyBoardFocusable();
+ break;
+ }
+
default:
{
// Must be a scene-graph only property