From: Eunki, Hong Date: Fri, 5 Jan 2024 10:14:23 +0000 (+0900) Subject: Make ModelNode and Light as Control X-Git-Tag: dali_2.3.8~3^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=69c4d91ee24469d322cc0aca8ebc0e361872e093 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. TODO : We'd better make some universion Control for Scene3D. For example, we should not allow to add Visual into ModelNode or Light. Change-Id: I8acbb57d967c438101fe8a1877950d044ca943f2 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..cc7c639 100644 --- a/dali-scene3d/internal/light/light-impl.cpp +++ b/dali-scene3d/internal/light/light-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -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..bb46c5f 100644 --- a/dali-scene3d/internal/light/light-impl.h +++ b/dali-scene3d/internal/light/light-impl.h @@ -2,7 +2,7 @@ #define DALI_SCENE3D_LIGHT_IMPL_H /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -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 @@ -215,7 +215,6 @@ protected: void Initialize(); public: // Public Method - /** * @copydoc Scene3D::Light::GetMaximumEnabledLightCount() */ @@ -258,10 +257,10 @@ private: /// @cond internal // Not copyable or movable - DALI_INTERNAL Light(const Light&) = delete; ///< Deleted copy constructor. - DALI_INTERNAL Light(Light&&) = delete; ///< Deleted move constructor. + DALI_INTERNAL Light(const Light&) = delete; ///< Deleted copy constructor. + DALI_INTERNAL Light(Light&&) = delete; ///< Deleted move constructor. DALI_INTERNAL Light& operator=(const Light&) = delete; ///< Deleted copy assignment operator. - DALI_INTERNAL Light& operator=(Light&&) = delete; ///< Deleted move assignment operator. + DALI_INTERNAL Light& operator=(Light&&) = delete; ///< Deleted move assignment operator. private: Dali::CameraActor mLightSourceActor; diff --git a/dali-scene3d/internal/model-components/model-node-impl.cpp b/dali-scene3d/internal/model-components/model-node-impl.cpp index 8d85cf2..1eb07db 100644 --- a/dali-scene3d/internal/model-components/model-node-impl.cpp +++ b/dali-scene3d/internal/model-components/model-node-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -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..0996155 100644 --- a/dali-scene3d/internal/model-components/model-node-impl.h +++ b/dali-scene3d/internal/model-components/model-node-impl.h @@ -2,7 +2,7 @@ #define DALI_SCENE3D_MODEL_COMPONENTS_MODEL_NODE_IMPL_H /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -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..0086c1f 100644 --- a/dali-scene3d/public-api/light/light.cpp +++ b/dali-scene3d/public-api/light/light.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -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..3d8d763 100644 --- a/dali-scene3d/public-api/light/light.h +++ b/dali-scene3d/public-api/light/light.h @@ -2,7 +2,7 @@ #define DALI_SCENE3D_LIGHT_H /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -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..a93d71e 100644 --- a/dali-scene3d/public-api/model-components/model-node.cpp +++ b/dali-scene3d/public-api/model-components/model-node.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -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..993d9dd 100644 --- a/dali-scene3d/public-api/model-components/model-node.h +++ b/dali-scene3d/public-api/model-components/model-node.h @@ -2,7 +2,7 @@ #define DALI_SCENE3D_MODEL_COMPONENTS_MODEL_NODE_H /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -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: /**