typedef ActorContainer::iterator ActorIter;
typedef ActorContainer::const_iterator ActorConstIter;
+typedef std::vector< RendererPtr > RendererContainer;
+typedef RendererContainer::iterator RendererIter;
+
/**
* Actor is the primary object which Dali applications interact with.
* UI controls can be built by combining multiple actors.
bool OnStage() const;
/**
- * Query whether the actor is a RenderableActor derived type.
+ * Query whether the actor has any renderers.
* @return True if the actor is renderable.
*/
bool IsRenderable() const
{
// inlined as this is called a lot in hit testing
- return mIsRenderable;
+ return mRenderers && !mRenderers->empty();
}
/**
PositionInheritanceMode GetPositionInheritanceMode() const;
/**
+ * @copydoc Dali::Actor::SetInheritPosition()
+ */
+ void SetInheritPosition( bool inherit );
+
+ /**
+ * @copydoc Dali::Actor::IsPositionInherited()
+ */
+ bool IsPositionInherited() const;
+
+ /**
* Sets the orientation of the Actor.
* @param [in] angleRadians The new orientation angle in radians.
* @param [in] axis The new axis of orientation.
* @copydoc Dali::Actor::GetMaximumSize
*/
float GetMaximumSize( Dimension::Type dimension ) const;
-
+
/**
* @copydoc Dali::Actor::AddRenderer()
*/
/**
* @copydoc Dali::Actor::GetRendererAt()
*/
- Renderer& GetRendererAt( unsigned int index );
+ RendererPtr GetRendererAt( unsigned int index );
/**
* @copydoc Dali::Actor::RemoveRenderer()
* @param[in] screenY The screen Y-coordinate.
* @return True if the conversion succeeded.
*/
- bool ScreenToLocal( RenderTask& renderTask, float& localX, float& localY, float screenX, float screenY ) const;
+ bool ScreenToLocal( const RenderTask& renderTask, float& localX, float& localY, float screenX, float screenY ) const;
/**
* Converts from the actor's coordinate system to screen coordinates.
void NotifySizeAnimation( Animation& animation, const Vector3& targetSize );
/**
- * This should only be called by Animation, when the actors SIZE_WIDTH or SIZE_HEIGHT property is animated.
+ * This should only be called by Animation, when the actors SIZE_WIDTH or SIZE_HEIGHT or SIZE_DEPTH property is animated.
*
* @param[in] animation The animation that resized the actor
* @param[in] targetSize The new target size of the actor
+ * @param[in] property The index of the property being animated
*/
void NotifySizeAnimation( Animation& animation, float targetSize, Property::Index property );
{
}
+ /**
+ * This should only be called by Animation, when the actors POSITION property is animated.
+ *
+ * @param[in] animation The animation that repositioned the actor
+ * @param[in] targetPosition The new target position of the actor
+ */
+ void NotifyPositionAnimation( Animation& animation, const Vector3& targetPosition );
+
+ /**
+ * This should only be called by Animation, when the actors POSITION_X or POSITION_Y or POSITION_Z property is animated.
+ *
+ * @param[in] animation The animation that repositioned the actor
+ * @param[in] targetPosition The new target position of the actor
+ * @param[in] property The index of the property being animated
+ */
+ void NotifyPositionAnimation( Animation& animation, float targetPosition, Property::Index property );
+
protected:
enum DerivedType
{
- BASIC, RENDERABLE, LAYER, ROOT_LAYER
+ BASIC, LAYER, ROOT_LAYER
};
/**
}
/**
- * For use in derived classes; this is called after Remove() has removed a child.
+ * For use in derived classes; this is called after Remove() has attempted to remove a child( regardless of whether it succeeded or not ).
* @param[in] child The child that was removed.
*/
virtual void OnChildRemove( Actor& child )
Actor* mParent; ///< Each actor (except the root) can have one parent
ActorContainer* mChildren; ///< Container of referenced actors
+ RendererContainer* mRenderers; ///< Renderer container
+
const SceneGraph::Node* mNode; ///< Not owned
Vector3* mParentOrigin; ///< NULL means ParentOrigin::DEFAULT. ParentOrigin is non-animatable
Vector3* mAnchorPoint; ///< NULL means AnchorPoint::DEFAULT. AnchorPoint is non-animatable
unsigned short mDepth :12; ///< Cached: The depth in the hierarchy of the actor. Only 4096 levels of depth are supported
const bool mIsRoot : 1; ///< Flag to identify the root actor
- const bool mIsRenderable : 1; ///< Flag to identify that this is a renderable actor
const bool mIsLayer : 1; ///< Flag to identify that this is a layer
bool mIsOnStage : 1; ///< Flag to identify whether the actor is on-stage
bool mSensitive : 1; ///< Whether the actor emits touch event signals
bool mDerivedRequiresWheelEvent : 1; ///< Whether the derived actor type requires wheel event signals
bool mOnStageSignalled : 1; ///< Set to true before OnStageConnection signal is emitted, and false before OnStageDisconnection
bool mInsideOnSizeSet : 1; ///< Whether we are inside OnSizeSet
+ bool mInheritPosition : 1; ///< Cached: Whether the parent's position should be inherited.
bool mInheritOrientation : 1; ///< Cached: Whether the parent's orientation should be inherited.
bool mInheritScale : 1; ///< Cached: Whether the parent's scale should be inherited.
DrawMode::Type mDrawMode : 2; ///< Cached: How the actor and its children should be drawn