if( actor->GetChildCount() > 0 )
{
- for( ActorPtr& child : actor->GetChildrenInternal() )
+ for( auto& child : actor->GetChildrenInternal() )
{
EmitVisibilityChangedSignalRecursively( child, visible, DevelActor::VisibilityChange::PARENT );
}
}
else if( mChildren )
{
- ActorIter end = mChildren->end();
- for( ActorIter iter = mChildren->begin(); iter != end; ++iter )
+ for( const auto& actor : *mChildren )
{
- child = (*iter)->FindChildByName( actorName );
+ child = actor->FindChildByName( actorName );
if( child )
{
}
else if( mChildren )
{
- ActorIter end = mChildren->end();
- for( ActorIter iter = mChildren->begin(); iter != end; ++iter )
+ for( const auto& actor : *mChildren )
{
- child = (*iter)->FindChildById( id );
+ child = actor->FindChildById( id );
if( child )
{
// node is being used in a separate thread; queue a message to set the value & base value
SceneGraph::NodePropertyComponentMessage<Vector4>::Send( GetEventThreadServices(), &GetNode(), &GetNode().mColor, &AnimatableProperty<Vector4>::BakeW, opacity );
-
- RequestRenderingMessage( GetEventThreadServices().GetUpdateManager() );
}
float Actor::GetCurrentOpacity() const
// node is being used in a separate thread; queue a message to set the value & base value
SceneGraph::NodePropertyMessage<Vector4>::Send( GetEventThreadServices(), &GetNode(), &GetNode().mColor, &AnimatableProperty<Vector4>::Bake, color );
-
- RequestRenderingMessage( GetEventThreadServices().GetUpdateManager() );
}
void Actor::SetColorRed( float red )
// node is being used in a separate thread; queue a message to set the value & base value
SceneGraph::NodePropertyComponentMessage<Vector4>::Send( GetEventThreadServices(), &GetNode(), &GetNode().mColor, &AnimatableProperty<Vector4>::BakeX, red );
-
- RequestRenderingMessage( GetEventThreadServices().GetUpdateManager() );
}
void Actor::SetColorGreen( float green )
// node is being used in a separate thread; queue a message to set the value & base value
SceneGraph::NodePropertyComponentMessage<Vector4>::Send( GetEventThreadServices(), &GetNode(), &GetNode().mColor, &AnimatableProperty<Vector4>::BakeY, green );
-
- RequestRenderingMessage( GetEventThreadServices().GetUpdateManager() );
}
void Actor::SetColorBlue( float blue )
// node is being used in a separate thread; queue a message to set the value & base value
SceneGraph::NodePropertyComponentMessage<Vector4>::Send( GetEventThreadServices(), &GetNode(), &GetNode().mColor, &AnimatableProperty<Vector4>::BakeZ, blue );
-
- RequestRenderingMessage( GetEventThreadServices().GetUpdateManager() );
}
const Vector4& Actor::GetCurrentColor() const
// to guard against GetParent() & Unparent() calls from CustomActor destructors.
if( mChildren )
{
- ActorConstIter endIter = mChildren->end();
- for( ActorIter iter = mChildren->begin(); iter != endIter; ++iter )
+ for( const auto& actor : *mChildren )
{
- (*iter)->SetParent( nullptr );
+ actor->SetParent( nullptr );
}
}
delete mChildren;
RecursiveConnectToScene( connectionList, parentDepth + 1 );
// Notify applications about the newly connected actors.
- const ActorIter endIter = connectionList.end();
- for( ActorIter iter = connectionList.begin(); iter != endIter; ++iter )
+ for( const auto& actor : connectionList )
{
- (*iter)->NotifyStageConnection();
+ actor->NotifyStageConnection();
}
RelayoutRequest();
// Recursively connect children
if( mChildren )
{
- ActorConstIter endIter = mChildren->end();
- for( ActorIter iter = mChildren->begin(); iter != endIter; ++iter )
+ for( const auto& actor : *mChildren )
{
- (*iter)->SetScene( *mScene );
- (*iter)->RecursiveConnectToScene( connectionList, depth + 1 );
+ actor->SetScene( *mScene );
+ actor->RecursiveConnectToScene( connectionList, depth + 1 );
}
}
}
RecursiveDisconnectFromStage( disconnectionList );
// Notify applications about the newly disconnected actors.
- const ActorIter endIter = disconnectionList.end();
- for( ActorIter iter = disconnectionList.begin(); iter != endIter; ++iter )
+ for( const auto& actor : disconnectionList )
{
- (*iter)->NotifyStageDisconnection();
+ actor->NotifyStageDisconnection();
}
}
// Recursively disconnect children
if( mChildren )
{
- ActorConstIter endIter = mChildren->end();
- for( ActorIter iter = mChildren->begin(); iter != endIter; ++iter )
+ for( const auto& child : *mChildren )
{
- (*iter)->RecursiveDisconnectFromStage( disconnectionList );
+ child->RecursiveDisconnectFromStage( disconnectionList );
}
}
// Create/add to children of this node
if( mChildren )
{
- for( ActorContainer::iterator it = mChildren->begin(); it != mChildren->end(); ++it )
+ for( const auto& child : *mChildren )
{
- Actor* childActor = (*it).Get();
+ Actor* childActor = child.Get();
++depthIndex;
childActor->DepthTraverseActorTree( sceneGraphNodeDepths, depthIndex );
}
// Check that we havn't gotten into an infinite loop
ActorDimensionPair searchActor = ActorDimensionPair( this, dimension );
bool recursionFound = false;
- for( ActorDimensionStack::iterator it = recursionStack.begin(), itEnd = recursionStack.end(); it != itEnd; ++it )
+ for( auto& element : recursionStack )
{
- if( *it == searchActor )
+ if( element == searchActor )
{
recursionFound = true;
break;
{
// node is being used in a separate thread; queue a message to set the value & base value
SceneGraph::NodePropertyMessage<bool>::Send( GetEventThreadServices(), &GetNode(), &GetNode().mVisible, &AnimatableProperty<bool>::Bake, visible );
-
- RequestRenderingMessage( GetEventThreadServices().GetUpdateManager() );
}
mVisible = visible;
ActorContainer& siblings = *(mParent->mChildren);
if( siblings.back() != this ) // If not already at end
{
- ActorContainer::iterator iter = std::find( siblings.begin(), siblings.end(), this );
+ auto iter = std::find( siblings.begin(), siblings.end(), this );
if( iter != siblings.end() )
{
siblings.erase(iter);
{
ActorPtr thisPtr(this); // ensure this actor remains referenced.
- ActorContainer::iterator iter = std::find( siblings.begin(), siblings.end(), this );
+ auto iter = std::find( siblings.begin(), siblings.end(), this );
if( iter != siblings.end() )
{
siblings.erase(iter);
{
ActorPtr thisPtr(this); // ensure this actor remains referenced.
- ActorContainer::iterator targetIter = std::find( siblings.begin(), siblings.end(), &target );
- ActorContainer::iterator thisIter = std::find( siblings.begin(), siblings.end(), this );
+ auto targetIter = std::find( siblings.begin(), siblings.end(), &target );
+ auto thisIter = std::find( siblings.begin(), siblings.end(), this );
if( thisIter < targetIter )
{
siblings.erase(thisIter);
{
ActorPtr thisPtr(this); // ensure this actor remains referenced.
- ActorContainer::iterator targetIter = std::find( siblings.begin(), siblings.end(), &target );
- ActorContainer::iterator thisIter = std::find( siblings.begin(), siblings.end(), this );
+ auto targetIter = std::find( siblings.begin(), siblings.end(), &target );
+ auto thisIter = std::find( siblings.begin(), siblings.end(), this );
if( thisIter > targetIter )
{
if( actor->GetChildCount() > 0 )
{
- for( ActorPtr& child : actor->GetChildrenInternal() )
+ for( const auto& child : actor->GetChildrenInternal() )
{
InheritLayoutDirectionRecursively( child, direction );
}