LayerPtr root( new Layer( Actor::ROOT_LAYER, *rootLayer ) );
// root actor is immediately considered to be on-stage
- root->mIsOnStage = true;
+ root->mIsOnScene = true;
// The root actor will not emit a stage connection signal so set the signalled flag here as well
- root->mOnStageSignalled = true;
+ root->mOnSceneSignalled = true;
// layer-list must be set for the root layer
root->mLayerList = &layerList;
Layer::Layer( Actor::DerivedType type, const SceneGraph::Layer& layer )
: Actor( type, layer ),
- mLayerList( NULL ),
+ mLayerList( nullptr ),
mClippingBox( 0, 0, 0, 0 ),
mSortFunction( Layer::ZValue ),
mBehavior( Dali::Layer::LAYER_UI ),
// Guard to allow handle destruction after Core has been destroyed
if( EventThreadServices::IsCoreRunning() )
{
- UninstallRootMessage( GetEventThreadServices().GetUpdateManager(), &GetSceneLayerOnStage() );
+ UninstallRootMessage( GetEventThreadServices().GetUpdateManager(), &GetSceneGraphLayer() );
GetEventThreadServices().UnregisterObject( this );
}
void Layer::RaiseAbove( const Internal::Layer& target )
{
- // cannot raise above ourself, both have to be on stage
- if( ( this != &target ) && OnStage() && target.OnStage() )
+ // cannot raise above ourself, both have to be on the scene
+ if( ( this != &target ) && OnScene() && target.OnScene() )
{
// get parameters depth
const uint32_t targetDepth = target.GetDepth();
void Layer::LowerBelow( const Internal::Layer& target )
{
- // cannot lower below ourself, both have to be on stage
- if( ( this != &target ) && OnStage() && target.OnStage() )
+ // cannot lower below ourself, both have to be on the scene
+ if( ( this != &target ) && OnScene() && target.OnScene() )
{
// get parameters depth
const uint32_t targetDepth = target.GetDepth();
void Layer::MoveAbove( const Internal::Layer& target )
{
- // cannot raise above ourself, both have to be on stage
- if( ( this != &target ) && mLayerList && target.OnStage() )
+ // cannot raise above ourself, both have to be on the scene
+ if( ( this != &target ) && mLayerList && target.OnScene() )
{
mLayerList->MoveLayerAbove(*this, target );
}
void Layer::MoveBelow( const Internal::Layer& target )
{
- // cannot lower below ourself, both have to be on stage
- if( ( this != &target ) && mLayerList && target.OnStage() )
+ // cannot lower below ourself, both have to be on the scene
+ if( ( this != &target ) && mLayerList && target.OnScene() )
{
mLayerList->MoveLayerBelow(*this, target );
}
mBehavior = behavior;
// Notify update side object.
- SetBehaviorMessage( GetEventThreadServices(), GetSceneLayerOnStage(), behavior );
+ SetBehaviorMessage( GetEventThreadServices(), GetSceneGraphLayer(), behavior );
// By default, disable depth test for LAYER_UI, and enable for LAYER_3D.
SetDepthTestDisabled( mBehavior == Dali::Layer::LAYER_UI );
}
mIsClipping = enabled;
// layerNode is being used in a separate thread; queue a message to set the value
- SetClippingMessage( GetEventThreadServices(), GetSceneLayerOnStage(), mIsClipping );
+ SetClippingMessage( GetEventThreadServices(), GetSceneGraphLayer(), mIsClipping );
}
}
clippingBox.y = static_cast<int32_t>( mScene->GetSize().height ) - clippingBox.y - clippingBox.height;
// layerNode is being used in a separate thread; queue a message to set the value
- SetClippingBoxMessage( GetEventThreadServices(), GetSceneLayerOnStage(), clippingBox );
+ SetClippingBoxMessage( GetEventThreadServices(), GetSceneGraphLayer(), clippingBox );
}
}
}
// Send message.
// layerNode is being used in a separate thread; queue a message to set the value
- SetDepthTestDisabledMessage( GetEventThreadServices(), GetSceneLayerOnStage(), mDepthTestDisabled );
+ SetDepthTestDisabledMessage( GetEventThreadServices(), GetSceneGraphLayer(), mDepthTestDisabled );
}
}
mSortFunction = function;
// layerNode is being used in a separate thread; queue a message to set the value
- SetSortFunctionMessage( GetEventThreadServices(), GetSceneLayerOnStage(), mSortFunction );
+ SetSortFunctionMessage( GetEventThreadServices(), GetSceneGraphLayer(), mSortFunction );
}
}
return mHoverConsumed;
}
-void Layer::OnStageConnectionInternal()
+void Layer::OnSceneConnectionInternal()
{
if ( !mIsRoot )
{
DALI_ASSERT_DEBUG( NULL == mLayerList );
// Find the ordered layer-list
- for ( Actor* parent = mParent; parent != NULL; parent = parent->GetParent() )
+ for ( Actor* parent = mParent; parent != nullptr; parent = parent->GetParent() )
{
if( parent->IsLayer() )
{
mLayerList->RegisterLayer( *this );
}
-void Layer::OnStageDisconnectionInternal()
+void Layer::OnSceneDisconnectionInternal()
{
mLayerList->UnregisterLayer(*this);
// mLayerList is only valid when on-stage
- mLayerList = NULL;
+ mLayerList = nullptr;
}
-const SceneGraph::Layer& Layer::GetSceneLayerOnStage() const
+const SceneGraph::Layer& Layer::GetSceneGraphLayer() const
{
return static_cast< const SceneGraph::Layer& >( GetNode() ); // we know our node is a layer node
}