DALI_PROPERTY("siblingOrder", INTEGER, true, false, false, Dali::DevelActor::Property::SIBLING_ORDER)
DALI_PROPERTY("updateSizeHint", VECTOR2, true, false, false, Dali::DevelActor::Property::UPDATE_SIZE_HINT)
DALI_PROPERTY("captureAllTouchAfterStart", BOOLEAN, true, false, false, Dali::DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START)
-DALI_PROPERTY("touchArea", VECTOR2, true, false, false, Dali::DevelActor::Property::TOUCH_AREA)
+DALI_PROPERTY("touchAreaOffset", RECTANGLE, true, false, false, Dali::DevelActor::Property::TOUCH_AREA_OFFSET)
DALI_PROPERTY("blendEquation", INTEGER, true, false, false, Dali::DevelActor::Property::BLEND_EQUATION)
+DALI_PROPERTY("touchFocusable", BOOLEAN, true, false, false, Dali::DevelActor::Property::TOUCH_FOCUSABLE)
DALI_PROPERTY_TABLE_END(DEFAULT_ACTOR_PROPERTY_START_INDEX, ActorDefaultProperties)
// Signals
return mBlendEquation;
}
+void Actor::SetTransparent(bool transparent)
+{
+ SetTransparentMessage(GetEventThreadServices(), GetNode(), transparent);
+}
+
+bool Actor::IsTransparent() const
+{
+ return GetNode().IsTransparent();
+}
+
void Actor::SetDrawMode(DrawMode::Type drawMode)
{
// this flag is not animatable so keep the value
mTargetPosition(Vector3::ZERO),
mTargetScale(Vector3::ONE),
mAnimatedSize(Vector3::ZERO),
- mTouchArea(Vector2::ZERO),
+ mTouchAreaOffset(0, 0, 0, 0),
mName(),
mSortedDepth(0u),
mDepth(0u),
mSensitive(true),
mLeaveRequired(false),
mKeyboardFocusable(false),
+ mTouchFocusable(false),
mOnSceneSignalled(false),
mInsideOnSizeSet(false),
mInheritPosition(true),
mVisible(true),
mInheritLayoutDirection(true),
mCaptureAllTouchAfterStart(false),
+ mIsBlendEquationSet(false),
+ mNeedGesturePropagation(false),
mLayoutDirection(LayoutDirection::LEFT_TO_RIGHT),
mDrawMode(DrawMode::NORMAL),
mColorMode(Node::DEFAULT_COLOR_MODE),
mClippingMode(ClippingMode::DISABLED),
- mBlendEquation(DevelBlendEquation::ADD),
- mIsBlendEquationSet(false)
+ mBlendEquation(DevelBlendEquation::ADD)
{
}
delete mRelayoutData;
}
-void Actor::Add(Actor& child)
+void Actor::Add(Actor& child, bool notify)
{
- mParentImpl.Add(child);
+ mParentImpl.Add(child, notify);
}
-void Actor::Remove(Actor& child)
+void Actor::Remove(Actor& child, bool notify)
{
- mParentImpl.Remove(child);
+ mParentImpl.Remove(child, notify);
+}
+
+void Actor::SwitchParent(Actor& newParent)
+{
+ if(this == &newParent)
+ {
+ DALI_LOG_ERROR("Cannot add actor to itself");
+ return;
+ }
+
+ if(!this->OnScene() || !newParent.OnScene())
+ {
+ DALI_LOG_ERROR("Both of current parent and new parent must be on Scene");
+ return;
+ }
+
+ newParent.Add(*this, false);
}
uint32_t Actor::GetChildCount() const
}
}
-void Actor::SetParent(ActorParent* parent)
+void Actor::SetParent(ActorParent* parent, bool keepOnScene)
{
if(parent)
{
mScene = parentActor->mScene;
if(EventThreadServices::IsCoreRunning() && // Don't emit signals or send messages during Core destruction
- parentActor->OnScene())
+ parentActor->OnScene() && !keepOnScene)
{
// Instruct each actor to create a corresponding node in the scene graph
ConnectToScene(parentActor->GetHierarchyDepth());
mParent = nullptr;
if(EventThreadServices::IsCoreRunning() && // Don't emit signals or send messages during Core destruction
- OnScene())
+ OnScene() && !keepOnScene)
{
// Disconnect the Node & its children from the scene-graph.
DisconnectNodeMessage(GetEventThreadServices().GetUpdateManager(), GetNode());
return {position.x, position.y, size.x, size.y};
}
+void Actor::SetNeedGesturePropagation(bool propagation)
+{
+ mNeedGesturePropagation = propagation;
+}
+
+bool Actor::NeedGesturePropagation()
+{
+ return mNeedGesturePropagation;
+}
+
bool Actor::GetCachedPropertyValue(Property::Index index, Property::Value& value) const
{
return PropertyHandler::GetCachedPropertyValue(*this, index, value);