1 #ifndef DALI_INTERNAL_ACTOR_H
2 #define DALI_INTERNAL_ACTOR_H
5 * Copyright (c) 2022 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
25 #include <dali/public-api/actors/actor.h>
26 #include <dali/public-api/common/dali-common.h>
27 #include <dali/public-api/common/vector-wrapper.h>
28 #include <dali/public-api/events/gesture.h>
29 #include <dali/public-api/math/viewport.h>
30 #include <dali/public-api/object/ref-object.h>
31 #include <dali/public-api/size-negotiation/relayout-container.h>
33 #include <dali/devel-api/actors/actor-devel.h>
34 #include <dali/devel-api/rendering/renderer-devel.h>
36 #include <dali/integration-api/events/touch-event-integ.h>
38 #include <dali/internal/common/const-string.h>
39 #include <dali/internal/common/internal-constants.h>
40 #include <dali/internal/common/memory-pool-object-allocator.h>
41 #include <dali/internal/event/actors/actor-declarations.h>
42 #include <dali/internal/event/actors/actor-parent-impl.h>
43 #include <dali/internal/event/actors/actor-parent.h>
44 #include <dali/internal/event/actors/actor-renderer-container.h>
45 #include <dali/internal/event/actors/actor-sizer.h>
46 #include <dali/internal/event/common/object-impl.h>
47 #include <dali/internal/event/common/stage-def.h>
48 #include <dali/internal/update/nodes/node-declarations.h>
60 class ActorGestureData;
66 class ActorDepthTreeNode;
67 using DepthNodeMemoryPool = Dali::Internal::MemoryPoolObjectAllocator<ActorDepthTreeNode>;
70 * Actor is the primary object with which Dali applications interact.
71 * UI controls can be built by combining multiple actors.
72 * Multi-Touch events are received through signals emitted by the actor tree.
74 * An Actor is a proxy for a Node in the scene graph.
75 * When an Actor is added to the Stage, it creates a node and connects it to the scene graph.
76 * The scene-graph can be updated in a separate thread, so the connection is done using an asynchronous message.
77 * When a tree of Actors is detached from the Stage, a message is sent to destroy the associated nodes.
79 class Actor : public Object, public ActorParent
84 * @return A smart-pointer to the newly allocated Actor.
86 static ActorPtr New();
89 * Helper to create node for derived classes who don't have their own node type
90 * @return pointer to newly created unique node
92 static const SceneGraph::Node* CreateNode();
95 * Retrieve the name of the actor.
98 std::string_view GetName() const
100 return mName.GetStringView();
104 * Set the name of the actor.
105 * @param[in] name The new name.
107 void SetName(std::string_view name);
110 * @copydoc Dali::Actor::GetId
112 uint32_t GetId() const;
117 * Query whether an actor is the root actor, which is owned by the Stage.
118 * @return True if the actor is a root actor.
126 * Query whether the actor is connected to the Scene.
134 * Query whether the actor has any renderers.
135 * @return True if the actor is renderable.
137 bool IsRenderable() const
139 // inlined as this is called a lot in hit testing
140 return mRenderers && !mRenderers->IsEmpty();
144 * Query whether the actor is of class Dali::Layer
145 * @return True if the actor is a layer.
149 // inlined as this is called a lot in hit testing
154 * Gets the layer in which the actor is present
155 * @return The layer, which will be uninitialized if the actor is off-stage.
157 Dali::Layer GetLayer();
160 * @copydoc Dali::Internal::ActorParent::Add()
162 void Add(Actor& child, bool notify = true) override;
165 * @copydoc Dali::Internal::ActorParent::Remove()
167 void Remove(Actor& child, bool notify = true) override;
170 * @copydoc Dali::DevelActor::SwitchParent()
172 void SwitchParent(Actor& newParent);
175 * @copydoc Dali::Actor::Unparent
180 * @copydoc Dali::Internal::ActorParent::GetChildCount()
182 uint32_t GetChildCount() const override;
185 * @copydoc Dali::Internal::ActorParent::GetChildAt
187 ActorPtr GetChildAt(uint32_t index) const override;
190 * Retrieve a reference to Actor's children.
191 * @note Not for public use.
192 * @return A reference to the container of children.
193 * @note The internal container is lazily initialized so ensure you check the child count before using the value returned by this method.
195 ActorContainer& GetChildrenInternal();
198 * @copydoc Dali::Internal::ActorParent::FindChildByName
200 ActorPtr FindChildByName(ConstString actorName) override;
203 * @copydoc Dali::Internal::ActorParent::FindChildById
205 ActorPtr FindChildById(const uint32_t id) override;
208 * @copydoc Dali::Internal::ActorParent::UnparentChildren
210 void UnparentChildren() override;
213 * Retrieve the parent of an Actor.
214 * @return The parent actor, or NULL if the Actor does not have a parent.
216 Actor* GetParent() const
218 return static_cast<Actor*>(mParent);
222 * Calculates screen position and size.
224 * @return pair of two values, position of top-left corner on screen and size respectively.
226 Rect<> CalculateScreenExtents() const;
229 * @copydoc DevelActor::SetNeedGesturePropagation.
231 void SetNeedGesturePropagation(bool propagation)
233 mNeedGesturePropagation = propagation;
237 * Retrieve need gesture propagation value
238 * @return The actor's need gesture propagation value.
240 bool NeedGesturePropagation() const
242 return mNeedGesturePropagation;
246 * Sets the size of an actor.
247 * This does not interfere with the actors scale factor.
248 * @param [in] width The new width.
249 * @param [in] height The new height.
251 void SetSize(float width, float height);
254 * Sets the size of an actor.
255 * This does not interfere with the actors scale factor.
256 * @param [in] width The size of the actor along the x-axis.
257 * @param [in] height The size of the actor along the y-axis.
258 * @param [in] depth The size of the actor along the z-axis.
260 void SetSize(float width, float height, float depth);
263 * Sets the size of an actor.
264 * This does not interfere with the actors scale factor.
265 * @param [in] size The new size.
267 void SetSize(const Vector2& size);
270 * Sets the size of an actor.
271 * This does not interfere with the actors scale factor.
272 * @param [in] size The new size.
274 void SetSize(const Vector3& size);
277 * Set the width component of the Actor's size.
278 * @param [in] width The new width component.
280 void SetWidth(float width);
283 * Set the height component of the Actor's size.
284 * @param [in] height The new height component.
286 void SetHeight(float height);
289 * Set the depth component of the Actor's size.
290 * @param [in] depth The new depth component.
292 void SetDepth(float depth);
295 * Retrieve the Actor's size from event side.
296 * This size will be the size set or if animating then the target size.
297 * @return The Actor's size.
299 Vector3 GetTargetSize() const;
302 * Retrieve the Actor's size from update side.
303 * This size will be the size set or animating but will be a frame behind.
304 * @return The Actor's size.
306 const Vector3& GetCurrentSize() const;
309 * Return the natural size of the actor
311 * @return The actor's natural size
313 virtual Vector3 GetNaturalSize() const;
316 * Set the origin of an actor, within its parent's area.
317 * This is expressed in 2D unit coordinates, such that (0.0, 0.0, 0.5) is the top-left corner of the parent,
318 * and (1.0, 1.0, 0.5) is the bottom-right corner.
319 * The default parent-origin is top-left (0.0, 0.0, 0.5).
320 * An actor position is the distance between this origin, and the actors anchor-point.
321 * @param [in] origin The new parent-origin.
323 void SetParentOrigin(const Vector3& origin);
326 * Retrieve the parent-origin of an actor.
327 * @return The parent-origin.
329 const Vector3& GetCurrentParentOrigin() const;
332 * Set the anchor-point of an actor. This is expressed in 2D unit coordinates, such that
333 * (0.0, 0.0, 0.5) is the top-left corner of the actor, and (1.0, 1.0, 0.5) is the bottom-right corner.
334 * The default anchor point is top-left (0.0, 0.0, 0.5).
335 * An actor position is the distance between its parent-origin, and this anchor-point.
336 * An actor's rotation is centered around its anchor-point.
337 * @param [in] anchorPoint The new anchor-point.
339 void SetAnchorPoint(const Vector3& anchorPoint);
342 * Retrieve the anchor-point of an actor.
343 * @return The anchor-point.
345 const Vector3& GetCurrentAnchorPoint() const;
348 * If the position uses the anchor point, return the anchor point, otherwise
350 * @return The anchor point for positioning.
352 Vector3 GetAnchorPointForPosition() const;
355 * Sets the position of the Actor.
356 * The coordinates are relative to the Actor's parent.
357 * The Actor's z position will be set to 0.0f.
358 * @param [in] x The new x position
359 * @param [in] y The new y position
361 void SetPosition(float x, float y);
364 * Sets the position of the Actor.
365 * The coordinates are relative to the Actor's parent.
366 * @param [in] x The new x position
367 * @param [in] y The new y position
368 * @param [in] z The new z position
370 void SetPosition(float x, float y, float z);
373 * Sets the position of the Actor.
374 * The coordinates are relative to the Actor's parent.
375 * @param [in] position The new position.
377 void SetPosition(const Vector3& position);
380 * Set the position of an actor along the X-axis.
381 * @param [in] x The new x position
386 * Set the position of an actor along the Y-axis.
387 * @param [in] y The new y position.
392 * Set the position of an actor along the Z-axis.
393 * @param [in] z The new z position
398 * Translate an actor relative to its existing position.
399 * @param[in] distance The actor will move by this distance.
401 void TranslateBy(const Vector3& distance);
404 * Retrieve the position of the Actor.
405 * The coordinates are relative to the Actor's parent.
406 * @return the Actor's position.
408 const Vector3& GetCurrentPosition() const;
411 * Retrieve the target position of the Actor.
412 * The coordinates are relative to the Actor's parent.
413 * @return the Actor's position.
415 const Vector3& GetTargetPosition() const
417 return mTargetPosition;
421 * @copydoc Dali::Actor::GetCurrentWorldPosition()
423 const Vector3& GetCurrentWorldPosition() const;
426 * @copydoc Dali::Actor::SetInheritPosition()
428 void SetInheritPosition(bool inherit);
431 * @copydoc Dali::Actor::IsPositionInherited()
433 bool IsPositionInherited() const
435 return mInheritPosition;
439 * Sets the orientation of the Actor.
440 * @param [in] angleRadians The new orientation angle in radians.
441 * @param [in] axis The new axis of orientation.
443 void SetOrientation(const Radian& angleRadians, const Vector3& axis);
446 * Sets the orientation of the Actor.
447 * @param [in] orientation The new orientation.
449 void SetOrientation(const Quaternion& orientation);
452 * Rotate an actor around its existing rotation axis.
453 * @param[in] angleRadians The angle to the rotation to combine with the existing rotation.
454 * @param[in] axis The axis of the rotation to combine with the existing rotation.
456 void RotateBy(const Radian& angleRadians, const Vector3& axis);
459 * Apply a relative rotation to an actor.
460 * @param[in] relativeRotation The rotation to combine with the actors existing rotation.
462 void RotateBy(const Quaternion& relativeRotation);
465 * Retreive the Actor's orientation.
466 * @return the orientation.
468 const Quaternion& GetCurrentOrientation() const;
471 * Set whether a child actor inherits it's parent's orientation. Default is to inherit.
472 * Switching this off means that using SetOrientation() sets the actor's world orientation.
473 * @param[in] inherit - true if the actor should inherit orientation, false otherwise.
475 void SetInheritOrientation(bool inherit);
478 * Returns whether the actor inherit's it's parent's orientation.
479 * @return true if the actor inherit's it's parent orientation, false if it uses world orientation.
481 bool IsOrientationInherited() const
483 return mInheritOrientation;
487 * Sets the factor of the parents size used for the child actor.
488 * Note: Only used if ResizePolicy is ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.
489 * @param[in] factor The vector to multiply the parents size by to get the childs size.
491 void SetSizeModeFactor(const Vector3& factor);
494 * Gets the factor of the parents size used for the child actor.
495 * Note: Only used if ResizePolicy is ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.
496 * @return The vector being used to multiply the parents size by to get the childs size.
498 const Vector3& GetSizeModeFactor() const;
501 * @copydoc Dali::Actor::GetCurrentWorldOrientation()
503 const Quaternion& GetCurrentWorldOrientation() const;
506 * Sets a scale factor applied to an actor.
507 * @param [in] scale The scale factor applied on all axes.
509 void SetScale(float scale);
512 * Sets a scale factor applied to an actor.
513 * @param [in] scaleX The scale factor applied along the x-axis.
514 * @param [in] scaleY The scale factor applied along the y-axis.
515 * @param [in] scaleZ The scale factor applied along the z-axis.
517 void SetScale(float scaleX, float scaleY, float scaleZ);
520 * Sets a scale factor applied to an actor.
521 * @param [in] scale A vector representing the scale factor for each axis.
523 void SetScale(const Vector3& scale);
526 * Set the x component of the scale factor.
527 * @param [in] x The new x value.
529 void SetScaleX(float x);
532 * Set the y component of the scale factor.
533 * @param [in] y The new y value.
535 void SetScaleY(float y);
538 * Set the z component of the scale factor.
539 * @param [in] z The new z value.
541 void SetScaleZ(float z);
544 * Apply a relative scale to an actor.
545 * @param[in] relativeScale The scale to combine with the actors existing scale.
547 void ScaleBy(const Vector3& relativeScale);
550 * Retrieve the scale factor applied to an actor.
551 * @return A vector representing the scale factor for each axis.
553 const Vector3& GetCurrentScale() const;
556 * @copydoc Dali::Actor::GetCurrentWorldScale()
558 const Vector3& GetCurrentWorldScale() const;
561 * @copydoc Dali::Actor::SetInheritScale()
563 void SetInheritScale(bool inherit);
566 * @copydoc Dali::Actor::IsScaleInherited()
568 bool IsScaleInherited() const
570 return mInheritScale;
574 * @copydoc Dali::Actor::GetCurrentWorldMatrix()
576 Matrix GetCurrentWorldMatrix() const;
581 * Sets the visibility flag of an actor.
582 * @param[in] visible The new visibility flag.
584 void SetVisible(bool visible);
587 * Retrieve the visibility flag of an actor.
588 * @return The visibility flag.
590 bool IsVisible() const;
593 * Sets the opacity of an actor.
594 * @param [in] opacity The new opacity.
596 void SetOpacity(float opacity);
599 * Retrieve the actor's opacity.
600 * @return The actor's opacity.
602 float GetCurrentOpacity() const;
605 * Retrieve the actor's clipping mode.
606 * @return The actor's clipping mode (cached)
608 ClippingMode::Type GetClippingMode() const
610 return mClippingMode;
614 * Sets whether an actor should emit touch or hover signals; see SignalTouch() and SignalHover().
615 * An actor is sensitive by default, which means that as soon as an application connects to the SignalTouch(),
616 * the touch event signal will be emitted, and as soon as an application connects to the SignalHover(), the
617 * hover event signal will be emitted.
619 * If the application wishes to temporarily disable the touch or hover event signal emission, then they can do so by calling:
621 * actor.SetSensitive(false);
624 * Then, to re-enable the touch or hover event signal emission, the application should call:
626 * actor.SetSensitive(true);
629 * @see SignalTouch() and SignalHover().
630 * @note If an actor's sensitivity is set to false, then it's children will not emit a touch or hover event signal either.
631 * @param[in] sensitive true to enable emission of the touch or hover event signals, false otherwise.
633 void SetSensitive(bool sensitive)
635 mSensitive = sensitive;
639 * Query whether an actor emits touch or hover event signals.
640 * @see SetSensitive(bool)
641 * @return true, if emission of touch or hover event signals is enabled, false otherwise.
643 bool IsSensitive() const
649 * Sets whether an actor should be enabled all user interaction including touch, focus and activation.
650 * This value have higher priority over the sensitve and focusable in negative action,
651 * which means IsSensitive() or IsFocusable() and enable is false, actor will not emits touch or focus event.
652 * An actor is enabled by default.
654 * If the application wishes to temporarily disable user interaction:
656 * actor.SetUserInteractionEnabled(false);
659 * Then, to re-enable user interaction, the application should call:
661 * actor.SetUserInteractionEnabled(true);
664 * @see IsSensitive(), IsHittable(), IsKeyboardFocusable() and IsTouchFocusable().
665 * @note If an actor's disabled, child still can be enabled.
666 * @param[in] enabled true to enable user interaction, false otherwise.
668 void SetUserInteractionEnabled(bool enabled)
670 mUserInteractionEnabled = enabled;
674 * Query whether an actor is enabled user interaction.
675 * @see SetSensitive(bool)
676 * @return true, if user interaction is enabled, false otherwise.
678 bool IsUserInteractionEnabled() const
680 return mUserInteractionEnabled;
684 * @copydoc Dali::Actor::SetDrawMode
686 void SetDrawMode(DrawMode::Type drawMode);
689 * @copydoc Dali::Actor::GetDrawMode
691 DrawMode::Type GetDrawMode() const
697 * @copydoc Dali::Actor::IsOverlay
699 bool IsOverlay() const
701 return (DrawMode::OVERLAY_2D == mDrawMode);
705 * Sets the actor's color. The final color of actor depends on its color mode.
706 * This final color is applied to the drawable elements of an actor.
707 * @param [in] color The new color.
709 void SetColor(const Vector4& color);
712 * Set the red component of the color.
713 * @param [in] red The new red component.
715 void SetColorRed(float red);
718 * Set the green component of the color.
719 * @param [in] green The new green component.
721 void SetColorGreen(float green);
724 * Set the blue component of the scale factor.
725 * @param [in] blue The new blue value.
727 void SetColorBlue(float blue);
730 * Retrieve the actor's color.
733 const Vector4& GetCurrentColor() const;
736 * Sets the actor's color mode.
737 * Color mode specifies whether Actor uses its own color or inherits its parent color
738 * @param [in] colorMode to use.
740 void SetColorMode(ColorMode colorMode);
743 * Returns the actor's color mode.
744 * @return currently used colorMode.
746 ColorMode GetColorMode() const
752 * @copydoc Dali::Actor::GetCurrentWorldColor()
754 const Vector4& GetCurrentWorldColor() const;
757 * @copydoc Dali::Actor::GetHierarchyDepth()
759 inline int32_t GetHierarchyDepth() const
770 * Get the actor's sorting depth
772 * @return The depth used for hit-testing and renderer sorting
774 inline uint32_t GetSortingDepth()
780 * Set the actor's sorted depth. Used during recreation of depth tree
781 * @param[in] sortedDepth the new sorted depth
783 inline void SetSortingDepth(uint32_t sortedDepth)
785 mSortedDepth = sortedDepth;
789 // Size negotiation virtual functions
792 * @brief Called after the size negotiation has been finished for this control.
794 * The control is expected to assign this given size to itself/its children.
796 * Should be overridden by derived classes if they need to layout
797 * actors differently after certain operations like add or remove
798 * actors, resize or after changing specific properties.
800 * Note! As this function is called from inside the size negotiation algorithm, you cannot
801 * call RequestRelayout (the call would just be ignored)
803 * @param[in] size The allocated size.
804 * @param[in,out] container The control should add actors to this container that it is not able
805 * to allocate a size for.
807 virtual void OnRelayout(const Vector2& size, RelayoutContainer& container)
812 * @brief Notification for deriving classes when the resize policy is set
814 * @param[in] policy The policy being set
815 * @param[in] dimension The dimension the policy is being set for
817 virtual void OnSetResizePolicy(ResizePolicy::Type policy, Dimension::Type dimension)
822 * @brief Virtual method to notify deriving classes that relayout dependencies have been
823 * met and the size for this object is about to be calculated for the given dimension
825 * @param dimension The dimension that is about to be calculated
827 virtual void OnCalculateRelayoutSize(Dimension::Type dimension)
832 * @brief Virtual method to notify deriving classes that the size for a dimension
833 * has just been negotiated
835 * @param[in] size The new size for the given dimension
836 * @param[in] dimension The dimension that was just negotiated
838 virtual void OnLayoutNegotiated(float size, Dimension::Type dimension)
843 * @brief Determine if this actor is dependent on it's children for relayout
845 * @param dimension The dimension(s) to check for
846 * @return Return if the actor is dependent on it's children
848 virtual bool RelayoutDependentOnChildren(Dimension::Type dimension = Dimension::ALL_DIMENSIONS);
851 * @brief Calculate the size for a child
853 * @param[in] child The child actor to calculate the size for
854 * @param[in] dimension The dimension to calculate the size for. E.g. width or height.
855 * @return Return the calculated size for the given dimension
857 virtual float CalculateChildSize(const Dali::Actor& child, Dimension::Type dimension);
860 * @brief This method is called during size negotiation when a height is required for a given width.
862 * Derived classes should override this if they wish to customize the height returned.
864 * @param width to use.
865 * @return the height based on the width.
867 virtual float GetHeightForWidth(float width);
870 * @brief This method is called during size negotiation when a width is required for a given height.
872 * Derived classes should override this if they wish to customize the width returned.
874 * @param height to use.
875 * @return the width based on the width.
877 virtual float GetWidthForHeight(float height);
883 * @brief Called by the RelayoutController to negotiate the size of an actor.
885 * The size allocated by the the algorithm is passed in which the
886 * actor must adhere to. A container is passed in as well which
887 * the actor should populate with actors it has not / or does not
888 * need to handle in its size negotiation.
890 * @param[in] size The allocated size.
891 * @param[in,out] container The container that holds actors that are fed back into the
892 * RelayoutController algorithm.
894 void NegotiateSize(const Vector2& size, RelayoutContainer& container);
897 * @copydoc Dali::Actor::SetResizePolicy()
899 void SetResizePolicy(ResizePolicy::Type policy, Dimension::Type dimension = Dimension::ALL_DIMENSIONS);
902 * @copydoc Dali::Actor::GetResizePolicy()
904 ResizePolicy::Type GetResizePolicy(Dimension::Type dimension) const;
907 * @brief Set the size negotiation relayout enabled on this actor
909 * @param[in] relayoutEnabled Boolean to enable or disable relayout
911 void SetRelayoutEnabled(bool relayoutEnabled);
914 * @brief Return if relayout is enabled
916 * @return Return if relayout is enabled or not for this actor
918 bool IsRelayoutEnabled() const;
921 * @brief Mark an actor as having it's layout dirty
922 * @note Only called from RelayoutController
924 * @param dirty Whether to mark actor as dirty or not
925 * @param dimension The dimension(s) to mark as dirty
927 void SetLayoutDirty(bool dirty, Dimension::Type dimension = Dimension::ALL_DIMENSIONS);
930 * @brief Return if any of an actor's dimensions are marked as dirty
931 * @note Only called from RelayoutController
933 * @param dimension The dimension(s) to check
934 * @return Return if any of the requested dimensions are dirty
936 bool IsLayoutDirty(Dimension::Type dimension = Dimension::ALL_DIMENSIONS) const;
939 * @brief Returns if relayout is enabled and the actor is not dirty
940 * @note Only called from RelayoutController
942 * @return Return if it is possible to relayout the actor
944 bool RelayoutPossible(Dimension::Type dimension = Dimension::ALL_DIMENSIONS) const;
947 * @brief Returns if relayout is enabled and the actor is dirty
948 * @note Only called from RelayoutController
950 * @return Return if it is required to relayout the actor
952 bool RelayoutRequired(Dimension::Type dimension = Dimension::ALL_DIMENSIONS) const;
955 * @brief Request a relayout, which means performing a size negotiation on this actor, its parent and children (and potentially whole scene)
957 * This method is automatically called from OnSceneConnection(), OnChildAdd(),
958 * OnChildRemove(), SetSizePolicy(), SetMinimumSize() and SetMaximumSize().
960 * This method can also be called from a derived class every time it needs a different size.
961 * At the end of event processing, the relayout process starts and
962 * all controls which requested Relayout will have their sizes (re)negotiated.
964 * @note RelayoutRequest() can be called multiple times; the size negotiation is still
965 * only performed once, i.e. there is no need to keep track of this in the calling side.
967 void RelayoutRequest(Dimension::Type dimension = Dimension::ALL_DIMENSIONS);
970 * @brief Determine if this actor is dependent on it's parent for relayout
971 * @note Only called from RelayoutController
973 * @param dimension The dimension(s) to check for
974 * @return Return if the actor is dependent on it's parent
976 bool RelayoutDependentOnParent(Dimension::Type dimension = Dimension::ALL_DIMENSIONS);
979 * @brief Determine if this actor has another dimension depedent on the specified one
980 * @note Only called from RelayoutController
982 * @param dimension The dimension to check for
983 * @param dependentDimension The dimension to check for dependency with
984 * @return Return if the actor is dependent on this dimension
986 bool RelayoutDependentOnDimension(Dimension::Type dimension, Dimension::Type dependentDimension);
989 * @brief Set the padding for a dimension
991 * @param[in] padding Padding for the dimension. X = start (e.g. left, bottom), y = end (e.g. right, top)
992 * @param[in] dimension The dimension to set
994 void SetPadding(const Vector2& padding, Dimension::Type dimension);
997 * Return the value of padding for the given dimension
999 * @param dimension The dimension to retrieve
1000 * @return Return the value of padding for the dimension
1002 Vector2 GetPadding(Dimension::Type dimension) const;
1005 * @brief Return the amount of size allocated for relayout
1007 * May include padding
1009 * @param[in] dimension The dimension to retrieve
1010 * @return Return the size
1012 float GetRelayoutSize(Dimension::Type dimension) const;
1015 * @brief Flag the actor as having it's layout dimension negotiated.
1017 * @param[in] negotiated The status of the flag to set.
1018 * @param[in] dimension The dimension to set the flag for
1020 void SetLayoutNegotiated(bool negotiated, Dimension::Type dimension = Dimension::ALL_DIMENSIONS);
1023 * @brief Test whether the layout dimension for this actor has been negotiated or not.
1025 * @param[in] dimension The dimension to determine the value of the flag for
1026 * @return Return if the layout dimension is negotiated or not.
1028 bool IsLayoutNegotiated(Dimension::Type dimension = Dimension::ALL_DIMENSIONS) const;
1031 * @brief provides the Actor implementation of GetHeightForWidth
1032 * @param width to use.
1033 * @return the height based on the width.
1035 float GetHeightForWidthBase(float width);
1038 * @brief provides the Actor implementation of GetWidthForHeight
1039 * @param height to use.
1040 * @return the width based on the height.
1042 float GetWidthForHeightBase(float height);
1045 * @brief provides the Actor implementation of CalculateChildSize
1047 * @param[in] child The child actor to calculate the size for
1048 * @param[in] dimension The dimension to calculate the size for. E.g. width or height.
1049 * @return Return the calculated size for the given dimension
1051 float CalculateChildSizeBase(const Dali::Actor& child, Dimension::Type dimension);
1054 * @brief Determine if this actor is dependent on it's children for relayout.
1056 * @param dimension The dimension(s) to check for
1057 * @return Return if the actor is dependent on it's children
1059 bool RelayoutDependentOnChildrenBase(Dimension::Type dimension = Dimension::ALL_DIMENSIONS);
1062 * @copydoc Dali::Actor::SetMinimumSize
1064 void SetMinimumSize(float size, Dimension::Type dimension = Dimension::ALL_DIMENSIONS);
1067 * @copydoc Dali::Actor::GetMinimumSize
1069 float GetMinimumSize(Dimension::Type dimension) const;
1072 * @copydoc Dali::Actor::SetMaximumSize
1074 void SetMaximumSize(float size, Dimension::Type dimension = Dimension::ALL_DIMENSIONS);
1077 * @copydoc Dali::Actor::GetMaximumSize
1079 float GetMaximumSize(Dimension::Type dimension) const;
1082 * @copydoc Dali::Actor::AddRenderer()
1084 uint32_t AddRenderer(Renderer& renderer);
1087 * @copydoc Dali::Actor::GetRendererCount()
1089 uint32_t GetRendererCount() const;
1092 * @copydoc Dali::Actor::GetRendererAt()
1094 RendererPtr GetRendererAt(uint32_t index);
1097 * @copydoc Dali::Actor::RemoveRenderer()
1099 void RemoveRenderer(Renderer& renderer);
1102 * @copydoc Dali::Actor::RemoveRenderer()
1104 void RemoveRenderer(uint32_t index);
1107 * @brief Set BlendEquation at each renderer that added on this Actor.
1109 void SetBlendEquation(DevelBlendEquation::Type blendEquation);
1112 * @brief Get Blend Equation that applied to this Actor
1114 DevelBlendEquation::Type GetBlendEquation() const;
1117 * @brief Set this Actor is transparent or not without any affection on the child Actors.
1119 void SetTransparent(bool transparent);
1122 * @brief Get this Actor is transparent or not.
1124 bool IsTransparent() const;
1128 * Converts screen coordinates into the actor's coordinate system.
1129 * @note The actor coordinates are relative to the top-left (0.0, 0.0, 0.5)
1130 * @param[out] localX On return, the X-coordinate relative to the actor.
1131 * @param[out] localY On return, the Y-coordinate relative to the actor.
1132 * @param[in] screenX The screen X-coordinate.
1133 * @param[in] screenY The screen Y-coordinate.
1134 * @return True if the conversion succeeded.
1136 bool ScreenToLocal(float& localX, float& localY, float screenX, float screenY) const;
1139 * Converts screen coordinates into the actor's coordinate system.
1140 * @note The actor coordinates are relative to the top-left (0.0, 0.0, 0.5)
1141 * @param[in] renderTask The render-task used to display the actor.
1142 * @param[out] localX On return, the X-coordinate relative to the actor.
1143 * @param[out] localY On return, the Y-coordinate relative to the actor.
1144 * @param[in] screenX The screen X-coordinate.
1145 * @param[in] screenY The screen Y-coordinate.
1146 * @return True if the conversion succeeded.
1148 bool ScreenToLocal(const RenderTask& renderTask, float& localX, float& localY, float screenX, float screenY) const;
1151 * Converts from the actor's coordinate system to screen coordinates.
1152 * @note The actor coordinates are relative to the top-left (0.0, 0.0, 0.5)
1153 * @param[in] viewMatrix The view-matrix
1154 * @param[in] projectionMatrix The projection-matrix
1155 * @param[in] viewport The view-port
1156 * @param[out] localX On return, the X-coordinate relative to the actor.
1157 * @param[out] localY On return, the Y-coordinate relative to the actor.
1158 * @param[in] screenX The screen X-coordinate.
1159 * @param[in] screenY The screen Y-coordinate.
1160 * @return True if the conversion succeeded.
1162 bool ScreenToLocal(const Matrix& viewMatrix,
1163 const Matrix& projectionMatrix,
1164 const Viewport& viewport,
1168 float screenY) const;
1171 * Sets whether the actor should receive a notification when touch or hover motion events leave
1172 * the boundary of the actor.
1174 * @note By default, this is set to false as most actors do not require this.
1175 * @note Need to connect to the SignalTouch or SignalHover to actually receive this event.
1177 * @param[in] required Should be set to true if a Leave event is required
1179 void SetLeaveRequired(bool required)
1181 mLeaveRequired = required;
1185 * This returns whether the actor requires touch or hover events whenever touch or hover motion events leave
1186 * the boundary of the actor.
1187 * @return true if a Leave event is required, false otherwise.
1189 bool GetLeaveRequired() const
1191 return mLeaveRequired;
1195 * @copydoc Dali::Actor::SetKeyboardFocusable()
1197 void SetKeyboardFocusable(bool focusable)
1199 mKeyboardFocusable = focusable;
1203 * @copydoc Dali::Actor::IsKeyboardFocusable()
1205 bool IsKeyboardFocusable() const
1207 return mKeyboardFocusable;
1211 * @copydoc Dali::Actor::SetKeyboardFocusableChildren()
1213 void SetKeyboardFocusableChildren(bool focusable)
1215 mKeyboardFocusableChildren = focusable;
1219 * @copydoc Dali::Actor::AreChildrenKeyBoardFocusable()
1221 bool AreChildrenKeyBoardFocusable() const
1223 return mKeyboardFocusableChildren;
1227 * Set whether this view can focus by touch.
1228 * @param[in] focusable focuable by touch.
1230 void SetTouchFocusable(bool focusable)
1232 mTouchFocusable = focusable;
1236 * This returns whether this actor can focus by touch.
1237 * @return true if this actor can focus by touch.
1239 bool IsTouchFocusable() const
1241 return mTouchFocusable;
1245 * Query whether the application or derived actor type requires hit-test result events.
1246 * @return True if hit-test result events are required.
1248 bool IsHitTestResultRequired() const
1250 return !mHitTestResultSignal.Empty();
1254 * Query whether the application or derived actor type requires intercept touch events.
1255 * @return True if intercept touch events are required.
1257 bool GetInterceptTouchRequired() const
1259 return !mInterceptTouchedSignal.Empty();
1263 * Query whether the application or derived actor type requires touch events.
1264 * @return True if touch events are required.
1266 bool GetTouchRequired() const
1268 return !mTouchedSignal.Empty();
1272 * Query whether the application or derived actor type requires hover events.
1273 * @return True if hover events are required.
1275 bool GetHoverRequired() const
1277 return !mHoveredSignal.Empty();
1281 * Query whether the application or derived actor type requires wheel events.
1282 * @return True if wheel events are required.
1284 bool GetWheelEventRequired() const
1286 return !mWheelEventSignal.Empty();
1290 * Query whether the actor is actually hittable. This method checks whether the actor is
1291 * sensitive, has the visibility flag set to true and is not fully transparent.
1292 * @return true, if it can be hit, false otherwise.
1294 bool IsHittable() const
1296 return (IsUserInteractionEnabled()) && IsSensitive() && IsVisible() && (GetCurrentWorldColor().a > FULLY_TRANSPARENT) && IsNodeConnected();
1300 * Query whether the actor captures all touch after it starts even if touch leaves its boundary.
1301 * @return true, if it captures all touch after start
1303 bool CapturesAllTouchAfterStart() const
1305 return mCaptureAllTouchAfterStart;
1309 * Sets the touch area offset of an actor.
1310 * @param [in] offset The new offset of area (left, right, bottom, top).
1312 void SetTouchAreaOffset(Rect<int> offset)
1314 mTouchAreaOffset = offset;
1318 * Retrieve the Actor's touch area offset.
1319 * @return The Actor's touch area offset.
1321 const Rect<int>& GetTouchAreaOffset() const
1323 return mTouchAreaOffset;
1329 * Retrieve the gesture data associated with this actor. The first call to this method will
1330 * allocate space for the ActorGestureData so this should only be called if an actor really does
1332 * @return Reference to the ActorGestureData for this actor.
1333 * @note Once the gesture-data is created for an actor it is likely that gestures are required
1334 * throughout the actor's lifetime so it will only be deleted when the actor is destroyed.
1336 ActorGestureData& GetGestureData();
1339 * Queries whether the actor requires the gesture type.
1340 * @param[in] type The gesture type.
1341 * @return True if the gesture is required, false otherwise.
1343 bool IsGestureRequired(GestureType::Value type) const;
1348 * Used by the EventProcessor to emit intercept touch event signals.
1349 * @param[in] touch The touch data.
1350 * @return True if the event was intercepted.
1352 bool EmitInterceptTouchEventSignal(const Dali::TouchEvent& touch);
1355 * Used by the EventProcessor to emit touch event signals.
1356 * @param[in] touch The touch data.
1357 * @return True if the event was consumed.
1359 bool EmitTouchEventSignal(const Dali::TouchEvent& touch);
1362 * Used by the EventProcessor to emit hover event signals.
1363 * @param[in] event The hover event.
1364 * @return True if the event was consumed.
1366 bool EmitHoverEventSignal(const Dali::HoverEvent& event);
1369 * Used by the EventProcessor to emit wheel event signals.
1370 * @param[in] event The wheel event.
1371 * @return True if the event was consumed.
1373 bool EmitWheelEventSignal(const Dali::WheelEvent& event);
1376 * @brief Emits the visibility change signal for this actor and all its children.
1377 * @param[in] visible Whether the actor has become visible or not.
1378 * @param[in] type Whether the actor's visible property has changed or a parent's.
1380 void EmitVisibilityChangedSignal(bool visible, DevelActor::VisibilityChange::Type type);
1383 * @brief Emits the layout direction change signal for this actor and all its children.
1384 * @param[in] type Whether the actor's layout direction property has changed or a parent's.
1386 void EmitLayoutDirectionChangedSignal(LayoutDirection::Type type);
1389 * Used by the EventProcessor to emit hit-test result touch event signals.
1390 * @param[in] point The point of event touched.
1391 * @param[in] hitPointLocal The hit point in the Actor's local reference system.
1392 * @param[in] timeStamp The time the event occurred.
1393 * @return True if the event was consumed.
1395 bool EmitHitTestResultSignal(Integration::Point point, Vector2 hitPointLocal, uint32_t timeStamp);
1398 * @copydoc DevelActor::HitTestResultSignal()
1400 Dali::Actor::TouchEventSignalType& HitTestResultSignal()
1402 return mHitTestResultSignal;
1406 * @copydoc DevelActor::InterceptTouchedSignal()
1408 Dali::Actor::TouchEventSignalType& InterceptTouchedSignal()
1410 return mInterceptTouchedSignal;
1414 * @copydoc Dali::Actor::TouchedSignal()
1416 Dali::Actor::TouchEventSignalType& TouchedSignal()
1418 return mTouchedSignal;
1422 * @copydoc Dali::Actor::HoveredSignal()
1424 Dali::Actor::HoverSignalType& HoveredSignal()
1426 return mHoveredSignal;
1430 * @copydoc Dali::Actor::WheelEventSignal()
1432 Dali::Actor::WheelEventSignalType& WheelEventSignal()
1434 return mWheelEventSignal;
1438 * @copydoc Dali::Actor::OnSceneSignal()
1440 Dali::Actor::OnSceneSignalType& OnSceneSignal()
1442 return mOnSceneSignal;
1446 * @copydoc Dali::Actor::OffSceneSignal()
1448 Dali::Actor::OffSceneSignalType& OffSceneSignal()
1450 return mOffSceneSignal;
1454 * @copydoc Dali::Actor::OnRelayoutSignal()
1456 Dali::Actor::OnRelayoutSignalType& OnRelayoutSignal()
1458 return mOnRelayoutSignal;
1462 * @copydoc DevelActor::VisibilityChangedSignal
1464 DevelActor::VisibilityChangedSignalType& VisibilityChangedSignal()
1466 return mVisibilityChangedSignal;
1470 * @copydoc LayoutDirectionChangedSignal
1472 Dali::Actor::LayoutDirectionChangedSignalType& LayoutDirectionChangedSignal()
1474 return mLayoutDirectionChangedSignal;
1478 * @copydoc DevelActor::ChildAddedSignal
1480 DevelActor::ChildChangedSignalType& ChildAddedSignal();
1483 * @copydoc DevelActor::ChildRemovedSignal
1485 DevelActor::ChildChangedSignalType& ChildRemovedSignal();
1488 * @copydoc DevelActor::ChildOrderChangedSignal
1490 DevelActor::ChildOrderChangedSignalType& ChildOrderChangedSignal();
1496 * For use in derived classes.
1497 * This should only be called by Animation, when the actor is resized using Animation::Resize().
1499 virtual void OnSizeAnimation(Animation& animation, const Vector3& targetSize)
1512 * Protected Constructor. See Actor::New().
1513 * The second-phase construction Initialize() member should be called immediately after this.
1514 * @param[in] derivedType The derived type of actor (if any).
1515 * @param[in] reference to the node
1517 Actor(DerivedType derivedType, const SceneGraph::Node& node);
1520 * Second-phase constructor. Must be called immediately after creating a new Actor;
1522 void Initialize(void);
1525 * A reference counted object may only be deleted by calling Unreference()
1530 * Called on a child during Add() when the parent actor is connected to the Scene.
1531 * @param[in] parentDepth The depth of the parent in the hierarchy.
1532 * @param[in] notify Emits notification if set to true.
1534 void ConnectToScene(uint32_t parentDepth, bool notify);
1537 * Connect the Node associated with this Actor to the scene-graph.
1539 void ConnectToSceneGraph();
1542 * Helper for ConnectToScene, to notify a connected actor through the public API.
1543 * @param[in] notify Emits notification if set to true.
1545 void NotifyStageConnection(bool notify);
1548 * Called on a child during Remove() when the actor was previously on the Stage.
1549 * @param[in] notify Emits notification if set to true.
1551 void DisconnectFromStage(bool notify);
1554 * Disconnect the Node associated with this Actor from the scene-graph.
1556 void DisconnectFromSceneGraph();
1559 * Helper for DisconnectFromStage, to notify a disconnected actor through the public API.
1560 * @param[in] notify Emits notification if set to true.
1562 void NotifyStageDisconnection(bool notify);
1565 * When the Actor is OnScene, checks whether the corresponding Node is connected to the scene graph.
1566 * @return True if the Actor is OnScene & has a Node connected to the scene graph.
1568 bool IsNodeConnected() const;
1572 * Trigger a rebuild of the actor depth tree from this root
1573 * If a Layer3D is encountered, then this doesn't descend any further.
1574 * The mSortedDepth of each actor is set appropriately.
1576 void RebuildDepthTree();
1579 // Default property extensions from Object
1582 * @copydoc Dali::Internal::Object::SetDefaultProperty()
1584 void SetDefaultProperty(Property::Index index, const Property::Value& propertyValue) override;
1587 * @copydoc Dali::Internal::Object::SetSceneGraphProperty()
1589 void SetSceneGraphProperty(Property::Index index, const PropertyMetadata& entry, const Property::Value& value) override;
1592 * @copydoc Dali::Internal::Object::GetDefaultProperty()
1594 Property::Value GetDefaultProperty(Property::Index index) const override;
1597 * @copydoc Dali::Internal::Object::GetDefaultPropertyCurrentValue()
1599 Property::Value GetDefaultPropertyCurrentValue(Property::Index index) const override;
1602 * @copydoc Dali::Internal::Object::OnNotifyDefaultPropertyAnimation()
1604 void OnNotifyDefaultPropertyAnimation(Animation& animation, Property::Index index, const Property::Value& value, Animation::Type animationType) override;
1607 * @copydoc Dali::Internal::Object::GetSceneObjectAnimatableProperty()
1609 const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty(Property::Index index) const override;
1612 * @copydoc Dali::Internal::Object::GetSceneObjectInputProperty()
1614 const PropertyInputImpl* GetSceneObjectInputProperty(Property::Index index) const override;
1617 * @copydoc Dali::Internal::Object::GetPropertyComponentIndex()
1619 int32_t GetPropertyComponentIndex(Property::Index index) const override;
1622 * @copydoc Dali::Internal::Object::IsAnimationPossible()
1624 bool IsAnimationPossible() const override
1630 * Retrieve the actor's node.
1631 * @return The node used by this actor
1633 const SceneGraph::Node& GetNode() const;
1636 * @copydoc Dali::DevelActor::Raise()
1641 * @copydoc Dali::DevelActor::Lower()
1646 * @copydoc Dali::DevelActor::RaiseToTop()
1651 * @copydoc Dali::DevelActor::LowerToBottom()
1653 void LowerToBottom();
1656 * @copydoc Dali::DevelActor::RaiseAbove()
1658 void RaiseAbove(Internal::Actor& target);
1661 * @copydoc Dali::DevelActor::LowerBelow()
1663 void LowerBelow(Internal::Actor& target);
1667 * Sets the scene which this actor is added to.
1668 * @param[in] scene The scene
1670 void SetScene(Scene& scene)
1676 * Gets the scene which this actor is added to.
1679 Scene& GetScene() const
1684 LayoutDirection::Type GetLayoutDirection() const
1686 return mLayoutDirection;
1699 // Remove default constructor and copy constructor
1701 Actor(const Actor&) = delete;
1702 Actor& operator=(const Actor& rhs) = delete;
1705 * Set the actor's parent.
1706 * @param[in] parent The new parent.
1707 * @param[in] notify Emits notification if set to true. Default is true.
1709 void SetParent(ActorParent* parent, bool notify = true);
1712 * For use in derived classes, called after Initialize()
1714 virtual void OnInitialize()
1719 * For use in internal derived classes.
1720 * This is called during ConnectToScene(), after the actor has finished adding its node to the scene-graph.
1721 * The derived class must not modify the actor hierachy (Add/Remove children) during this callback.
1723 virtual void OnSceneConnectionInternal()
1728 * For use in internal derived classes.
1729 * This is called during DisconnectFromStage(), before the actor removes its node from the scene-graph.
1730 * The derived class must not modify the actor hierachy (Add/Remove children) during this callback.
1732 virtual void OnSceneDisconnectionInternal()
1737 * For use in external (CustomActor) derived classes.
1738 * This is called after the atomic ConnectToScene() traversal has been completed.
1740 virtual void OnSceneConnectionExternal(int depth)
1745 * For use in external (CustomActor) derived classes.
1746 * This is called after the atomic DisconnectFromStage() traversal has been completed.
1748 virtual void OnSceneDisconnectionExternal()
1753 * For use in derived classes; this is called after Add() has added a child.
1754 * @param[in] child The child that was added.
1756 virtual void OnChildAdd(Actor& child)
1761 * For use in derived classes; this is called after Remove() has attempted to remove a child( regardless of whether it succeeded or not ).
1762 * @param[in] child The child that was removed.
1764 virtual void OnChildRemove(Actor& child)
1769 * For use in derived classes.
1770 * This is called after SizeSet() has been called.
1772 virtual void OnSizeSet(const Vector3& targetSize)
1777 * @brief Retrieves the cached event side value of a default property.
1778 * @param[in] index The index of the property
1779 * @param[out] value Is set with the cached value of the property if found.
1780 * @return True if value set, false otherwise.
1782 bool GetCachedPropertyValue(Property::Index index, Property::Value& value) const;
1785 * @brief Retrieves the current value of a default property from the scene-graph.
1786 * @param[in] index The index of the property
1787 * @param[out] value Is set with the current scene-graph value of the property
1788 * @return True if value set, false otherwise.
1790 bool GetCurrentPropertyValue(Property::Index index, Property::Value& value) const;
1793 * Retrieve the parent object of an Actor.
1794 * @return The parent object, or NULL if the Actor does not have a parent.
1796 Object* GetParentObject() const override
1798 return static_cast<Actor*>(mParent);
1802 * @brief Get the current position of the actor in screen coordinates.
1804 * @return Returns the screen position of actor
1806 const Vector2 GetCurrentScreenPosition() const;
1809 * Sets the visibility flag of an actor.
1810 * @param[in] visible The new visibility flag.
1811 * @param[in] sendMessage Whether to send a message to the update thread or not.
1813 void SetVisibleInternal(bool visible, SendMessage::Type sendMessage);
1816 * @copydoc ActorParent::SetSiblingOrderOfChild
1818 void SetSiblingOrderOfChild(Actor& child, uint32_t order) override;
1821 * @copydoc ActorParent::GetSiblingOrderOfChild
1823 uint32_t GetSiblingOrderOfChild(const Actor& child) const override;
1826 * @copydoc ActorParent::RaiseChild
1828 void RaiseChild(Actor& child) override;
1831 * @copydoc ActorParent::LowerChild
1833 void LowerChild(Actor& child) override;
1836 * @copydoc ActorParent::RaiseChildToTop
1838 void RaiseChildToTop(Actor& child) override;
1841 * @copydoc ActorParent::LowerChildToBottom
1843 void LowerChildToBottom(Actor& child) override;
1846 * @copydoc ActorParent::RaiseChildAbove
1848 void RaiseChildAbove(Actor& child, Actor& target) override;
1851 * @copydoc ActorParent::LowerChildBelow()
1853 void LowerChildBelow(Actor& child, Actor& target) override;
1856 * Set whether a child actor inherits it's parent's layout direction. Default is to inherit.
1857 * @param[in] inherit - true if the actor should inherit layout direction, false otherwise.
1859 void SetInheritLayoutDirection(bool inherit);
1862 * Returns whether the actor inherits it's parent's layout direction.
1863 * @return true if the actor inherits it's parent's layout direction, false otherwise.
1865 bool IsLayoutDirectionInherited() const
1867 return mInheritLayoutDirection;
1871 * @brief Sets the update size hint of an actor.
1872 * @param [in] updateSizeHint The update size hint.
1874 void SetUpdateSizeHint(const Vector2& updateSizeHint);
1877 ActorParentImpl mParentImpl; ///< Implementation of ActorParent;
1878 ActorSizer mSizer; ///< Implementation for managing actor size
1879 ActorParent* mParent; ///< Each actor (except the root) can have one parent
1880 Scene* mScene; ///< The scene the actor is added to
1881 RendererContainer* mRenderers; ///< Renderer container
1882 Vector3* mParentOrigin; ///< NULL means ParentOrigin::DEFAULT. ParentOrigin is non-animatable
1883 Vector3* mAnchorPoint; ///< NULL means AnchorPoint::DEFAULT. AnchorPoint is non-animatable
1884 ActorGestureData* mGestureData; ///< Optional Gesture data. Only created when actor requires gestures
1887 Dali::Actor::TouchEventSignalType mInterceptTouchedSignal;
1888 Dali::Actor::TouchEventSignalType mTouchedSignal;
1889 Dali::Actor::HoverSignalType mHoveredSignal;
1890 Dali::Actor::WheelEventSignalType mWheelEventSignal;
1891 Dali::Actor::OnSceneSignalType mOnSceneSignal;
1892 Dali::Actor::OffSceneSignalType mOffSceneSignal;
1893 Dali::Actor::OnRelayoutSignalType mOnRelayoutSignal;
1894 DevelActor::VisibilityChangedSignalType mVisibilityChangedSignal;
1895 Dali::Actor::LayoutDirectionChangedSignalType mLayoutDirectionChangedSignal;
1896 Dali::Actor::TouchEventSignalType mHitTestResultSignal;
1898 Quaternion mTargetOrientation; ///< Event-side storage for orientation
1899 Vector4 mTargetColor; ///< Event-side storage for color
1900 Vector3 mTargetPosition; ///< Event-side storage for position (not a pointer as most actors will have a position)
1901 Vector3 mTargetScale; ///< Event-side storage for scale
1902 Rect<int> mTouchAreaOffset; ///< touch area offset (left, right, bottom, top)
1904 ConstString mName; ///< Name of the actor
1905 uint32_t mSortedDepth; ///< The sorted depth index. A combination of tree traversal and sibling order.
1906 int16_t mDepth; ///< The depth in the hierarchy of the actor. Only 32,767 levels of depth are supported
1908 const bool mIsRoot : 1; ///< Flag to identify the root actor
1909 const bool mIsLayer : 1; ///< Flag to identify that this is a layer
1910 bool mIsOnScene : 1; ///< Flag to identify whether the actor is on-scene
1911 bool mSensitive : 1; ///< Whether the actor emits touch event signals
1912 bool mLeaveRequired : 1; ///< Whether a touch event signal is emitted when the a touch leaves the actor's bounds
1913 bool mKeyboardFocusable : 1; ///< Whether the actor should be focusable by keyboard navigation
1914 bool mKeyboardFocusableChildren : 1; ///< Whether the children of this actor can be focusable by keyboard navigation.
1915 bool mTouchFocusable : 1; ///< Whether the actor should be focusable by touch
1916 bool mOnSceneSignalled : 1; ///< Set to true before OnSceneConnection signal is emitted, and false before OnSceneDisconnection
1917 bool mInheritPosition : 1; ///< Cached: Whether the parent's position should be inherited.
1918 bool mInheritOrientation : 1; ///< Cached: Whether the parent's orientation should be inherited.
1919 bool mInheritScale : 1; ///< Cached: Whether the parent's scale should be inherited.
1920 bool mPositionUsesAnchorPoint : 1; ///< Cached: Whether the position uses the anchor point or not.
1921 bool mVisible : 1; ///< Cached: Whether the actor is visible or not.
1922 bool mInheritLayoutDirection : 1; ///< Whether the actor inherits the layout direction from parent.
1923 bool mCaptureAllTouchAfterStart : 1; ///< Whether the actor should capture all touch after touch starts even if the motion moves outside of the actor area.
1924 bool mIsBlendEquationSet : 1; ///< Flag to identify whether the Blend equation is set
1925 bool mNeedGesturePropagation : 1; ///< Whether the parent listens for gesture events or not
1926 bool mUserInteractionEnabled : 1; ///< Whether the actor should be enabled user interaction.
1927 LayoutDirection::Type mLayoutDirection : 2; ///< Layout direction, Left to Right or Right to Left.
1928 DrawMode::Type mDrawMode : 3; ///< Cached: How the actor and its children should be drawn
1929 ColorMode mColorMode : 3; ///< Cached: Determines whether mWorldColor is inherited
1930 ClippingMode::Type mClippingMode : 3; ///< Cached: Determines which clipping mode (if any) to use.
1931 DevelBlendEquation::Type mBlendEquation : 16; ///< Cached: Determines which blend equation will be used to render renderers.
1934 static ActorContainer mNullChildren; ///< Empty container (shared by all actors, returned by GetChildren() const)
1936 struct PropertyHandler;
1937 struct SiblingHandler;
1939 friend class ActorParentImpl; // Allow impl to call private methods on actor
1940 friend class ActorSizer; // Allow sizer to call private methods on actor
1943 } // namespace Internal
1945 // Helpers for public-api forwarding methods
1947 inline Internal::Actor& GetImplementation(Dali::Actor& actor)
1949 DALI_ASSERT_ALWAYS(actor && "Actor handle is empty");
1951 BaseObject& handle = actor.GetBaseObject();
1953 return static_cast<Internal::Actor&>(handle);
1956 inline const Internal::Actor& GetImplementation(const Dali::Actor& actor)
1958 DALI_ASSERT_ALWAYS(actor && "Actor handle is empty");
1960 const BaseObject& handle = actor.GetBaseObject();
1962 return static_cast<const Internal::Actor&>(handle);
1967 #endif // DALI_INTERNAL_ACTOR_H