X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Factors%2Factor-impl.cpp;h=4fe30fd12cdb3b45e3714e9d82bab80d9d81f2ce;hb=0adda602532f61db5b44eb2796f9a74d7a37b519;hp=ed576d1d14d5d45765e9353f66be69b7197cbe0f;hpb=83e4251df410b1fd7e2a57e16c105b4d1928d051;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/actors/actor-impl.cpp b/dali/internal/event/actors/actor-impl.cpp old mode 100644 new mode 100755 index ed576d1..4fe30fd --- a/dali/internal/event/actors/actor-impl.cpp +++ b/dali/internal/event/actors/actor-impl.cpp @@ -214,6 +214,7 @@ DALI_PROPERTY( "opacity", FLOAT, true, true, true, Dali: DALI_PROPERTY( "screenPosition", VECTOR2, false, false, false, Dali::DevelActor::Property::SCREEN_POSITION ) DALI_PROPERTY( "positionUsesAnchorPoint", BOOLEAN, true, false, false, Dali::DevelActor::Property::POSITION_USES_ANCHOR_POINT ) DALI_PROPERTY( "culled", BOOLEAN, false, false, true, Dali::DevelActor::Property::CULLED ) +DALI_PROPERTY( "updateSizeHint", VECTOR2, true, false, true, Dali::DevelActor::Property::UPDATE_SIZE_HINT ) DALI_PROPERTY_TABLE_END( DEFAULT_ACTOR_PROPERTY_START_INDEX, ActorDefaultProperties ) // Signals @@ -2718,6 +2719,12 @@ void Actor::SetDefaultProperty( Property::Index index, const Property::Value& pr break; } + case Dali::DevelActor::Property::UPDATE_SIZE_HINT: + { + SetUpdateSizeHint( property.Get< Vector2 >() ); + break; + } + default: { // this can happen in the case of a non-animatable default property so just do nothing @@ -3976,6 +3983,12 @@ bool Actor::GetCurrentPropertyValue( Property::Index index, Property::Value& val break; } + case Dali::DevelActor::Property::UPDATE_SIZE_HINT: + { + value = GetUpdateSizeHint(); + break; + } + default: { // Must be an event-side only property @@ -4729,6 +4742,20 @@ float Actor::GetMaximumSize( Dimension::Type dimension ) const return FLT_MAX; // Default } +void Actor::SetUpdateSizeHint( const Vector2& updateSizeHint ) +{ + // node is being used in a separate thread; queue a message to set the value & base value + SceneGraph::NodeTransformPropertyMessage::Send( GetEventThreadServices(), &GetNode(), &GetNode().mUpdateSizeHint, &SceneGraph::TransformManagerPropertyHandler::Bake, Vector3(updateSizeHint.width, updateSizeHint.height, 0.f ) ); +} + +Vector2 Actor::GetUpdateSizeHint() const +{ + // node is being used in a separate thread; copy the value from the previous update + Vector3 updateSizeHint = Vector3::ZERO; + GetNode().GetUpdateSizeHint( GetEventThreadServices().GetEventBufferIndex(), updateSizeHint ); + return Vector2( updateSizeHint.width, updateSizeHint.height ); +} + Object* Actor::GetParentObject() const { return mParent;