END_TEST;
}
-int UtcDaliActorInheritPosition(void)
-{
- tet_infoline("Testing Actor::SetPositionInheritanceMode");
- TestApplication application;
-
- Actor parent = Actor::New();
- Vector3 parentPosition( 1.0f, 2.0f, 3.0f );
- parent.SetPosition( parentPosition );
- parent.SetParentOrigin( ParentOrigin::CENTER );
- parent.SetAnchorPoint( AnchorPoint::CENTER );
- Stage::GetCurrent().Add( parent );
-
- Actor child = Actor::New();
- child.SetParentOrigin( ParentOrigin::CENTER );
- child.SetAnchorPoint( AnchorPoint::CENTER );
- Vector3 childPosition( 10.0f, 11.0f, 12.0f );
- child.SetPosition( childPosition );
- parent.Add( child );
-
- // The actors should not have a world position yet
- DALI_TEST_EQUALS( parent.GetCurrentWorldPosition(), Vector3::ZERO, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldPosition(), Vector3::ZERO, TEST_LOCATION );
-
- // first test default, which is to inherit position
- DALI_TEST_EQUALS( child.GetPositionInheritanceMode(), Dali::INHERIT_PARENT_POSITION, TEST_LOCATION );
- application.SendNotification();
- application.Render(0); // should only really call Update as Render is not required to update scene
- DALI_TEST_EQUALS( parent.GetCurrentPosition(), parentPosition, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentPosition(), childPosition, TEST_LOCATION );
- DALI_TEST_EQUALS( parent.GetCurrentWorldPosition(), parentPosition, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldPosition(), parentPosition + childPosition, TEST_LOCATION );
-
-
- //Change child position
- Vector3 childOffset( -1.0f, 1.0f, 0.0f );
- child.SetPosition( childOffset );
-
- // Change inheritance mode to not inherit
- child.SetPositionInheritanceMode( Dali::DONT_INHERIT_POSITION );
- DALI_TEST_EQUALS( child.GetPositionInheritanceMode(), Dali::DONT_INHERIT_POSITION, TEST_LOCATION );
- application.SendNotification();
- application.Render(0); // should only really call Update as Render is not required to update scene
- DALI_TEST_EQUALS( parent.GetCurrentPosition(), parentPosition, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentPosition(), childOffset, TEST_LOCATION );
- DALI_TEST_EQUALS( parent.GetCurrentWorldPosition(), parentPosition, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldPosition(), childOffset, TEST_LOCATION );
- END_TEST;
-}
-
int UtcDaliActorSetInheritPosition(void)
{
tet_infoline("Testing Actor::SetInheritPosition");
{ "inheritOrientation", Actor::Property::INHERIT_ORIENTATION, Property::BOOLEAN },
{ "inheritScale", Actor::Property::INHERIT_SCALE, Property::BOOLEAN },
{ "colorMode", Actor::Property::COLOR_MODE, Property::STRING },
- { "positionInheritance", Actor::Property::POSITION_INHERITANCE, Property::STRING },
{ "drawMode", Actor::Property::DRAW_MODE, Property::STRING },
{ "sizeModeFactor", Actor::Property::SIZE_MODE_FACTOR, Property::VECTOR3 },
{ "widthResizePolicy", Actor::Property::WIDTH_RESIZE_POLICY, Property::STRING },
END_TEST;
}
-int UtcDaliActorPositionInheritancePropertyAsString(void)
-{
- TestApplication application;
-
- Actor actor = Actor::New();
-
- actor.SetProperty( Actor::Property::POSITION_INHERITANCE, "INHERIT_PARENT_POSITION" );
- DALI_TEST_EQUALS( actor.GetPositionInheritanceMode(), INHERIT_PARENT_POSITION, TEST_LOCATION );
-
- actor.SetProperty( Actor::Property::POSITION_INHERITANCE, "USE_PARENT_POSITION" );
- DALI_TEST_EQUALS( actor.GetPositionInheritanceMode(), USE_PARENT_POSITION, TEST_LOCATION );
-
- actor.SetProperty( Actor::Property::POSITION_INHERITANCE, "USE_PARENT_POSITION_PLUS_LOCAL_POSITION" );
- DALI_TEST_EQUALS( actor.GetPositionInheritanceMode(), USE_PARENT_POSITION_PLUS_LOCAL_POSITION, TEST_LOCATION );
-
- actor.SetProperty( Actor::Property::POSITION_INHERITANCE, "DONT_INHERIT_POSITION" );
- DALI_TEST_EQUALS( actor.GetPositionInheritanceMode(), DONT_INHERIT_POSITION, TEST_LOCATION );
-
- // Invalid should not change anything
- actor.SetProperty( Actor::Property::POSITION_INHERITANCE, "INVALID_ARG" );
- DALI_TEST_EQUALS( actor.GetPositionInheritanceMode(), DONT_INHERIT_POSITION, TEST_LOCATION );
-
- END_TEST;
-}
-
int UtcDaliActorDrawModePropertyAsString(void)
{
TestApplication application;
actor.SetProperty( Actor::Property::DRAW_MODE, "OVERLAY_2D" );
DALI_TEST_EQUALS( actor.GetDrawMode(), DrawMode::OVERLAY_2D, TEST_LOCATION );
- actor.SetProperty( Actor::Property::DRAW_MODE, "STENCIL" );
- DALI_TEST_EQUALS( actor.GetDrawMode(), DrawMode::STENCIL, TEST_LOCATION );
-
// Invalid should not change anything
actor.SetProperty( Actor::Property::DRAW_MODE, "INVALID_ARG" );
- DALI_TEST_EQUALS( actor.GetDrawMode(), DrawMode::STENCIL, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetDrawMode(), DrawMode::OVERLAY_2D, TEST_LOCATION );
END_TEST;
}
END_TEST;
}
-int UtcDaliActorPositionInheritancePropertyAsEnum(void)
-{
- TestApplication application;
-
- Actor actor = Actor::New();
-
- actor.SetProperty( Actor::Property::POSITION_INHERITANCE, INHERIT_PARENT_POSITION );
- DALI_TEST_EQUALS( actor.GetPositionInheritanceMode(), INHERIT_PARENT_POSITION, TEST_LOCATION );
-
- actor.SetProperty( Actor::Property::POSITION_INHERITANCE, USE_PARENT_POSITION );
- DALI_TEST_EQUALS( actor.GetPositionInheritanceMode(), USE_PARENT_POSITION, TEST_LOCATION );
-
- actor.SetProperty( Actor::Property::POSITION_INHERITANCE, USE_PARENT_POSITION_PLUS_LOCAL_POSITION );
- DALI_TEST_EQUALS( actor.GetPositionInheritanceMode(), USE_PARENT_POSITION_PLUS_LOCAL_POSITION, TEST_LOCATION );
-
- actor.SetProperty( Actor::Property::POSITION_INHERITANCE, DONT_INHERIT_POSITION );
- DALI_TEST_EQUALS( actor.GetPositionInheritanceMode(), DONT_INHERIT_POSITION, TEST_LOCATION );
-
- END_TEST;
-}
-
int UtcDaliActorDrawModePropertyAsEnum(void)
{
TestApplication application;
actor.SetProperty( Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D );
DALI_TEST_EQUALS( actor.GetDrawMode(), DrawMode::OVERLAY_2D, TEST_LOCATION );
- actor.SetProperty( Actor::Property::DRAW_MODE, DrawMode::STENCIL );
- DALI_TEST_EQUALS( actor.GetDrawMode(), DrawMode::STENCIL, TEST_LOCATION );
-
END_TEST;
}
{ "inheritOrientation", Property::BOOLEAN, true, false, false, Dali::Actor::Property::INHERIT_ORIENTATION },
{ "inheritScale", Property::BOOLEAN, true, false, false, Dali::Actor::Property::INHERIT_SCALE },
{ "colorMode", Property::STRING, true, false, false, Dali::Actor::Property::COLOR_MODE },
- { "positionInheritance", Property::STRING, true, false, false, Dali::Actor::Property::POSITION_INHERITANCE },
{ "drawMode", Property::STRING, true, false, false, Dali::Actor::Property::DRAW_MODE },
{ "sizeModeFactor", Property::VECTOR3, true, false, false, Dali::Actor::Property::SIZE_MODE_FACTOR },
{ "widthResizePolicy", Property::STRING, true, false, false, Dali::Actor::Property::WIDTH_RESIZE_POLICY },
*/
struct UnregisteredCustomActor : public Dali::CustomActorImpl
{
- UnregisteredCustomActor() : CustomActorImpl( ACTOR_BEHAVIOUR_NONE )
+ UnregisteredCustomActor() : CustomActorImpl( ACTOR_BEHAVIOUR_DEFAULT )
{ }
virtual ~UnregisteredCustomActor()
{ }
DALI_TEST_CHECK( false == actor.IsPropertyAConstraintInput( Actor::Property::INHERIT_ORIENTATION ) );
DALI_TEST_CHECK( false == actor.IsPropertyAConstraintInput( Actor::Property::INHERIT_SCALE ) );
DALI_TEST_CHECK( false == actor.IsPropertyAConstraintInput( Actor::Property::COLOR_MODE ) );
- DALI_TEST_CHECK( false == actor.IsPropertyAConstraintInput( Actor::Property::POSITION_INHERITANCE ) );
DALI_TEST_CHECK( false == actor.IsPropertyAConstraintInput( Actor::Property::DRAW_MODE ) );
DALI_TEST_CHECK( false == actor.IsPropertyAConstraintInput( Actor::Property::SIZE_MODE_FACTOR ) );
// set the same boundaries, but through a clipping box object
actor.SetClippingBox( testBox );
-
DALI_TEST_CHECK( actor.GetClippingBox() == testBox );
+ actor.SetProperty(Layer::Property::BEHAVIOR, Property::Value(Layer::LAYER_UI));
+ DALI_TEST_CHECK(Property::STRING == actor.GetPropertyType(Layer::Property::BEHAVIOR));
+
Property::Value behavior = actor.GetProperty(Layer::Property::BEHAVIOR);
- DALI_TEST_EQUALS(behavior.Get<std::string>().c_str(), "LAYER_2D", TEST_LOCATION );
+ DALI_TEST_EQUALS(behavior.Get<std::string>().c_str(), "LAYER_UI", TEST_LOCATION );
behavior = actor.GetCurrentProperty( Layer::Property::BEHAVIOR );
- DALI_TEST_EQUALS(behavior.Get<std::string>().c_str(), "LAYER_2D", TEST_LOCATION );
+ DALI_TEST_EQUALS(behavior.Get<std::string>().c_str(), "LAYER_UI", TEST_LOCATION );
END_TEST;
}
TestApplication application;
Layer layer = Layer::New();
- DALI_TEST_EQUALS( layer.GetBehavior(), Dali::Layer::LAYER_2D, TEST_LOCATION );
+ DALI_TEST_EQUALS( layer.GetBehavior(), Dali::Layer::LAYER_UI, TEST_LOCATION );
layer.SetBehavior( Dali::Layer::LAYER_3D );
DALI_TEST_EQUALS( layer.GetBehavior(), Dali::Layer::LAYER_3D, TEST_LOCATION );
END_TEST;
DALI_TEST_CHECK( glEnableDisableStack.FindMethodAndParams( "Enable", GetDepthTestString() ) );
DALI_TEST_CHECK( !glEnableDisableStack.FindMethodAndParams( "Disable", GetDepthTestString() ) );
- // Change the layer behavior to LAYER_2D.
+ // Change the layer behavior to LAYER_UI.
// Note this will also disable depth testing for the layer by default, we test this first.
- Stage::GetCurrent().GetRootLayer().SetBehavior( Layer::LAYER_2D );
+ Stage::GetCurrent().GetRootLayer().SetBehavior( Layer::LAYER_UI );
glEnableDisableStack.Reset();
application.SendNotification();
};
const unsigned int COLOR_MODE_VALUES_COUNT = sizeof( COLOR_MODE_VALUES ) / sizeof( COLOR_MODE_VALUES[0] );
-const StringEnum POSITION_INHERITANCE_MODE_VALUES[] =
-{
- { "INHERIT_PARENT_POSITION", INHERIT_PARENT_POSITION },
- { "USE_PARENT_POSITION", USE_PARENT_POSITION },
- { "USE_PARENT_POSITION_PLUS_LOCAL_POSITION", USE_PARENT_POSITION_PLUS_LOCAL_POSITION },
- { "DONT_INHERIT_POSITION", DONT_INHERIT_POSITION },
-};
-const unsigned int POSITION_INHERITANCE_MODE_VALUES_COUNT = sizeof( POSITION_INHERITANCE_MODE_VALUES ) / sizeof( POSITION_INHERITANCE_MODE_VALUES[0] );
-
const StringEnum DRAW_MODE_VALUES[] =
{
{ "NORMAL", DrawMode::NORMAL },
map[ "colorMode" ] = "USE_PARENT_COLOR";
map[ "sensitive" ] = false;
map[ "leaveRequired" ] = true;
- map[ "positionInheritance" ] = "DONT_INHERIT_POSITION";
map[ "drawMode" ] = "OVERLAY_2D";
map[ "inheritOrientation" ] = false;
map[ "inheritScale" ] = false;
DALI_TEST_EQUALS( handle.GetColorMode(), USE_PARENT_COLOR, TEST_LOCATION );
DALI_TEST_EQUALS( handle.IsSensitive(), false, TEST_LOCATION );
DALI_TEST_EQUALS( handle.GetLeaveRequired(), true, TEST_LOCATION );
- DALI_TEST_EQUALS( handle.GetPositionInheritanceMode(), DONT_INHERIT_POSITION, TEST_LOCATION );
DALI_TEST_EQUALS( handle.GetDrawMode(), DrawMode::OVERLAY_2D, TEST_LOCATION );
DALI_TEST_EQUALS( handle.IsOrientationInherited(), false, TEST_LOCATION );
DALI_TEST_EQUALS( handle.IsScaleInherited(), false, TEST_LOCATION );
// ColorMode
TestEnumStrings< ColorMode >( "colorMode", application, COLOR_MODE_VALUES, COLOR_MODE_VALUES_COUNT, &Actor::SetColorMode );
- // PositionInheritanceMode
- TestEnumStrings< PositionInheritanceMode >( "positionInheritance", application, POSITION_INHERITANCE_MODE_VALUES, POSITION_INHERITANCE_MODE_VALUES_COUNT, &Actor::SetPositionInheritanceMode );
-
// DrawMode
TestEnumStrings< DrawMode::Type >( "drawMode", application, DRAW_MODE_VALUES, DRAW_MODE_VALUES_COUNT, &Actor::SetDrawMode );
INHERIT_ORIENTATION = Dali::Actor::Property::INHERIT_ORIENTATION,
INHERIT_SCALE = Dali::Actor::Property::INHERIT_SCALE,
COLOR_MODE = Dali::Actor::Property::COLOR_MODE,
- POSITION_INHERITANCE = Dali::Actor::Property::POSITION_INHERITANCE,
DRAW_MODE = Dali::Actor::Property::DRAW_MODE,
SIZE_MODE_FACTOR = Dali::Actor::Property::SIZE_MODE_FACTOR,
WIDTH_RESIZE_POLICY = Dali::Actor::Property::WIDTH_RESIZE_POLICY,
/**
* Adds a value, typically an enum, to the table within a scope but without the scope name
- * Example converts ( Layer, LAYER_2D ) to ( "LAYER_2D", Layer::Layer2D )
+ * Example converts ( Layer, LAYER_UI ) to ( "LAYER_UI", Layer::LayerUI )
*/
#define DALI_ENUM_TO_STRING_WITH_SCOPE( className, enumName ) { #enumName, className::enumName },
DALI_PROPERTY( "inheritOrientation", BOOLEAN, true, false, false, Dali::Actor::Property::INHERIT_ORIENTATION )
DALI_PROPERTY( "inheritScale", BOOLEAN, true, false, false, Dali::Actor::Property::INHERIT_SCALE )
DALI_PROPERTY( "colorMode", STRING, true, false, false, Dali::Actor::Property::COLOR_MODE )
-DALI_PROPERTY( "positionInheritance", STRING, true, false, false, Dali::Actor::Property::POSITION_INHERITANCE )
DALI_PROPERTY( "drawMode", STRING, true, false, false, Dali::Actor::Property::DRAW_MODE )
DALI_PROPERTY( "sizeModeFactor", VECTOR3, true, false, false, Dali::Actor::Property::SIZE_MODE_FACTOR )
DALI_PROPERTY( "widthResizePolicy", STRING, true, false, false, Dali::Actor::Property::WIDTH_RESIZE_POLICY )
DALI_ENUM_TO_STRING( USE_OWN_MULTIPLY_PARENT_ALPHA )
DALI_ENUM_TO_STRING_TABLE_END( COLOR_MODE )
-DALI_ENUM_TO_STRING_TABLE_BEGIN( POSITION_INHERITANCE_MODE )
-DALI_ENUM_TO_STRING( INHERIT_PARENT_POSITION )
-DALI_ENUM_TO_STRING( USE_PARENT_POSITION )
-DALI_ENUM_TO_STRING( USE_PARENT_POSITION_PLUS_LOCAL_POSITION )
-DALI_ENUM_TO_STRING( DONT_INHERIT_POSITION )
-DALI_ENUM_TO_STRING_TABLE_END( POSITION_INHERITANCE_MODE )
-
DALI_ENUM_TO_STRING_TABLE_BEGIN( DRAW_MODE )
DALI_ENUM_TO_STRING_WITH_SCOPE( DrawMode, NORMAL )
DALI_ENUM_TO_STRING_WITH_SCOPE( DrawMode, OVERLAY_2D )
-DALI_ENUM_TO_STRING_WITH_SCOPE( DrawMode, STENCIL )
DALI_ENUM_TO_STRING_TABLE_END( DRAW_MODE )
DALI_ENUM_TO_STRING_TABLE_BEGIN( RESIZE_POLICY )
return Vector2::ZERO;
}
-void Actor::SetPositionInheritanceMode( PositionInheritanceMode mode )
-{
- // this flag is not animatable so keep the value
- mPositionInheritanceMode = mode;
- // node is being used in a separate thread; queue a message to set the value
- SetInheritPositionMessage( GetEventThreadServices(), GetNode(), mode == INHERIT_PARENT_POSITION );
-}
-
-PositionInheritanceMode Actor::GetPositionInheritanceMode() const
-{
- // Cached for event-thread access
- return mPositionInheritanceMode;
-}
-
void Actor::SetInheritPosition( bool inherit )
{
if( mInheritPosition != inherit )
{
// this flag is not animatable so keep the value
mDrawMode = drawMode;
- if( drawMode != DrawMode::STENCIL )
- {
- // node is being used in a separate thread; queue a message to set the value
- SetDrawModeMessage( GetEventThreadServices(), GetNode(), drawMode );
- }
+
+ // node is being used in a separate thread; queue a message to set the value
+ SetDrawModeMessage( GetEventThreadServices(), GetNode(), drawMode );
}
DrawMode::Type Actor::GetDrawMode() const
mInheritLayoutDirection( true ),
mLayoutDirection( LayoutDirection::LEFT_TO_RIGHT ),
mDrawMode( DrawMode::NORMAL ),
- mPositionInheritanceMode( Node::DEFAULT_POSITION_INHERITANCE_MODE ),
mColorMode( Node::DEFAULT_COLOR_MODE ),
mClippingMode( ClippingMode::DISABLED )
{
break;
}
- case Dali::Actor::Property::POSITION_INHERITANCE:
- {
- PositionInheritanceMode mode = mPositionInheritanceMode;
- if( Scripting::GetEnumerationProperty< PositionInheritanceMode >( property, POSITION_INHERITANCE_MODE_TABLE, POSITION_INHERITANCE_MODE_TABLE_COUNT, mode ) )
- {
- SetPositionInheritanceMode( mode );
- }
- break;
- }
-
case Dali::Actor::Property::DRAW_MODE:
{
DrawMode::Type mode = mDrawMode;
break;
}
- case Dali::Actor::Property::POSITION_INHERITANCE:
- {
- value = Scripting::GetLinearEnumerationName< PositionInheritanceMode >( GetPositionInheritanceMode(), POSITION_INHERITANCE_MODE_TABLE, POSITION_INHERITANCE_MODE_TABLE_COUNT );
- break;
- }
-
case Dali::Actor::Property::DRAW_MODE:
{
value = Scripting::GetEnumerationName< DrawMode::Type >( GetDrawMode(), DRAW_MODE_TABLE, DRAW_MODE_TABLE_COUNT );
const Vector3& GetCurrentWorldPosition() const;
/**
- * @copydoc Dali::Actor::SetPositionInheritanceMode()
- */
- void SetPositionInheritanceMode( PositionInheritanceMode mode );
-
- /**
- * @copydoc Dali::Actor::GetPositionInheritanceMode()
- */
- PositionInheritanceMode GetPositionInheritanceMode() const;
-
- /**
* @copydoc Dali::Actor::SetInheritPosition()
*/
void SetInheritPosition( bool inherit );
bool mInheritLayoutDirection : 1; ///< Whether the actor inherits the layout direction from parent.
LayoutDirection::Type mLayoutDirection : 2; ///< Layout direction, Left to Right or Right to Left.
DrawMode::Type mDrawMode : 3; ///< Cached: How the actor and its children should be drawn
- PositionInheritanceMode mPositionInheritanceMode : 3; ///< Cached: Determines how position is inherited
ColorMode mColorMode : 3; ///< Cached: Determines whether mWorldColor is inherited
ClippingMode::Type mClippingMode : 3; ///< Cached: Determines which clipping mode (if any) to use.
typedef Layer::Behavior Behavior;
DALI_ENUM_TO_STRING_TABLE_BEGIN( BEHAVIOR )
-DALI_ENUM_TO_STRING_WITH_SCOPE( Layer, LAYER_2D )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Layer, LAYER_UI )
DALI_ENUM_TO_STRING_WITH_SCOPE( Layer, LAYER_3D )
DALI_ENUM_TO_STRING_TABLE_END( BEHAVIOR )
mLayerList( NULL ),
mClippingBox( 0, 0, 0, 0 ),
mSortFunction( Layer::ZValue ),
- mBehavior( Dali::Layer::LAYER_2D ),
+ mBehavior( Dali::Layer::LAYER_UI ),
mIsClipping( false ),
mDepthTestDisabled( true ),
mTouchConsumed( false ),
// Notify update side object.
SetBehaviorMessage( GetEventThreadServices(), GetSceneLayerOnStage(), behavior );
- // By default, disable depth test for LAYER_2D, and enable for LAYER_3D.
- SetDepthTestDisabled( mBehavior == Dali::Layer::LAYER_2D );
+ // By default, disable depth test for LAYER_UI, and enable for LAYER_3D.
+ SetDepthTestDisabled( mBehavior == Dali::Layer::LAYER_UI );
}
void Layer::SetClipping(bool enabled)
}
case Dali::Layer::Property::BEHAVIOR:
{
- Behavior behavior(Dali::Layer::LAYER_2D);
+ Behavior behavior(Dali::Layer::LAYER_UI);
if( Scripting::GetEnumeration< Behavior >( propertyValue.Get< std::string >().c_str(), BEHAVIOR_TABLE, BEHAVIOR_TABLE_COUNT, behavior ) )
{
SetBehavior( behavior );
namespace SceneGraph
{
-const PositionInheritanceMode Node::DEFAULT_POSITION_INHERITANCE_MODE( INHERIT_PARENT_POSITION );
const ColorMode Node::DEFAULT_COLOR_MODE( USE_OWN_MULTIPLY_PARENT_ALPHA );
uint32_t Node::mNodeCounter = 0; ///< A counter to provide unique node ids, up-to 4 billion
// Value types used by messages.
template <> struct ParameterType< ColorMode > : public BasicType< ColorMode > {};
-template <> struct ParameterType< PositionInheritanceMode > : public BasicType< PositionInheritanceMode > {};
template <> struct ParameterType< ClippingMode::Type > : public BasicType< ClippingMode::Type > {};
namespace SceneGraph
public:
// Defaults
- static const PositionInheritanceMode DEFAULT_POSITION_INHERITANCE_MODE;
static const ColorMode DEFAULT_COLOR_MODE;
// Creation methods
mSortFunction( Internal::Layer::ZValue ),
mClippingBox( 0,0,0,0 ),
mLastCamera( NULL ),
- mBehavior( Dali::Layer::LAYER_2D ),
+ mBehavior( Dali::Layer::LAYER_UI ),
mIsClipping( false ),
mDepthTestDisabled( true ),
mIsDefaultSortFunction( true )
};
/**
- * @DEPRECATED_1_1.24 Use SetInheritPosition instead
- * @brief Enumeration for Actor position inheritance mode.
- * @SINCE_1_0.0
- */
-enum PositionInheritanceMode
-{
- INHERIT_PARENT_POSITION, ///< Actor will inherit its parent position. This is the default @SINCE_1_0.0
- USE_PARENT_POSITION, ///< Actor will copy its parent position. This is useful if many actors are stacked together in the same place. This option ignores parent origin and anchor point. @SINCE_1_0.0
- USE_PARENT_POSITION_PLUS_LOCAL_POSITION, ///< Actor will copy its parent position and add local position. This is useful if many actors are stacked together in the same place with an offset. This option ignores parent origin and anchor point. @SINCE_1_0.0
- DONT_INHERIT_POSITION ///< Actor will not inherit position. Local position is treated as world position. This is useful if a constraint is used to override local position or if an actor is positioned globally. This option ignores parent origin, anchor point and local position. @SINCE_1_0.0
-};
-
-/**
* @brief Enumeration for layout Dimensions.
* @SINCE_1_0.0
*/
return GetImplementation(*this).GetCurrentWorldPosition();
}
-void Actor::SetPositionInheritanceMode( PositionInheritanceMode mode )
-{
- DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetPositionInheritanceMode() is deprecated and will be removed from next release. Use SetInheritPosition() instead.\n" );
-
- GetImplementation(*this).SetPositionInheritanceMode( mode );
-}
-
-PositionInheritanceMode Actor::GetPositionInheritanceMode() const
-{
- DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: GetPositionInheritanceMode() is deprecated and will be removed from next release. Use IsPositionInherited() instead.\n" );
-
- return GetImplementation(*this).GetPositionInheritanceMode();
-}
-
void Actor::SetOrientation(const Radian& angle, const Vector3& axis)
{
GetImplementation(*this).SetOrientation(angle, axis);
INHERIT_ORIENTATION, ///< name "inheritOrientation", type bool @SINCE_1_0.0
INHERIT_SCALE, ///< name "inheritScale", type bool @SINCE_1_0.0
COLOR_MODE, ///< name "colorMode", type std::string @SINCE_1_0.0
- POSITION_INHERITANCE, ///< name "positionInheritance", type std::string @DEPRECATED_1_1.24 Use INHERIT_POSITION instead
DRAW_MODE, ///< name "drawMode", type std::string @SINCE_1_0.0
SIZE_MODE_FACTOR, ///< name "sizeModeFactor", type Vector3 @SINCE_1_0.0
WIDTH_RESIZE_POLICY, ///< name "widthResizePolicy", type String @SINCE_1_0.0
Vector3 GetCurrentWorldPosition() const;
/**
- * @DEPRECATED_1_1.24 Use SetInheritPosition instead
- * @brief Sets the actors position inheritance mode.
- *
- * The default is to inherit.
- * Switching this off means that using SetPosition() sets the actor's world position.
- * @SINCE_1_0.0
- * @param[in] mode to use
- * @pre The Actor has been initialized.
- * @see PositionInheritanceMode
- */
- void SetPositionInheritanceMode( PositionInheritanceMode mode ) DALI_DEPRECATED_API;
-
- /**
* @brief Sets whether a child actor inherits it's parent's position.
*
* Default is to inherit.
}
/**
- * @DEPRECATED_1_1.24 Use IsPositionInherited
- * @brief Returns the actors position inheritance mode.
- *
- * @SINCE_1_0.0
- * @return Return the position inheritance mode
- * @pre The Actor has been initialized.
- */
- PositionInheritanceMode GetPositionInheritanceMode() const DALI_DEPRECATED_API;
-
- /**
* @brief Returns whether the actor inherits its parent's position.
*
* @SINCE_1_1.24
*/
enum ActorFlags
{
- ACTOR_BEHAVIOUR_NONE = 0, ///< Use if no change to default behaviour is needed. @DEPRECATED_1_2_10
ACTOR_BEHAVIOUR_DEFAULT = 0, ///< Use to provide default behaviour (size negotiation is on, event callbacks are not called). @SINCE_1_2_10
DISABLE_SIZE_NEGOTIATION = 1 << 0, ///< True if control does not need size negotiation, i.e. it can be skipped in the algorithm @SINCE_1_0.0
REQUIRES_TOUCH_EVENTS = 1 << 1, ///< True if the OnTouchEvent() callback is required. @SINCE_1_0.0
enum Type
{
NORMAL = 0, ///< @brief binary 00. The default draw-mode @SINCE_1_0.0
- OVERLAY_2D = 1, ///< @brief binary 01. Draw the actor and its children as an overlay @SINCE_1_0.0
- STENCIL = 3 ///< @DEPRECATED_1_1.31 Will be replaced by separate ClippingMode enum @brief binary 11. Draw the actor and its children into the stencil buffer @SINCE_1_0.0
+ OVERLAY_2D = 1 ///< @brief binary 01. Draw the actor and its children as an overlay @SINCE_1_0.0
};
} // namespace DrawMode
* need for it based on the layer's contents; actors in lower layers cannot
* obscure actors in higher layers.
*
- * A layer has either LAYER_2D or LAYER_3D mode. LAYER_2D has better
+ * A layer has either LAYER_UI or LAYER_3D mode. LAYER_UI has better
* performance, the depth test is disabled, and a child actor hides its
* parent actor. LAYER_3D uses the depth test, thus a close actor hides a
- * farther one. LAYER_2D is the default mode and recommended for general
+ * farther one. LAYER_UI is the default mode and recommended for general
* cases. See Layer::Behavior and SetBehavior() for more information.
*
* Layer is a type of Actor, thus can have parent or children actors. A
enum Behavior
{
/**
- * @DEPRECATED_1_1.45, use LAYER_UI instead
- * @brief UI control rendering mode.
- * @SINCE_1_0.0
- * @see LAYER_UI
- */
- LAYER_2D,
-
- /**
* @brief UI control rendering mode (default mode).
*
* This mode is designed for UI controls that can overlap. In this
*
* @SINCE_1_1.45
*/
- LAYER_UI = LAYER_2D,
+ LAYER_UI,
/**
* @brief Layer will use depth test.
{
MONO, ///< Monoscopic (single camera). This is the default @SINCE_1_0.0
STEREO_HORIZONTAL, ///< @DEPRECATED_1_3.39 Stereoscopic. Frame buffer is split horizontally with the left and right camera views in their respective sides. @SINCE_1_0.0
- STEREO_VERTICAL, ///< @DEPRECATED_1_3.39 Stereoscopic. Frame buffer is split vertically with the left camera view at the top and the right camera view at the bottom. @SINCE_1_0.0
- STEREO_INTERLACED ///< @DEPRECATED_1_1.19 @brief Stereoscopic. Left/Right camera views are rendered into the framebuffer on alternate frames. @SINCE_1_0.0
+ STEREO_VERTICAL ///< @DEPRECATED_1_3.39 Stereoscopic. Frame buffer is split vertically with the left camera view at the top and the right camera view at the bottom. @SINCE_1_0.0
};
/**