From: Eunki, Hong Date: Fri, 5 Jan 2024 09:55:29 +0000 (+0900) Subject: [Tizen][Tizen_8.0] Make ModelNode and Light as Control X-Git-Tag: accepted/tizen/8.0/unified/20240109.155453~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F28%2F303828%2F1;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git [Tizen][Tizen_8.0] Make ModelNode and Light as Control Since we need to use some control features (like KeyboardFocus) let we make ModelNode and Light as Control, instead of CustomActor. Change-Id: Iab43b46068c0a676b3cef850bace629142680316 Signed-off-by: Eunki, Hong --- diff --git a/dali-scene3d/internal/light/light-impl.cpp b/dali-scene3d/internal/light/light-impl.cpp index 0a0a453..3459cfa 100644 --- a/dali-scene3d/internal/light/light-impl.cpp +++ b/dali-scene3d/internal/light/light-impl.cpp @@ -70,7 +70,7 @@ Dali::Scene3D::Light Light::New() } Light::Light() -: CustomActorImpl(ActorFlags::DISABLE_SIZE_NEGOTIATION) +: Control(static_cast(ControlBehaviour::DISABLE_STYLE_CHANGE_SIGNALS | ActorFlags::DISABLE_SIZE_NEGOTIATION)) { } diff --git a/dali-scene3d/internal/light/light-impl.h b/dali-scene3d/internal/light/light-impl.h index c691423..77bbf2f 100644 --- a/dali-scene3d/internal/light/light-impl.h +++ b/dali-scene3d/internal/light/light-impl.h @@ -19,7 +19,7 @@ */ // EXTERNAL INCLUDES -#include +#include #include #include #include @@ -44,7 +44,7 @@ namespace Internal * * @SINCE_2_2.32 */ -class DALI_SCENE3D_API Light : public CustomActorImpl +class DALI_SCENE3D_API Light : public Toolkit::Internal::Control { public: // Creation & Destruction diff --git a/dali-scene3d/internal/model-components/model-node-impl.cpp b/dali-scene3d/internal/model-components/model-node-impl.cpp index 8d85cf2..eedea17 100644 --- a/dali-scene3d/internal/model-components/model-node-impl.cpp +++ b/dali-scene3d/internal/model-components/model-node-impl.cpp @@ -65,7 +65,7 @@ Dali::Scene3D::ModelNode ModelNode::New() } ModelNode::ModelNode() -: CustomActorImpl(ActorFlags::DISABLE_SIZE_NEGOTIATION) +: Control(static_cast(ControlBehaviour::DISABLE_STYLE_CHANGE_SIGNALS | ActorFlags::DISABLE_SIZE_NEGOTIATION)) { } diff --git a/dali-scene3d/internal/model-components/model-node-impl.h b/dali-scene3d/internal/model-components/model-node-impl.h index f36e218..f446467 100644 --- a/dali-scene3d/internal/model-components/model-node-impl.h +++ b/dali-scene3d/internal/model-components/model-node-impl.h @@ -19,8 +19,8 @@ */ // EXTERNAL INCLUDES +#include #include -#include #include #include // for std::unique_ptr #include @@ -54,7 +54,7 @@ using ColliderMeshUniquePtr = std::unique_ptr; diff --git a/dali-scene3d/public-api/light/light.cpp b/dali-scene3d/public-api/light/light.cpp index 095e053..e7ec355 100644 --- a/dali-scene3d/public-api/light/light.cpp +++ b/dali-scene3d/public-api/light/light.cpp @@ -122,12 +122,12 @@ float Light::GetShadowBias() const } Light::Light(Internal::Light& implementation) -: CustomActor(implementation) +: Control(implementation) { } Light::Light(Dali::Internal::CustomActor* internal) -: CustomActor(internal) +: Control(internal) { // Can have a NULL pointer so we only need to check if the internal implementation is our class // when there is a value. diff --git a/dali-scene3d/public-api/light/light.h b/dali-scene3d/public-api/light/light.h index ef4892a..84790b3 100644 --- a/dali-scene3d/public-api/light/light.h +++ b/dali-scene3d/public-api/light/light.h @@ -60,7 +60,7 @@ class Light; * @endcode * @SINCE_2_2.32 */ -class DALI_SCENE3D_API Light : public Dali::CustomActor +class DALI_SCENE3D_API Light : public Dali::Toolkit::Control { public: /** diff --git a/dali-scene3d/public-api/model-components/model-node.cpp b/dali-scene3d/public-api/model-components/model-node.cpp index 2832531..2275615 100644 --- a/dali-scene3d/public-api/model-components/model-node.cpp +++ b/dali-scene3d/public-api/model-components/model-node.cpp @@ -71,12 +71,12 @@ ModelNode ModelNode::DownCast(BaseHandle handle) } ModelNode::ModelNode(Internal::ModelNode& implementation) -: CustomActor(implementation) +: Control(implementation) { } ModelNode::ModelNode(Dali::Internal::CustomActor* internal) -: CustomActor(internal) +: Control(internal) { // Can have a NULL pointer so we only need to check if the internal implementation is our class // when there is a value. diff --git a/dali-scene3d/public-api/model-components/model-node.h b/dali-scene3d/public-api/model-components/model-node.h index 5ae5831..66060b1 100644 --- a/dali-scene3d/public-api/model-components/model-node.h +++ b/dali-scene3d/public-api/model-components/model-node.h @@ -19,7 +19,7 @@ */ // EXTERNAL INCLUDES -#include +#include #include // INTERNAL INCLUDES @@ -60,7 +60,7 @@ class ModelNode; * material.SetProperty(PropertyIndex, PropertyValue); * @endcode */ -class DALI_SCENE3D_API ModelNode : public Dali::CustomActor +class DALI_SCENE3D_API ModelNode : public Dali::Toolkit::Control { public: /**