/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
#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/common/property-helper.h>
#include <dali/internal/update/nodes/node-declarations.h>
#include <dali/internal/update/nodes/node-messages.h>
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::TOUCH_AREA:
+ case Dali::DevelActor::Property::TOUCH_AREA_OFFSET:
{
- Vector2 vec2Value;
- if(property.Get(vec2Value))
+ Rect<int> rectValue;
+ if(property.Get(rectValue))
{
- actor.SetTouchArea(vec2Value);
+ actor.SetTouchAreaOffset(rectValue);
}
break;
}
break;
}
+ case Dali::DevelActor::Property::TOUCH_FOCUSABLE:
+ {
+ bool value = false;
+ if(property.Get(value))
+ {
+ actor.SetTouchFocusable(value);
+ }
+ 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
actor.mAnimatedSize = actor.mTargetSize;
actor.mUseAnimatedSize = AnimatedSizeFlag::WIDTH | AnimatedSizeFlag::HEIGHT | AnimatedSizeFlag::DEPTH;
+ if(actor.mRelayoutData && !actor.mRelayoutData->relayoutRequested)
+ {
+ actor.mRelayoutData->preferredSize.width = actor.mAnimatedSize.width;
+ actor.mRelayoutData->preferredSize.height = actor.mAnimatedSize.height;
+ }
+
// Notify deriving classes
actor.OnSizeAnimation(animation, actor.mTargetSize);
}
actor.mAnimatedSize.width = actor.mTargetSize.width;
actor.mUseAnimatedSize |= AnimatedSizeFlag::WIDTH;
+ if(actor.mRelayoutData && !actor.mRelayoutData->relayoutRequested)
+ {
+ actor.mRelayoutData->preferredSize.width = actor.mAnimatedSize.width;
+ }
+
// Notify deriving classes
actor.OnSizeAnimation(animation, actor.mTargetSize);
}
actor.mAnimatedSize.height = actor.mTargetSize.height;
actor.mUseAnimatedSize |= AnimatedSizeFlag::HEIGHT;
+ if(actor.mRelayoutData && !actor.mRelayoutData->relayoutRequested)
+ {
+ actor.mRelayoutData->preferredSize.height = actor.mAnimatedSize.height;
+ }
+
// Notify deriving classes
actor.OnSizeAnimation(animation, actor.mTargetSize);
}
actor.mAnimatedSize = actor.mTargetSize;
actor.mUseAnimatedSize = AnimatedSizeFlag::WIDTH | AnimatedSizeFlag::HEIGHT | AnimatedSizeFlag::DEPTH;
+ if(actor.mRelayoutData && !actor.mRelayoutData->relayoutRequested)
+ {
+ actor.mRelayoutData->preferredSize.width = actor.mAnimatedSize.width;
+ actor.mRelayoutData->preferredSize.height = actor.mAnimatedSize.height;
+ }
+
// Notify deriving classes
actor.OnSizeAnimation(animation, actor.mTargetSize);
}
actor.mAnimatedSize.width = actor.mTargetSize.width;
actor.mUseAnimatedSize |= AnimatedSizeFlag::WIDTH;
+ if(actor.mRelayoutData && !actor.mRelayoutData->relayoutRequested)
+ {
+ actor.mRelayoutData->preferredSize.width = actor.mAnimatedSize.width;
+ }
+
// Notify deriving classes
actor.OnSizeAnimation(animation, actor.mTargetSize);
}
actor.mAnimatedSize.height = actor.mTargetSize.height;
actor.mUseAnimatedSize |= AnimatedSizeFlag::HEIGHT;
+ if(actor.mRelayoutData && !actor.mRelayoutData->relayoutRequested)
+ {
+ actor.mRelayoutData->preferredSize.height = actor.mAnimatedSize.height;
+ }
+
// Notify deriving classes
actor.OnSizeAnimation(animation, actor.mTargetSize);
}
break;
}
- case Dali::DevelActor::Property::TOUCH_AREA:
+ case Dali::DevelActor::Property::TOUCH_AREA_OFFSET:
{
- value = actor.GetTouchArea();
+ value = actor.GetTouchAreaOffset();
break;
}
break;
}
+ case Dali::DevelActor::Property::TOUCH_FOCUSABLE:
+ {
+ value = actor.IsTouchFocusable();
+ break;
+ }
+
+ case Dali::DevelActor::Property::KEYBOARD_FOCUSABLE_CHILDREN:
+ {
+ value = actor.AreChildrenKeyBoardFocusable();
+ break;
+ }
+
default:
{
// Must be a scene-graph only property