+void Control::RegisterVisual( Property::Index index, Actor placementActor, Toolkit::Visual::Base visual )
+{
+ bool visualReplaced ( false );
+ Actor actorToRegister; // Null actor, replaced if placement actor not Self
+
+ if ( placementActor != Self() ) // Prevent increasing ref count if actor self
+ {
+ actorToRegister = placementActor;
+ }
+
+ if ( !mImpl->mVisuals.empty() )
+ {
+ std::vector<RegisteredVisual>::iterator iter;
+ // Check if visual (index) is already registered. Replace if so.
+ if ( FindVisual( index, mImpl->mVisuals, iter ) )
+ {
+ (*iter).visual = visual;
+ (*iter).placementActor = actorToRegister;
+ visualReplaced = true;
+ }
+ }
+
+ if ( !visualReplaced ) // New registration entry
+ {
+ RegisteredVisual newVisual = RegisteredVisual( index, visual, actorToRegister );
+ mImpl->mVisuals.push_back( newVisual );
+ }
+}
+
+void Control::UnregisterVisual( Property::Index index )
+{
+ std::vector< RegisteredVisual >::iterator iter;
+ if ( FindVisual( index, mImpl->mVisuals, iter ) )
+ {
+ mImpl->mVisuals.erase( iter );
+ }
+}
+
+Toolkit::Visual::Base Control::GetVisual( Property::Index index )
+{
+ std::vector< RegisteredVisual >::iterator iter;
+ if ( FindVisual( index, mImpl->mVisuals, iter ) )
+ {
+ return (*iter).visual;
+ }
+
+ return Toolkit::Visual::Base();
+}
+
+Actor Control::GetPlacementActor( Property::Index index )
+{
+ std::vector< RegisteredVisual >::iterator iter;
+ if ( FindVisual( index, mImpl->mVisuals, iter ) )
+ {
+ if( (*iter).placementActor )
+ {
+ return (*iter).placementActor;
+ }
+ else
+ {
+ return Self();
+ }
+ }
+
+ return Actor();
+}
+