1 #ifndef DALI_INTERNAL_ACTOR_H
2 #define DALI_INTERNAL_ACTOR_H
5 * Copyright (c) 2021 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/internal/common/const-string.h>
37 #include <dali/internal/common/internal-constants.h>
38 #include <dali/internal/common/memory-pool-object-allocator.h>
39 #include <dali/internal/event/actors/actor-declarations.h>
40 #include <dali/internal/event/actors/actor-parent-impl.h>
41 #include <dali/internal/event/actors/actor-parent.h>
42 #include <dali/internal/event/actors/actor-renderer-container.h>
43 #include <dali/internal/event/actors/actor-sizer.h>
44 #include <dali/internal/event/common/object-impl.h>
45 #include <dali/internal/event/common/stage-def.h>
46 #include <dali/internal/update/nodes/node-declarations.h>
58 class ActorGestureData;
64 class ActorDepthTreeNode;
65 using DepthNodeMemoryPool = Dali::Internal::MemoryPoolObjectAllocator<ActorDepthTreeNode>;
68 * Actor is the primary object with which Dali applications interact.
69 * UI controls can be built by combining multiple actors.
70 * Multi-Touch events are received through signals emitted by the actor tree.
72 * An Actor is a proxy for a Node in the scene graph.
73 * When an Actor is added to the Stage, it creates a node and connects it to the scene graph.
74 * The scene-graph can be updated in a separate thread, so the connection is done using an asynchronous message.
75 * When a tree of Actors is detached from the Stage, a message is sent to destroy the associated nodes.
77 class Actor : public Object, public ActorParent
82 * @return A smart-pointer to the newly allocated Actor.
84 static ActorPtr New();
87 * Helper to create node for derived classes who don't have their own node type
88 * @return pointer to newly created unique node
90 static const SceneGraph::Node* CreateNode();
93 * Retrieve the name of the actor.
96 std::string_view GetName() const
98 return mName.GetStringView();
102 * Set the name of the actor.
103 * @param[in] name The new name.
105 void SetName(std::string_view name);
108 * @copydoc Dali::Actor::GetId
110 uint32_t GetId() const;
115 * Query whether an actor is the root actor, which is owned by the Stage.
116 * @return True if the actor is a root actor.
124 * Query whether the actor is connected to the Scene.
132 * Query whether the actor has any renderers.
133 * @return True if the actor is renderable.
135 bool IsRenderable() const
137 // inlined as this is called a lot in hit testing
138 return mRenderers && !mRenderers->IsEmpty();
142 * Query whether the actor is of class Dali::Layer
143 * @return True if the actor is a layer.
147 // inlined as this is called a lot in hit testing
152 * Gets the layer in which the actor is present
153 * @return The layer, which will be uninitialized if the actor is off-stage.
155 Dali::Layer GetLayer();
158 * @copydoc Dali::Internal::ActorParent::Add()
160 void Add(Actor& child, bool notify = true) override;
163 * @copydoc Dali::Internal::ActorParent::Remove()
165 void Remove(Actor& child, bool notify = true) override;
168 * @copydoc Dali::DevelActor::SwitchParent()
170 void SwitchParent(Actor& newParent);
173 * @copydoc Dali::Actor::Unparent
178 * @copydoc Dali::Internal::ActorParent::GetChildCount()
180 uint32_t GetChildCount() const override;
183 * @copydoc Dali::Internal::ActorParent::GetChildAt
185 ActorPtr GetChildAt(uint32_t index) const override;
188 * Retrieve a reference to Actor's children.
189 * @note Not for public use.
190 * @return A reference to the container of children.
191 * @note The internal container is lazily initialized so ensure you check the child count before using the value returned by this method.
193 ActorContainer& GetChildrenInternal();
196 * @copydoc Dali::Internal::ActorParent::FindChildByName
198 ActorPtr FindChildByName(ConstString actorName) override;
201 * @copydoc Dali::Internal::ActorParent::FindChildById
203 ActorPtr FindChildById(const uint32_t id) override;
206 * @copydoc Dali::Internal::ActorParent::UnparentChildren
208 void UnparentChildren() override;
211 * Retrieve the parent of an Actor.
212 * @return The parent actor, or NULL if the Actor does not have a parent.
214 Actor* GetParent() const
216 return static_cast<Actor*>(mParent);
220 * Calculates screen position and size.
222 * @return pair of two values, position of top-left corner on screen and size respectively.
224 Rect<> CalculateScreenExtents() const;
227 * @copydoc DevelActor::SetNeedGesturePropagation.
229 void SetNeedGesturePropagation(bool propagation)
231 mNeedGesturePropagation = propagation;
235 * Retrieve need gesture propagation value
236 * @return The actor's need gesture propagation value.
238 bool NeedGesturePropagation() const
240 return mNeedGesturePropagation;
244 * Sets the size of an actor.
245 * This does not interfere with the actors scale factor.
246 * @param [in] width The new width.
247 * @param [in] height The new height.
249 void SetSize(float width, float height);
252 * Sets the size of an actor.
253 * This does not interfere with the actors scale factor.
254 * @param [in] width The size of the actor along the x-axis.
255 * @param [in] height The size of the actor along the y-axis.
256 * @param [in] depth The size of the actor along the z-axis.
258 void SetSize(float width, float height, float depth);
261 * Sets the size of an actor.
262 * This does not interfere with the actors scale factor.
263 * @param [in] size The new size.
265 void SetSize(const Vector2& size);
268 * Sets the size of an actor.
269 * This does not interfere with the actors scale factor.
270 * @param [in] size The new size.
272 void SetSize(const Vector3& size);
275 * Set the width component of the Actor's size.
276 * @param [in] width The new width component.
278 void SetWidth(float width);
281 * Set the height component of the Actor's size.
282 * @param [in] height The new height component.
284 void SetHeight(float height);
287 * Set the depth component of the Actor's size.
288 * @param [in] depth The new depth component.
290 void SetDepth(float depth);
293 * Retrieve the Actor's size from event side.
294 * This size will be the size set or if animating then the target size.
295 * @return The Actor's size.
297 Vector3 GetTargetSize() const;
300 * Retrieve the Actor's size from update side.
301 * This size will be the size set or animating but will be a frame behind.
302 * @return The Actor's size.
304 const Vector3& GetCurrentSize() const;
307 * Return the natural size of the actor
309 * @return The actor's natural size
311 virtual Vector3 GetNaturalSize() const;
314 * Set the origin of an actor, within its parent's area.
315 * This is expressed in 2D unit coordinates, such that (0.0, 0.0, 0.5) is the top-left corner of the parent,
316 * and (1.0, 1.0, 0.5) is the bottom-right corner.
317 * The default parent-origin is top-left (0.0, 0.0, 0.5).
318 * An actor position is the distance between this origin, and the actors anchor-point.
319 * @param [in] origin The new parent-origin.
321 void SetParentOrigin(const Vector3& origin);
324 * Retrieve the parent-origin of an actor.
325 * @return The parent-origin.
327 const Vector3& GetCurrentParentOrigin() const;
330 * Set the anchor-point of an actor. This is expressed in 2D unit coordinates, such that
331 * (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.
332 * The default anchor point is top-left (0.0, 0.0, 0.5).
333 * An actor position is the distance between its parent-origin, and this anchor-point.
334 * An actor's rotation is centered around its anchor-point.
335 * @param [in] anchorPoint The new anchor-point.
337 void SetAnchorPoint(const Vector3& anchorPoint);
340 * Retrieve the anchor-point of an actor.
341 * @return The anchor-point.
343 const Vector3& GetCurrentAnchorPoint() const;
346 * If the position uses the anchor point, return the anchor point, otherwise
348 * @return The anchor point for positioning.
350 Vector3 GetAnchorPointForPosition() const;
353 * Sets the position of the Actor.
354 * The coordinates are relative to the Actor's parent.
355 * The Actor's z position will be set to 0.0f.
356 * @param [in] x The new x position
357 * @param [in] y The new y position
359 void SetPosition(float x, float y);
362 * Sets the position of the Actor.
363 * The coordinates are relative to the Actor's parent.
364 * @param [in] x The new x position
365 * @param [in] y The new y position
366 * @param [in] z The new z position
368 void SetPosition(float x, float y, float z);
371 * Sets the position of the Actor.
372 * The coordinates are relative to the Actor's parent.
373 * @param [in] position The new position.
375 void SetPosition(const Vector3& position);
378 * Set the position of an actor along the X-axis.
379 * @param [in] x The new x position
384 * Set the position of an actor along the Y-axis.
385 * @param [in] y The new y position.
390 * Set the position of an actor along the Z-axis.
391 * @param [in] z The new z position
396 * Translate an actor relative to its existing position.
397 * @param[in] distance The actor will move by this distance.
399 void TranslateBy(const Vector3& distance);
402 * Retrieve the position of the Actor.
403 * The coordinates are relative to the Actor's parent.
404 * @return the Actor's position.
406 const Vector3& GetCurrentPosition() const;
409 * Retrieve the target position of the Actor.
410 * The coordinates are relative to the Actor's parent.
411 * @return the Actor's position.
413 const Vector3& GetTargetPosition() const
415 return mTargetPosition;
419 * @copydoc Dali::Actor::GetCurrentWorldPosition()
421 const Vector3& GetCurrentWorldPosition() const;
424 * @copydoc Dali::Actor::SetInheritPosition()
426 void SetInheritPosition(bool inherit);
429 * @copydoc Dali::Actor::IsPositionInherited()
431 bool IsPositionInherited() const
433 return mInheritPosition;
437 * Sets the orientation of the Actor.
438 * @param [in] angleRadians The new orientation angle in radians.
439 * @param [in] axis The new axis of orientation.
441 void SetOrientation(const Radian& angleRadians, const Vector3& axis);
444 * Sets the orientation of the Actor.
445 * @param [in] orientation The new orientation.
447 void SetOrientation(const Quaternion& orientation);
450 * Rotate an actor around its existing rotation axis.
451 * @param[in] angleRadians The angle to the rotation to combine with the existing rotation.
452 * @param[in] axis The axis of the rotation to combine with the existing rotation.
454 void RotateBy(const Radian& angleRadians, const Vector3& axis);
457 * Apply a relative rotation to an actor.
458 * @param[in] relativeRotation The rotation to combine with the actors existing rotation.
460 void RotateBy(const Quaternion& relativeRotation);
463 * Retreive the Actor's orientation.
464 * @return the orientation.
466 const Quaternion& GetCurrentOrientation() const;
469 * Set whether a child actor inherits it's parent's orientation. Default is to inherit.
470 * Switching this off means that using SetOrientation() sets the actor's world orientation.
471 * @param[in] inherit - true if the actor should inherit orientation, false otherwise.
473 void SetInheritOrientation(bool inherit);
476 * Returns whether the actor inherit's it's parent's orientation.
477 * @return true if the actor inherit's it's parent orientation, false if it uses world orientation.
479 bool IsOrientationInherited() const
481 return mInheritOrientation;
485 * Sets the factor of the parents size used for the child actor.
486 * Note: Only used if ResizePolicy is ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.
487 * @param[in] factor The vector to multiply the parents size by to get the childs size.
489 void SetSizeModeFactor(const Vector3& factor);
492 * Gets the factor of the parents size used for the child actor.
493 * Note: Only used if ResizePolicy is ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.
494 * @return The vector being used to multiply the parents size by to get the childs size.
496 const Vector3& GetSizeModeFactor() const;
499 * @copydoc Dali::Actor::GetCurrentWorldOrientation()
501 const Quaternion& GetCurrentWorldOrientation() const;
504 * Sets a scale factor applied to an actor.
505 * @param [in] scale The scale factor applied on all axes.
507 void SetScale(float scale);
510 * Sets a scale factor applied to an actor.
511 * @param [in] scaleX The scale factor applied along the x-axis.
512 * @param [in] scaleY The scale factor applied along the y-axis.
513 * @param [in] scaleZ The scale factor applied along the z-axis.
515 void SetScale(float scaleX, float scaleY, float scaleZ);
518 * Sets a scale factor applied to an actor.
519 * @param [in] scale A vector representing the scale factor for each axis.
521 void SetScale(const Vector3& scale);
524 * Set the x component of the scale factor.
525 * @param [in] x The new x value.
527 void SetScaleX(float x);
530 * Set the y component of the scale factor.
531 * @param [in] y The new y value.
533 void SetScaleY(float y);
536 * Set the z component of the scale factor.
537 * @param [in] z The new z value.
539 void SetScaleZ(float z);
542 * Apply a relative scale to an actor.
543 * @param[in] relativeScale The scale to combine with the actors existing scale.
545 void ScaleBy(const Vector3& relativeScale);
548 * Retrieve the scale factor applied to an actor.
549 * @return A vector representing the scale factor for each axis.
551 const Vector3& GetCurrentScale() const;
554 * @copydoc Dali::Actor::GetCurrentWorldScale()
556 const Vector3& GetCurrentWorldScale() const;
559 * @copydoc Dali::Actor::SetInheritScale()
561 void SetInheritScale(bool inherit);
564 * @copydoc Dali::Actor::IsScaleInherited()
566 bool IsScaleInherited() const
568 return mInheritScale;
572 * @copydoc Dali::Actor::GetCurrentWorldMatrix()
574 Matrix GetCurrentWorldMatrix() const;
579 * Sets the visibility flag of an actor.
580 * @param[in] visible The new visibility flag.
582 void SetVisible(bool visible);
585 * Retrieve the visibility flag of an actor.
586 * @return The visibility flag.
588 bool IsVisible() const;
591 * Sets the opacity of an actor.
592 * @param [in] opacity The new opacity.
594 void SetOpacity(float opacity);
597 * Retrieve the actor's opacity.
598 * @return The actor's opacity.
600 float GetCurrentOpacity() const;
603 * Retrieve the actor's clipping mode.
604 * @return The actor's clipping mode (cached)
606 ClippingMode::Type GetClippingMode() const
608 return mClippingMode;
612 * Sets whether an actor should emit touch or hover signals; see SignalTouch() and SignalHover().
613 * An actor is sensitive by default, which means that as soon as an application connects to the SignalTouch(),
614 * the touch event signal will be emitted, and as soon as an application connects to the SignalHover(), the
615 * hover event signal will be emitted.
617 * If the application wishes to temporarily disable the touch or hover event signal emission, then they can do so by calling:
619 * actor.SetSensitive(false);
622 * Then, to re-enable the touch or hover event signal emission, the application should call:
624 * actor.SetSensitive(true);
627 * @see SignalTouch() and SignalHover().
628 * @note If an actor's sensitivity is set to false, then it's children will not emit a touch or hover event signal either.
629 * @param[in] sensitive true to enable emission of the touch or hover event signals, false otherwise.
631 void SetSensitive(bool sensitive)
633 mSensitive = sensitive;
637 * Query whether an actor emits touch or hover event signals.
638 * @see SetSensitive(bool)
639 * @return true, if emission of touch or hover event signals is enabled, false otherwise.
641 bool IsSensitive() const
647 * @copydoc Dali::Actor::SetDrawMode
649 void SetDrawMode(DrawMode::Type drawMode);
652 * @copydoc Dali::Actor::GetDrawMode
654 DrawMode::Type GetDrawMode() const
660 * @copydoc Dali::Actor::IsOverlay
662 bool IsOverlay() const
664 return (DrawMode::OVERLAY_2D == mDrawMode);
668 * Sets the actor's color. The final color of actor depends on its color mode.
669 * This final color is applied to the drawable elements of an actor.
670 * @param [in] color The new color.
672 void SetColor(const Vector4& color);
675 * Set the red component of the color.
676 * @param [in] red The new red component.
678 void SetColorRed(float red);
681 * Set the green component of the color.
682 * @param [in] green The new green component.
684 void SetColorGreen(float green);
687 * Set the blue component of the scale factor.
688 * @param [in] blue The new blue value.
690 void SetColorBlue(float blue);
693 * Retrieve the actor's color.
696 const Vector4& GetCurrentColor() const;
699 * Sets the actor's color mode.
700 * Color mode specifies whether Actor uses its own color or inherits its parent color
701 * @param [in] colorMode to use.
703 void SetColorMode(ColorMode colorMode);
706 * Returns the actor's color mode.
707 * @return currently used colorMode.
709 ColorMode GetColorMode() const
715 * @copydoc Dali::Actor::GetCurrentWorldColor()
717 const Vector4& GetCurrentWorldColor() const;
720 * @copydoc Dali::Actor::GetHierarchyDepth()
722 inline int32_t GetHierarchyDepth() const
733 * Get the actor's sorting depth
735 * @return The depth used for hit-testing and renderer sorting
737 inline uint32_t GetSortingDepth()
743 * Set the actor's sorted depth. Used during recreation of depth tree
744 * @param[in] sortedDepth the new sorted depth
746 inline void SetSortingDepth(uint32_t sortedDepth)
748 mSortedDepth = sortedDepth;
752 // Size negotiation virtual functions
755 * @brief Called after the size negotiation has been finished for this control.
757 * The control is expected to assign this given size to itself/its children.
759 * Should be overridden by derived classes if they need to layout
760 * actors differently after certain operations like add or remove
761 * actors, resize or after changing specific properties.
763 * Note! As this function is called from inside the size negotiation algorithm, you cannot
764 * call RequestRelayout (the call would just be ignored)
766 * @param[in] size The allocated size.
767 * @param[in,out] container The control should add actors to this container that it is not able
768 * to allocate a size for.
770 virtual void OnRelayout(const Vector2& size, RelayoutContainer& container)
775 * @brief Notification for deriving classes when the resize policy is set
777 * @param[in] policy The policy being set
778 * @param[in] dimension The dimension the policy is being set for
780 virtual void OnSetResizePolicy(ResizePolicy::Type policy, Dimension::Type dimension)
785 * @brief Virtual method to notify deriving classes that relayout dependencies have been
786 * met and the size for this object is about to be calculated for the given dimension
788 * @param dimension The dimension that is about to be calculated
790 virtual void OnCalculateRelayoutSize(Dimension::Type dimension)
795 * @brief Virtual method to notify deriving classes that the size for a dimension
796 * has just been negotiated
798 * @param[in] size The new size for the given dimension
799 * @param[in] dimension The dimension that was just negotiated
801 virtual void OnLayoutNegotiated(float size, Dimension::Type dimension)
806 * @brief Determine if this actor is dependent on it's children for relayout
808 * @param dimension The dimension(s) to check for
809 * @return Return if the actor is dependent on it's children
811 virtual bool RelayoutDependentOnChildren(Dimension::Type dimension = Dimension::ALL_DIMENSIONS);
814 * @brief Calculate the size for a child
816 * @param[in] child The child actor to calculate the size for
817 * @param[in] dimension The dimension to calculate the size for. E.g. width or height.
818 * @return Return the calculated size for the given dimension
820 virtual float CalculateChildSize(const Dali::Actor& child, Dimension::Type dimension);
823 * @brief This method is called during size negotiation when a height is required for a given width.
825 * Derived classes should override this if they wish to customize the height returned.
827 * @param width to use.
828 * @return the height based on the width.
830 virtual float GetHeightForWidth(float width);
833 * @brief This method is called during size negotiation when a width is required for a given height.
835 * Derived classes should override this if they wish to customize the width returned.
837 * @param height to use.
838 * @return the width based on the width.
840 virtual float GetWidthForHeight(float height);
846 * @brief Called by the RelayoutController to negotiate the size of an actor.
848 * The size allocated by the the algorithm is passed in which the
849 * actor must adhere to. A container is passed in as well which
850 * the actor should populate with actors it has not / or does not
851 * need to handle in its size negotiation.
853 * @param[in] size The allocated size.
854 * @param[in,out] container The container that holds actors that are fed back into the
855 * RelayoutController algorithm.
857 void NegotiateSize(const Vector2& size, RelayoutContainer& container);
860 * @copydoc Dali::Actor::SetResizePolicy()
862 void SetResizePolicy(ResizePolicy::Type policy, Dimension::Type dimension = Dimension::ALL_DIMENSIONS);
865 * @copydoc Dali::Actor::GetResizePolicy()
867 ResizePolicy::Type GetResizePolicy(Dimension::Type dimension) const;
870 * @brief Set the size negotiation relayout enabled on this actor
872 * @param[in] relayoutEnabled Boolean to enable or disable relayout
874 void SetRelayoutEnabled(bool relayoutEnabled);
877 * @brief Return if relayout is enabled
879 * @return Return if relayout is enabled or not for this actor
881 bool IsRelayoutEnabled() const;
884 * @brief Mark an actor as having it's layout dirty
885 * @note Only called from RelayoutController
887 * @param dirty Whether to mark actor as dirty or not
888 * @param dimension The dimension(s) to mark as dirty
890 void SetLayoutDirty(bool dirty, Dimension::Type dimension = Dimension::ALL_DIMENSIONS);
893 * @brief Return if any of an actor's dimensions are marked as dirty
894 * @note Only called from RelayoutController
896 * @param dimension The dimension(s) to check
897 * @return Return if any of the requested dimensions are dirty
899 bool IsLayoutDirty(Dimension::Type dimension = Dimension::ALL_DIMENSIONS) const;
902 * @brief Returns if relayout is enabled and the actor is not dirty
903 * @note Only called from RelayoutController
905 * @return Return if it is possible to relayout the actor
907 bool RelayoutPossible(Dimension::Type dimension = Dimension::ALL_DIMENSIONS) const;
910 * @brief Returns if relayout is enabled and the actor is dirty
911 * @note Only called from RelayoutController
913 * @return Return if it is required to relayout the actor
915 bool RelayoutRequired(Dimension::Type dimension = Dimension::ALL_DIMENSIONS) const;
918 * @brief Request a relayout, which means performing a size negotiation on this actor, its parent and children (and potentially whole scene)
920 * This method is automatically called from OnSceneConnection(), OnChildAdd(),
921 * OnChildRemove(), SetSizePolicy(), SetMinimumSize() and SetMaximumSize().
923 * This method can also be called from a derived class every time it needs a different size.
924 * At the end of event processing, the relayout process starts and
925 * all controls which requested Relayout will have their sizes (re)negotiated.
927 * @note RelayoutRequest() can be called multiple times; the size negotiation is still
928 * only performed once, i.e. there is no need to keep track of this in the calling side.
930 void RelayoutRequest(Dimension::Type dimension = Dimension::ALL_DIMENSIONS);
933 * @brief Determine if this actor is dependent on it's parent for relayout
934 * @note Only called from RelayoutController
936 * @param dimension The dimension(s) to check for
937 * @return Return if the actor is dependent on it's parent
939 bool RelayoutDependentOnParent(Dimension::Type dimension = Dimension::ALL_DIMENSIONS);
942 * @brief Determine if this actor has another dimension depedent on the specified one
943 * @note Only called from RelayoutController
945 * @param dimension The dimension to check for
946 * @param dependentDimension The dimension to check for dependency with
947 * @return Return if the actor is dependent on this dimension
949 bool RelayoutDependentOnDimension(Dimension::Type dimension, Dimension::Type dependentDimension);
952 * @brief Set the padding for a dimension
954 * @param[in] padding Padding for the dimension. X = start (e.g. left, bottom), y = end (e.g. right, top)
955 * @param[in] dimension The dimension to set
957 void SetPadding(const Vector2& padding, Dimension::Type dimension);
960 * Return the value of padding for the given dimension
962 * @param dimension The dimension to retrieve
963 * @return Return the value of padding for the dimension
965 Vector2 GetPadding(Dimension::Type dimension) const;
968 * @brief Return the amount of size allocated for relayout
970 * May include padding
972 * @param[in] dimension The dimension to retrieve
973 * @return Return the size
975 float GetRelayoutSize(Dimension::Type dimension) const;
978 * @brief Flag the actor as having it's layout dimension negotiated.
980 * @param[in] negotiated The status of the flag to set.
981 * @param[in] dimension The dimension to set the flag for
983 void SetLayoutNegotiated(bool negotiated, Dimension::Type dimension = Dimension::ALL_DIMENSIONS);
986 * @brief Test whether the layout dimension for this actor has been negotiated or not.
988 * @param[in] dimension The dimension to determine the value of the flag for
989 * @return Return if the layout dimension is negotiated or not.
991 bool IsLayoutNegotiated(Dimension::Type dimension = Dimension::ALL_DIMENSIONS) const;
994 * @brief provides the Actor implementation of GetHeightForWidth
995 * @param width to use.
996 * @return the height based on the width.
998 float GetHeightForWidthBase(float width);
1001 * @brief provides the Actor implementation of GetWidthForHeight
1002 * @param height to use.
1003 * @return the width based on the height.
1005 float GetWidthForHeightBase(float height);
1008 * @brief provides the Actor implementation of CalculateChildSize
1010 * @param[in] child The child actor to calculate the size for
1011 * @param[in] dimension The dimension to calculate the size for. E.g. width or height.
1012 * @return Return the calculated size for the given dimension
1014 float CalculateChildSizeBase(const Dali::Actor& child, Dimension::Type dimension);
1017 * @brief Determine if this actor is dependent on it's children for relayout.
1019 * @param dimension The dimension(s) to check for
1020 * @return Return if the actor is dependent on it's children
1022 bool RelayoutDependentOnChildrenBase(Dimension::Type dimension = Dimension::ALL_DIMENSIONS);
1025 * @copydoc Dali::Actor::SetMinimumSize
1027 void SetMinimumSize(float size, Dimension::Type dimension = Dimension::ALL_DIMENSIONS);
1030 * @copydoc Dali::Actor::GetMinimumSize
1032 float GetMinimumSize(Dimension::Type dimension) const;
1035 * @copydoc Dali::Actor::SetMaximumSize
1037 void SetMaximumSize(float size, Dimension::Type dimension = Dimension::ALL_DIMENSIONS);
1040 * @copydoc Dali::Actor::GetMaximumSize
1042 float GetMaximumSize(Dimension::Type dimension) const;
1045 * @copydoc Dali::Actor::AddRenderer()
1047 uint32_t AddRenderer(Renderer& renderer);
1050 * @copydoc Dali::Actor::GetRendererCount()
1052 uint32_t GetRendererCount() const;
1055 * @copydoc Dali::Actor::GetRendererAt()
1057 RendererPtr GetRendererAt(uint32_t index);
1060 * @copydoc Dali::Actor::RemoveRenderer()
1062 void RemoveRenderer(Renderer& renderer);
1065 * @copydoc Dali::Actor::RemoveRenderer()
1067 void RemoveRenderer(uint32_t index);
1070 * @brief Set BlendEquation at each renderer that added on this Actor.
1072 void SetBlendEquation(DevelBlendEquation::Type blendEquation);
1075 * @brief Get Blend Equation that applied to this Actor
1077 DevelBlendEquation::Type GetBlendEquation() const;
1080 * @brief Set this Actor is transparent or not without any affection on the child Actors.
1082 void SetTransparent(bool transparent);
1085 * @brief Get this Actor is transparent or not.
1087 bool IsTransparent() const;
1091 * Converts screen coordinates into the actor's coordinate system.
1092 * @note The actor coordinates are relative to the top-left (0.0, 0.0, 0.5)
1093 * @param[out] localX On return, the X-coordinate relative to the actor.
1094 * @param[out] localY On return, the Y-coordinate relative to the actor.
1095 * @param[in] screenX The screen X-coordinate.
1096 * @param[in] screenY The screen Y-coordinate.
1097 * @return True if the conversion succeeded.
1099 bool ScreenToLocal(float& localX, float& localY, float screenX, float screenY) const;
1102 * Converts screen coordinates into the actor's coordinate system.
1103 * @note The actor coordinates are relative to the top-left (0.0, 0.0, 0.5)
1104 * @param[in] renderTask The render-task used to display the actor.
1105 * @param[out] localX On return, the X-coordinate relative to the actor.
1106 * @param[out] localY On return, the Y-coordinate relative to the actor.
1107 * @param[in] screenX The screen X-coordinate.
1108 * @param[in] screenY The screen Y-coordinate.
1109 * @return True if the conversion succeeded.
1111 bool ScreenToLocal(const RenderTask& renderTask, float& localX, float& localY, float screenX, float screenY) const;
1114 * Converts from the actor's coordinate system to screen coordinates.
1115 * @note The actor coordinates are relative to the top-left (0.0, 0.0, 0.5)
1116 * @param[in] viewMatrix The view-matrix
1117 * @param[in] projectionMatrix The projection-matrix
1118 * @param[in] viewport The view-port
1119 * @param[out] localX On return, the X-coordinate relative to the actor.
1120 * @param[out] localY On return, the Y-coordinate relative to the actor.
1121 * @param[in] screenX The screen X-coordinate.
1122 * @param[in] screenY The screen Y-coordinate.
1123 * @return True if the conversion succeeded.
1125 bool ScreenToLocal(const Matrix& viewMatrix,
1126 const Matrix& projectionMatrix,
1127 const Viewport& viewport,
1131 float screenY) const;
1134 * Sets whether the actor should receive a notification when touch or hover motion events leave
1135 * the boundary of the actor.
1137 * @note By default, this is set to false as most actors do not require this.
1138 * @note Need to connect to the SignalTouch or SignalHover to actually receive this event.
1140 * @param[in] required Should be set to true if a Leave event is required
1142 void SetLeaveRequired(bool required)
1144 mLeaveRequired = required;
1148 * This returns whether the actor requires touch or hover events whenever touch or hover motion events leave
1149 * the boundary of the actor.
1150 * @return true if a Leave event is required, false otherwise.
1152 bool GetLeaveRequired() const
1154 return mLeaveRequired;
1158 * @copydoc Dali::Actor::SetKeyboardFocusable()
1160 void SetKeyboardFocusable(bool focusable)
1162 mKeyboardFocusable = focusable;
1166 * @copydoc Dali::Actor::IsKeyboardFocusable()
1168 bool IsKeyboardFocusable() const
1170 return mKeyboardFocusable;
1174 * @copydoc Dali::Actor::SetKeyboardFocusableChildren()
1176 void SetKeyboardFocusableChildren(bool focusable)
1178 mKeyboardFocusableChildren = focusable;
1182 * @copydoc Dali::Actor::AreChildrenKeyBoardFocusable()
1184 bool AreChildrenKeyBoardFocusable() const
1186 return mKeyboardFocusableChildren;
1190 * Set whether this view can focus by touch.
1191 * @param[in] focusable focuable by touch.
1193 void SetTouchFocusable(bool focusable)
1195 mTouchFocusable = focusable;
1199 * This returns whether this actor can focus by touch.
1200 * @return true if this actor can focus by touch.
1202 bool IsTouchFocusable() const
1204 return mTouchFocusable;
1208 * Query whether the application or derived actor type requires intercept touch events.
1209 * @return True if intercept touch events are required.
1211 bool GetInterceptTouchRequired() const
1213 return !mInterceptTouchedSignal.Empty();
1217 * Query whether the application or derived actor type requires touch events.
1218 * @return True if touch events are required.
1220 bool GetTouchRequired() const
1222 return !mTouchedSignal.Empty();
1226 * Query whether the application or derived actor type requires hover events.
1227 * @return True if hover events are required.
1229 bool GetHoverRequired() const
1231 return !mHoveredSignal.Empty();
1235 * Query whether the application or derived actor type requires wheel events.
1236 * @return True if wheel events are required.
1238 bool GetWheelEventRequired() const
1240 return !mWheelEventSignal.Empty();
1244 * Query whether the actor is actually hittable. This method checks whether the actor is
1245 * sensitive, has the visibility flag set to true and is not fully transparent.
1246 * @return true, if it can be hit, false otherwise.
1248 bool IsHittable() const
1250 return IsSensitive() && IsVisible() && (GetCurrentWorldColor().a > FULLY_TRANSPARENT) && IsNodeConnected();
1254 * Query whether the actor captures all touch after it starts even if touch leaves its boundary.
1255 * @return true, if it captures all touch after start
1257 bool CapturesAllTouchAfterStart() const
1259 return mCaptureAllTouchAfterStart;
1263 * Sets the touch area offset of an actor.
1264 * @param [in] offset The new offset of area (left, right, bottom, top).
1266 void SetTouchAreaOffset(Rect<int> offset)
1268 mTouchAreaOffset = offset;
1272 * Retrieve the Actor's touch area offset.
1273 * @return The Actor's touch area offset.
1275 const Rect<int>& GetTouchAreaOffset() const
1277 return mTouchAreaOffset;
1283 * Retrieve the gesture data associated with this actor. The first call to this method will
1284 * allocate space for the ActorGestureData so this should only be called if an actor really does
1286 * @return Reference to the ActorGestureData for this actor.
1287 * @note Once the gesture-data is created for an actor it is likely that gestures are required
1288 * throughout the actor's lifetime so it will only be deleted when the actor is destroyed.
1290 ActorGestureData& GetGestureData();
1293 * Queries whether the actor requires the gesture type.
1294 * @param[in] type The gesture type.
1295 * @return True if the gesture is required, false otherwise.
1297 bool IsGestureRequired(GestureType::Value type) const;
1302 * Used by the EventProcessor to emit intercept touch event signals.
1303 * @param[in] touch The touch data.
1304 * @return True if the event was intercepted.
1306 bool EmitInterceptTouchEventSignal(const Dali::TouchEvent& touch);
1309 * Used by the EventProcessor to emit touch event signals.
1310 * @param[in] touch The touch data.
1311 * @return True if the event was consumed.
1313 bool EmitTouchEventSignal(const Dali::TouchEvent& touch);
1316 * Used by the EventProcessor to emit hover event signals.
1317 * @param[in] event The hover event.
1318 * @return True if the event was consumed.
1320 bool EmitHoverEventSignal(const Dali::HoverEvent& event);
1323 * Used by the EventProcessor to emit wheel event signals.
1324 * @param[in] event The wheel event.
1325 * @return True if the event was consumed.
1327 bool EmitWheelEventSignal(const Dali::WheelEvent& event);
1330 * @brief Emits the visibility change signal for this actor and all its children.
1331 * @param[in] visible Whether the actor has become visible or not.
1332 * @param[in] type Whether the actor's visible property has changed or a parent's.
1334 void EmitVisibilityChangedSignal(bool visible, DevelActor::VisibilityChange::Type type);
1337 * @brief Emits the layout direction change signal for this actor and all its children.
1338 * @param[in] type Whether the actor's layout direction property has changed or a parent's.
1340 void EmitLayoutDirectionChangedSignal(LayoutDirection::Type type);
1343 * @copydoc DevelActor::InterceptTouchedSignal()
1345 Dali::Actor::TouchEventSignalType& InterceptTouchedSignal()
1347 return mInterceptTouchedSignal;
1351 * @copydoc Dali::Actor::TouchedSignal()
1353 Dali::Actor::TouchEventSignalType& TouchedSignal()
1355 return mTouchedSignal;
1359 * @copydoc Dali::Actor::HoveredSignal()
1361 Dali::Actor::HoverSignalType& HoveredSignal()
1363 return mHoveredSignal;
1367 * @copydoc Dali::Actor::WheelEventSignal()
1369 Dali::Actor::WheelEventSignalType& WheelEventSignal()
1371 return mWheelEventSignal;
1375 * @copydoc Dali::Actor::OnSceneSignal()
1377 Dali::Actor::OnSceneSignalType& OnSceneSignal()
1379 return mOnSceneSignal;
1383 * @copydoc Dali::Actor::OffSceneSignal()
1385 Dali::Actor::OffSceneSignalType& OffSceneSignal()
1387 return mOffSceneSignal;
1391 * @copydoc Dali::Actor::OnRelayoutSignal()
1393 Dali::Actor::OnRelayoutSignalType& OnRelayoutSignal()
1395 return mOnRelayoutSignal;
1399 * @copydoc DevelActor::VisibilityChangedSignal
1401 DevelActor::VisibilityChangedSignalType& VisibilityChangedSignal()
1403 return mVisibilityChangedSignal;
1407 * @copydoc LayoutDirectionChangedSignal
1409 Dali::Actor::LayoutDirectionChangedSignalType& LayoutDirectionChangedSignal()
1411 return mLayoutDirectionChangedSignal;
1415 * @copydoc DevelActor::ChildAddedSignal
1417 DevelActor::ChildChangedSignalType& ChildAddedSignal();
1420 * @copydoc DevelActor::ChildRemovedSignal
1422 DevelActor::ChildChangedSignalType& ChildRemovedSignal();
1425 * @copydoc DevelActor::ChildOrderChangedSignal
1427 DevelActor::ChildOrderChangedSignalType& ChildOrderChangedSignal();
1433 * For use in derived classes.
1434 * This should only be called by Animation, when the actor is resized using Animation::Resize().
1436 virtual void OnSizeAnimation(Animation& animation, const Vector3& targetSize)
1449 * Protected Constructor. See Actor::New().
1450 * The second-phase construction Initialize() member should be called immediately after this.
1451 * @param[in] derivedType The derived type of actor (if any).
1452 * @param[in] reference to the node
1454 Actor(DerivedType derivedType, const SceneGraph::Node& node);
1457 * Second-phase constructor. Must be called immediately after creating a new Actor;
1459 void Initialize(void);
1462 * A reference counted object may only be deleted by calling Unreference()
1467 * Called on a child during Add() when the parent actor is connected to the Scene.
1468 * @param[in] parentDepth The depth of the parent in the hierarchy.
1469 * @param[in] notify Emits notification if set to true.
1471 void ConnectToScene(uint32_t parentDepth, bool notify);
1474 * Connect the Node associated with this Actor to the scene-graph.
1476 void ConnectToSceneGraph();
1479 * Helper for ConnectToScene, to notify a connected actor through the public API.
1480 * @param[in] notify Emits notification if set to true.
1482 void NotifyStageConnection(bool notify);
1485 * Called on a child during Remove() when the actor was previously on the Stage.
1486 * @param[in] notify Emits notification if set to true.
1488 void DisconnectFromStage(bool notify);
1491 * Disconnect the Node associated with this Actor from the scene-graph.
1493 void DisconnectFromSceneGraph();
1496 * Helper for DisconnectFromStage, to notify a disconnected actor through the public API.
1497 * @param[in] notify Emits notification if set to true.
1499 void NotifyStageDisconnection(bool notify);
1502 * When the Actor is OnScene, checks whether the corresponding Node is connected to the scene graph.
1503 * @return True if the Actor is OnScene & has a Node connected to the scene graph.
1505 bool IsNodeConnected() const;
1509 * Trigger a rebuild of the actor depth tree from this root
1510 * If a Layer3D is encountered, then this doesn't descend any further.
1511 * The mSortedDepth of each actor is set appropriately.
1513 void RebuildDepthTree();
1516 // Default property extensions from Object
1519 * @copydoc Dali::Internal::Object::SetDefaultProperty()
1521 void SetDefaultProperty(Property::Index index, const Property::Value& propertyValue) override;
1524 * @copydoc Dali::Internal::Object::SetSceneGraphProperty()
1526 void SetSceneGraphProperty(Property::Index index, const PropertyMetadata& entry, const Property::Value& value) override;
1529 * @copydoc Dali::Internal::Object::GetDefaultProperty()
1531 Property::Value GetDefaultProperty(Property::Index index) const override;
1534 * @copydoc Dali::Internal::Object::GetDefaultPropertyCurrentValue()
1536 Property::Value GetDefaultPropertyCurrentValue(Property::Index index) const override;
1539 * @copydoc Dali::Internal::Object::OnNotifyDefaultPropertyAnimation()
1541 void OnNotifyDefaultPropertyAnimation(Animation& animation, Property::Index index, const Property::Value& value, Animation::Type animationType) override;
1544 * @copydoc Dali::Internal::Object::GetSceneObjectAnimatableProperty()
1546 const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty(Property::Index index) const override;
1549 * @copydoc Dali::Internal::Object::GetSceneObjectInputProperty()
1551 const PropertyInputImpl* GetSceneObjectInputProperty(Property::Index index) const override;
1554 * @copydoc Dali::Internal::Object::GetPropertyComponentIndex()
1556 int32_t GetPropertyComponentIndex(Property::Index index) const override;
1559 * @copydoc Dali::Internal::Object::IsAnimationPossible()
1561 bool IsAnimationPossible() const override
1567 * Retrieve the actor's node.
1568 * @return The node used by this actor
1570 const SceneGraph::Node& GetNode() const;
1573 * @copydoc Dali::DevelActor::Raise()
1578 * @copydoc Dali::DevelActor::Lower()
1583 * @copydoc Dali::DevelActor::RaiseToTop()
1588 * @copydoc Dali::DevelActor::LowerToBottom()
1590 void LowerToBottom();
1593 * @copydoc Dali::DevelActor::RaiseAbove()
1595 void RaiseAbove(Internal::Actor& target);
1598 * @copydoc Dali::DevelActor::LowerBelow()
1600 void LowerBelow(Internal::Actor& target);
1604 * Sets the scene which this actor is added to.
1605 * @param[in] scene The scene
1607 void SetScene(Scene& scene)
1613 * Gets the scene which this actor is added to.
1616 Scene& GetScene() const
1621 LayoutDirection::Type GetLayoutDirection() const
1623 return mLayoutDirection;
1636 // Remove default constructor and copy constructor
1638 Actor(const Actor&) = delete;
1639 Actor& operator=(const Actor& rhs) = delete;
1642 * Set the actor's parent.
1643 * @param[in] parent The new parent.
1644 * @param[in] notify Emits notification if set to true. Default is true.
1646 void SetParent(ActorParent* parent, bool notify = true);
1649 * For use in derived classes, called after Initialize()
1651 virtual void OnInitialize()
1656 * For use in internal derived classes.
1657 * This is called during ConnectToScene(), after the actor has finished adding its node to the scene-graph.
1658 * The derived class must not modify the actor hierachy (Add/Remove children) during this callback.
1660 virtual void OnSceneConnectionInternal()
1665 * For use in internal derived classes.
1666 * This is called during DisconnectFromStage(), before the actor removes its node from the scene-graph.
1667 * The derived class must not modify the actor hierachy (Add/Remove children) during this callback.
1669 virtual void OnSceneDisconnectionInternal()
1674 * For use in external (CustomActor) derived classes.
1675 * This is called after the atomic ConnectToScene() traversal has been completed.
1677 virtual void OnSceneConnectionExternal(int depth)
1682 * For use in external (CustomActor) derived classes.
1683 * This is called after the atomic DisconnectFromStage() traversal has been completed.
1685 virtual void OnSceneDisconnectionExternal()
1690 * For use in derived classes; this is called after Add() has added a child.
1691 * @param[in] child The child that was added.
1693 virtual void OnChildAdd(Actor& child)
1698 * For use in derived classes; this is called after Remove() has attempted to remove a child( regardless of whether it succeeded or not ).
1699 * @param[in] child The child that was removed.
1701 virtual void OnChildRemove(Actor& child)
1706 * For use in derived classes.
1707 * This is called after SizeSet() has been called.
1709 virtual void OnSizeSet(const Vector3& targetSize)
1714 * @brief Retrieves the cached event side value of a default property.
1715 * @param[in] index The index of the property
1716 * @param[out] value Is set with the cached value of the property if found.
1717 * @return True if value set, false otherwise.
1719 bool GetCachedPropertyValue(Property::Index index, Property::Value& value) const;
1722 * @brief Retrieves the current value of a default property from the scene-graph.
1723 * @param[in] index The index of the property
1724 * @param[out] value Is set with the current scene-graph value of the property
1725 * @return True if value set, false otherwise.
1727 bool GetCurrentPropertyValue(Property::Index index, Property::Value& value) const;
1730 * Retrieve the parent object of an Actor.
1731 * @return The parent object, or NULL if the Actor does not have a parent.
1733 Object* GetParentObject() const override
1735 return static_cast<Actor*>(mParent);
1739 * @brief Get the current position of the actor in screen coordinates.
1741 * @return Returns the screen position of actor
1743 const Vector2 GetCurrentScreenPosition() const;
1746 * Sets the visibility flag of an actor.
1747 * @param[in] visible The new visibility flag.
1748 * @param[in] sendMessage Whether to send a message to the update thread or not.
1750 void SetVisibleInternal(bool visible, SendMessage::Type sendMessage);
1753 * @copydoc ActorParent::SetSiblingOrderOfChild
1755 void SetSiblingOrderOfChild(Actor& child, uint32_t order) override;
1758 * @copydoc ActorParent::GetSiblingOrderOfChild
1760 uint32_t GetSiblingOrderOfChild(const Actor& child) const override;
1763 * @copydoc ActorParent::RaiseChild
1765 void RaiseChild(Actor& child) override;
1768 * @copydoc ActorParent::LowerChild
1770 void LowerChild(Actor& child) override;
1773 * @copydoc ActorParent::RaiseChildToTop
1775 void RaiseChildToTop(Actor& child) override;
1778 * @copydoc ActorParent::LowerChildToBottom
1780 void LowerChildToBottom(Actor& child) override;
1783 * @copydoc ActorParent::RaiseChildAbove
1785 void RaiseChildAbove(Actor& child, Actor& target) override;
1788 * @copydoc ActorParent::LowerChildBelow()
1790 void LowerChildBelow(Actor& child, Actor& target) override;
1793 * Set whether a child actor inherits it's parent's layout direction. Default is to inherit.
1794 * @param[in] inherit - true if the actor should inherit layout direction, false otherwise.
1796 void SetInheritLayoutDirection(bool inherit);
1799 * Returns whether the actor inherits it's parent's layout direction.
1800 * @return true if the actor inherits it's parent's layout direction, false otherwise.
1802 bool IsLayoutDirectionInherited() const
1804 return mInheritLayoutDirection;
1808 * @brief Sets the update size hint of an actor.
1809 * @param [in] updateSizeHint The update size hint.
1811 void SetUpdateSizeHint(const Vector2& updateSizeHint);
1814 ActorParentImpl mParentImpl; ///< Implementation of ActorParent;
1815 ActorSizer mSizer; ///< Implementation for managing actor size
1816 ActorParent* mParent; ///< Each actor (except the root) can have one parent
1817 Scene* mScene; ///< The scene the actor is added to
1818 RendererContainer* mRenderers; ///< Renderer container
1819 Vector3* mParentOrigin; ///< NULL means ParentOrigin::DEFAULT. ParentOrigin is non-animatable
1820 Vector3* mAnchorPoint; ///< NULL means AnchorPoint::DEFAULT. AnchorPoint is non-animatable
1821 ActorGestureData* mGestureData; ///< Optional Gesture data. Only created when actor requires gestures
1824 Dali::Actor::TouchEventSignalType mInterceptTouchedSignal;
1825 Dali::Actor::TouchEventSignalType mTouchedSignal;
1826 Dali::Actor::HoverSignalType mHoveredSignal;
1827 Dali::Actor::WheelEventSignalType mWheelEventSignal;
1828 Dali::Actor::OnSceneSignalType mOnSceneSignal;
1829 Dali::Actor::OffSceneSignalType mOffSceneSignal;
1830 Dali::Actor::OnRelayoutSignalType mOnRelayoutSignal;
1831 DevelActor::VisibilityChangedSignalType mVisibilityChangedSignal;
1832 Dali::Actor::LayoutDirectionChangedSignalType mLayoutDirectionChangedSignal;
1834 Quaternion mTargetOrientation; ///< Event-side storage for orientation
1835 Vector4 mTargetColor; ///< Event-side storage for color
1836 Vector3 mTargetPosition; ///< Event-side storage for position (not a pointer as most actors will have a position)
1837 Vector3 mTargetScale; ///< Event-side storage for scale
1838 Rect<int> mTouchAreaOffset; ///< touch area offset (left, right, bottom, top)
1840 ConstString mName; ///< Name of the actor
1841 uint32_t mSortedDepth; ///< The sorted depth index. A combination of tree traversal and sibling order.
1842 int16_t mDepth; ///< The depth in the hierarchy of the actor. Only 32,767 levels of depth are supported
1844 const bool mIsRoot : 1; ///< Flag to identify the root actor
1845 const bool mIsLayer : 1; ///< Flag to identify that this is a layer
1846 bool mIsOnScene : 1; ///< Flag to identify whether the actor is on-scene
1847 bool mSensitive : 1; ///< Whether the actor emits touch event signals
1848 bool mLeaveRequired : 1; ///< Whether a touch event signal is emitted when the a touch leaves the actor's bounds
1849 bool mKeyboardFocusable : 1; ///< Whether the actor should be focusable by keyboard navigation
1850 bool mKeyboardFocusableChildren : 1; ///< Whether the children of this actor can be focusable by keyboard navigation.
1851 bool mTouchFocusable : 1; ///< Whether the actor should be focusable by touch
1852 bool mOnSceneSignalled : 1; ///< Set to true before OnSceneConnection signal is emitted, and false before OnSceneDisconnection
1853 bool mInsideOnSizeSet : 1; ///< Whether we are inside OnSizeSet
1854 bool mInheritPosition : 1; ///< Cached: Whether the parent's position should be inherited.
1855 bool mInheritOrientation : 1; ///< Cached: Whether the parent's orientation should be inherited.
1856 bool mInheritScale : 1; ///< Cached: Whether the parent's scale should be inherited.
1857 bool mPositionUsesAnchorPoint : 1; ///< Cached: Whether the position uses the anchor point or not.
1858 bool mVisible : 1; ///< Cached: Whether the actor is visible or not.
1859 bool mInheritLayoutDirection : 1; ///< Whether the actor inherits the layout direction from parent.
1860 bool mCaptureAllTouchAfterStart : 1; ///< Whether the actor should capture all touch after touch starts even if the motion moves outside of the actor area.
1861 bool mIsBlendEquationSet : 1; ///< Flag to identify whether the Blend equation is set
1862 bool mNeedGesturePropagation : 1; ///< Whether the parent listens for gesture events or not
1863 LayoutDirection::Type mLayoutDirection : 2; ///< Layout direction, Left to Right or Right to Left.
1864 DrawMode::Type mDrawMode : 3; ///< Cached: How the actor and its children should be drawn
1865 ColorMode mColorMode : 3; ///< Cached: Determines whether mWorldColor is inherited
1866 ClippingMode::Type mClippingMode : 3; ///< Cached: Determines which clipping mode (if any) to use.
1867 DevelBlendEquation::Type mBlendEquation : 16; ///< Cached: Determines which blend equation will be used to render renderers.
1870 static ActorContainer mNullChildren; ///< Empty container (shared by all actors, returned by GetChildren() const)
1872 struct PropertyHandler;
1873 struct SiblingHandler;
1875 friend class ActorParentImpl; // Allow impl to call private methods on actor
1876 friend class ActorSizer; // Allow sizer to call private methods on actor
1879 } // namespace Internal
1881 // Helpers for public-api forwarding methods
1883 inline Internal::Actor& GetImplementation(Dali::Actor& actor)
1885 DALI_ASSERT_ALWAYS(actor && "Actor handle is empty");
1887 BaseObject& handle = actor.GetBaseObject();
1889 return static_cast<Internal::Actor&>(handle);
1892 inline const Internal::Actor& GetImplementation(const Dali::Actor& actor)
1894 DALI_ASSERT_ALWAYS(actor && "Actor handle is empty");
1896 const BaseObject& handle = actor.GetBaseObject();
1898 return static_cast<const Internal::Actor&>(handle);
1903 #endif // DALI_INTERNAL_ACTOR_H