X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fdevel-api%2Factors%2Factor-devel.h;h=22085a9c35e56f2730adedcb5f820f1aa2e1edd6;hb=0c493b8df5efc0de5295232a3c09245430dfaca1;hp=fd7230f2ea37ba3a0669faeb920b798b551636ac;hpb=8580a4d8cac9e232d55d8d332af0822c3449727f;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/devel-api/actors/actor-devel.h b/dali/devel-api/actors/actor-devel.h index fd7230f..22085a9 100644 --- a/dali/devel-api/actors/actor-devel.h +++ b/dali/devel-api/actors/actor-devel.h @@ -2,7 +2,7 @@ #define DALI_ACTOR_DEVEL_H /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -87,17 +87,177 @@ enum Type INHERIT_POSITION = Dali::Actor::Property::INHERIT_POSITION, CLIPPING_MODE = Dali::Actor::Property::CLIPPING_MODE, - /** - * @brief name "batchParent", type BOOLEAN - * @see Batching - * @note The default value is 'false' - */ - BATCH_PARENT = CLIPPING_MODE + 1, - SIBLING_ORDER = CLIPPING_MODE + 2, + /** + * @brief Sets the sibling order of the actor so depth position can be defined within the same parent. + * @details Name "siblingOrder", type Property::INTEGER. + * @note The initial value is 0. + * @note Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove and LowerBelow will override the + * sibling order. The values set by this Property will likely change. + */ + SIBLING_ORDER = CLIPPING_MODE + 1, + + /** + * @brief The opacity of the actor. + * @details Name "opacity", type Property::FLOAT. + */ + OPACITY = CLIPPING_MODE + 2, + + /** + * @brief Returns the screen position of the Actor + * @details Name "screenPosition", type Property::VECTOR2. Read-only + * @note This assumes default camera and default render-task and the Z position is ZERO. + */ + SCREEN_POSITION = CLIPPING_MODE + 3, + + /** + * @brief Determines whether the anchor point should be used to determine the position of the actor. + * @details Name "positionUsesAnchorPoint", type Property::BOOLEAN. + * @note This is true by default. + * @note If false, then the top-left of the actor is used for the position. + * @note Setting this to false will allow scaling or rotation around the anchor-point without affecting the actor's position. + */ + POSITION_USES_ANCHOR_POINT = CLIPPING_MODE + 4, + + /** + * @brief The direction of layout. + * @details Name "layoutDirection", type Property::STRING. + */ + LAYOUT_DIRECTION = CLIPPING_MODE + 5, + + /** + * @brief Determines whether child actors inherit the layout direction from a parent. + * @details Name "layoutDirectionInheritance", type Property::BOOLEAN. + */ + LAYOUT_DIRECTION_INHERITANCE = CLIPPING_MODE + 6 }; } // namespace Property +namespace VisibilityChange +{ + +enum Type +{ + SELF, ///< The visibility of the actor itself has changed. + PARENT ///< The visibility of a parent has changed. +}; + +} // namespace VisibilityChange + +namespace LayoutDirection +{ + +enum Type +{ + LTR, ///< Left to Right direction (Default). + RTL ///< Right to Left direction. +}; + +} // namespace + +typedef Signal< void ( Actor, bool, VisibilityChange::Type ) > VisibilityChangedSignalType; ///< Signal type of VisibilityChangedSignalType + +typedef Signal< void ( Actor, LayoutDirection::Type ) > LayoutDirectionChangedSignalType; ///< Signal type of LayoutDirectionChangedSignal + +/** + * @brief Raise actor above the next highest level of actor(s). + * + * @param[in] actor The Actor to raise + * @note Sibling order of actors within the parent will be updated automatically. + * Using this API means a limit of DevelLayer::SIBLING_ORDER_MULTIPLIER Actors. + * Initially actors added to a parent will have the same sibling order and shown in relation to insertion order. + * Raising this actor above actors with the same sibling order as each other will raise this actor above them. + * Once a raise or lower API is used that actor will then have an exclusive sibling order independent of insertion. + * + */ +DALI_IMPORT_API void Raise( Actor actor ); + +/** + * @brief Lower the actor to underneath the level below actor(s). + * + * @param[in] actor The Actor to lower + * @note Sibling order of actors within the parent will be updated automatically. + * Using this API means a limit of DevelLayer::SIBLING_ORDER_MULTIPLIER Actors. + * Lowering this actor below actors with the same sibling order as each other will lower this actor above them. + * Once a raise or lower API is used that actor will then have an exclusive sibling order independent of insertion. + */ +DALI_IMPORT_API void Lower( Actor actor ); + +/** + * @brief Raise actor above all other actors. + * + * @param[in] actor The Actor to raise to the top + * @note Sibling order of actors within the parent will be updated automatically. + * Using this API means a limit of DevelLayer::SIBLING_ORDER_MULTIPLIER Actors. + * Once a raise or lower API is used that actor will then have an exclusive sibling order independent of insertion. + */ +DALI_IMPORT_API void RaiseToTop( Actor actor ); + +/** + * @brief Lower actor to the bottom of all actors. + * + * @param[in] actor The Actor to lower to the bottom + * @note Sibling order of actors within the parent will be updated automatically. + * Using this API means a limit of DevelLayer::SIBLING_ORDER_MULTIPLIER Actors. + * Once a raise or lower API is used that actor will then have an exclusive sibling order independent of insertion. + */ +DALI_IMPORT_API void LowerToBottom( Actor actor ); + +/** + * @brief Raise the actor to above the target actor. + * + * @param[in] actor The actor to raise + * @param[in] target Will be raised above this actor + * @note Sibling order of actors within the parent will be updated automatically. + * Actors on the level above the target actor will still be shown above this actor. + * Raising this actor above actors with the same sibling order as each other will raise this actor above them. + * Using this API means a limit of DevelLayer::SIBLING_ORDER_MULTIPLIER Actors. + * Once a raise or lower API is used that actor will then have an exclusive sibling order independent of insertion. + */ +DALI_IMPORT_API void RaiseAbove( Actor actor, Dali::Actor target ); + +/** + * @brief Lower the actor to below the target actor. + * + * @param[in] actor The Actor to lower + * @param[in] target Will be lowered below this actor + * @note Sibling order of actors within the parent will be updated automatically. + * Using this API means a limit of DevelLayer::SIBLING_ORDER_MULTIPLIER Actors. + * Lowering this actor below actors with the same sibling order as each other will lower this actor above them. + * Once a raise or lower API is used that actor will then have an exclusive sibling order independent of insertion. + */ +DALI_IMPORT_API void LowerBelow( Actor actor, Dali::Actor target ); + +/** + * @brief This signal is emitted when the visible property of this or a parent actor is changed. + * + * A callback of the following type may be connected: + * @code + * void YourCallbackName( Actor actor, bool visible, VisibilityChange::Type& type ); + * @endcode + * actor: The actor, or child of actor, whose visibility has changed + * visible: Whether the actor is now visible or not + * type: Whether the actor's visible property has changed or a parent's. + * @return The signal to connect to + * @pre The Actor has been initialized. + * @note This signal is NOT emitted if the actor becomes transparent (or the reverse), it's only linked with Actor::Property::VISIBLE. + */ +DALI_IMPORT_API VisibilityChangedSignalType& VisibilityChangedSignal( Actor actor ); + +/** + * @brief This signal is emitted when the layout direction property of this or a parent actor is changed. + * + * A callback of the following type may be connected: + * @code + * void YourCallbackName( Actor actor, LayoutDirection::Type type ); + * @endcode + * actor: The actor, or child of actor, whose laytou direction has changed + * type: Whether the actor's layout direction property has changed or a parent's. + * @return The signal to connect to + * @pre The Actor has been initialized. + */ +DALI_IMPORT_API LayoutDirectionChangedSignalType& LayoutDirectionChangedSignal( Actor actor ); + } // namespace DevelActor } // namespace Dali