naturalSize = Vector2::ZERO;
}
-void Visual::Base::SetDepthIndex( float index )
+void Visual::Base::SetDepthIndex( int index )
{
mImpl->mDepthIndex = index;
if( mImpl->mRenderer )
}
}
-float Visual::Base::GetDepthIndex() const
+int Visual::Base::GetDepthIndex() const
{
return mImpl->mDepthIndex;
}
return mImpl->mMixColor;
}
+void Visual::Base::AddResourceObserver( Visual::ResourceObserver& observer)
+{
+ mImpl->mResourceObserver = &observer;
+}
+
+void Visual::Base::RemoveResourceObserver( Visual::ResourceObserver& observer )
+{
+ mImpl->mResourceObserver = NULL;
+}
+
+void Visual::Base::ResourceReady()
+{
+ if( mImpl->mResourceReady )
+ {
+ // only inform the observer the first time the resource is ready
+ return;
+ }
+ mImpl->mResourceReady = true;
+
+ if( mImpl->mResourceObserver )
+ {
+ // observer is currently a control impl
+ mImpl->mResourceObserver->ResourceReady( *this );
+ }
+}
+
+bool Visual::Base::IsResourceReady() const
+{
+ return mImpl->mResourceReady;
+}
+
Renderer Visual::Base::GetRenderer()
{
return mImpl->mRenderer;
Property::Map map;
DoCreatePropertyMap( map );
Property::Value* valuePtr = map.Find( Toolkit::DevelVisual::Property::TYPE );
- int visualType;
- valuePtr->Get(visualType);
+ int visualType = -1;
+ if( valuePtr )
+ {
+ valuePtr->Get( visualType );
+ }
if( animator.propertyKey == Toolkit::DevelVisual::Property::MIX_COLOR ||
animator.propertyKey == MIX_COLOR ||
}
else if( mImpl->mRenderer )
{
- AnimateRendererProperty(transition, animator);
+ AnimateRendererProperty( transition, animator );
}
}