X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fvisual-base-impl.cpp;h=a32b8e55df21a7080160bbd142e71587cc97ecbb;hb=ddf213d6be29c945105fdeba076ba7ce98acd9ba;hp=e8ed4a32f950f85a3637813717db1193fd70d75c;hpb=5f03eb8d802b39ab519b15d5bca02f0ed01f2766;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/visuals/visual-base-impl.cpp b/dali-toolkit/internal/visuals/visual-base-impl.cpp index e8ed4a3..a32b8e5 100644 --- a/dali-toolkit/internal/visuals/visual-base-impl.cpp +++ b/dali-toolkit/internal/visuals/visual-base-impl.cpp @@ -84,6 +84,13 @@ void Visual::Base::SetProperties( const Property::Map& propertyMap ) DoSetProperties( propertyMap ); } +void Visual::Base::SetTransformAndSize( const Property::Map& transform, Size controlSize ) +{ + mImpl->mControlSize = controlSize; + mImpl->mTransform.SetPropertyMap( transform ); + OnSetTransform(); +} + void Visual::Base::SetName( const std::string& name ) { mImpl->mName = name; @@ -94,16 +101,6 @@ const std::string& Visual::Base::GetName() return mImpl->mName; } -void Visual::Base::SetSize( const Vector2& size ) -{ - mImpl->mSize = size; -} - -const Vector2& Visual::Base::GetSize() const -{ - return mImpl->mSize; -} - float Visual::Base::GetHeightForWidth( float width ) const { return 0.f; @@ -207,58 +204,6 @@ bool Visual::Base::IsFromCache() const return mImpl->mFlags & Impl::IS_FROM_CACHE; } -void Visual::Base::SetProperty( Dali::Property::Index index, const Dali::Property::Value& propertyValue ) -{ - DALI_ASSERT_ALWAYS( ( index > Property::INVALID_INDEX ) && - ( index > VISUAL_PROPERTY_BASE_START_INDEX ) && // Change the type of visual is not allowed. - "Property index is out of bounds" ); - - if( index < VISUAL_PROPERTY_START_INDEX ) - { - if( index == Dali::Toolkit::Visual::DevelProperty::TRANSFORM ) - { - Property::Map* map = propertyValue.GetMap(); - if( map ) - { - mImpl->mTransform.SetPropertyMap( *map ); - OnSetTransform(); - } - } - - // TODO set the properties of the visual base. - } - else - { - DoSetProperty( index, propertyValue ); - } -} - -Dali::Property::Value Visual::Base::GetProperty( Dali::Property::Index index ) -{ - DALI_ASSERT_ALWAYS( ( index > Property::INVALID_INDEX ) && - ( index >= VISUAL_PROPERTY_BASE_START_INDEX ) && - "Property index is out of bounds" ); - - Dali::Property::Value value; - - if( index < VISUAL_PROPERTY_START_INDEX ) - { - if( index == Dali::Toolkit::Visual::DevelProperty::TRANSFORM ) - { - Property::Map map; - mImpl->mTransform.GetPropertyMap( map ); - return map; - } - // TODO retrieve the properties of the visual base. - } - else - { - value = DoGetProperty( index ); - } - - return value; -} - } // namespace Internal } // namespace Toolkit