/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// EXTERNAL INCLUDES
#if defined(DEBUG_ENABLED)
#include <sstream>
-#include <dali/internal/event/common/system-overlay-impl.h>
#endif // defined(DEBUG_ENABLED)
// INTERNAL INCLUDES
#include <dali/public-api/object/object-registry.h>
#include <dali/internal/event/actors/actor-impl.h>
#include <dali/internal/event/common/stage-impl.h>
-#include <dali/internal/event/common/system-overlay-impl.h>
#include <dali/internal/event/common/thread-local-storage.h>
namespace Dali
DALI_LOG_INFO( gLogFilter, Debug::Verbose, output.str().c_str() );
++level;
- unsigned int numChildren = actor.GetChildCount();
- for( unsigned int i=0; i<numChildren; ++i )
+ uint32_t numChildren = actor.GetChildCount();
+ for( uint32_t i=0; i<numChildren; ++i )
{
PrintChildren( actor.GetChildAt(i), level );
}
return &ThreadLocalStorage::Get().GetRelayoutController();
}
-void RelayoutController::SetStageSize( unsigned int width, unsigned int height )
+void RelayoutController::SetStageSize( uint32_t width, uint32_t height )
{
- mStageSize.width = width;
- mStageSize.height = height;
+ mStageSize.width = static_cast<float>( width );
+ mStageSize.height = static_cast<float>( height );
}
void RelayoutController::QueueActor( Dali::Actor& actor, RelayoutContainer& actors, Vector2 size )
topOfSubTreeStack.push_back( actor );
// Propagate on all dimensions
- for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
+ for( uint32_t i = 0; i < Dimension::DIMENSION_COUNT; ++i )
{
if( dimension & ( 1 << i ) )
{
if ( !mProcessingCoreEvents )
{
- mRenderController.RequestProcessEventsOnIdle();
+ mRenderController.RequestProcessEventsOnIdle( false );
}
}
Dali::Actor rootLayer = stage.GetRootLayer();
RequestRelayoutTree( rootLayer );
- // Also add request on the root of system overlay
- Dali::Internal::SystemOverlay* systemOverlay = GetImplementation(stage).GetSystemOverlayInternal();
- if( systemOverlay )
- {
- Dali::Internal::Actor& systemOverlayInternalRoot = systemOverlay->GetDefaultRootActor();
- Dali::Actor systemOverlayRoot = Dali::Actor(&systemOverlayInternalRoot);
- RequestRelayoutTree( systemOverlayRoot );
- }
-
// Flag request for end of frame
Request();
}
}
// Propagate down to children
- for( unsigned int i = 0; i < actor.GetChildCount(); ++i )
+ for( uint32_t i = 0; i < actor.GetChildCount(); ++i )
{
Dali::Actor child = actor.GetChildAt( i );
// Check for dimension dependecy: width for height/height for width etc
// Check each possible dimension and see if it is dependent on the input one
- for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
+ for( uint32_t i = 0; i < Dimension::DIMENSION_COUNT; ++i )
{
Dimension::Type dimensionToCheck = static_cast< Dimension::Type >( 1 << i );
{
// Store the highest parent reached
bool found = false;
- for( unsigned int i = 0, count = topOfSubTreeStack.size(); i < count; ++i )
+ for( auto&& element : topOfSubTreeStack )
{
- if( topOfSubTreeStack[ i ] == parent )
+ if( element == parent )
{
found = true;
break;
// Check for dimension dependecy: width for height/height for width etc
// Check each possible dimension and see if it is dependent on the input one
- for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
+ for( uint32_t i = 0; i < Dimension::DIMENSION_COUNT; ++i )
{
Dimension::Type dimensionToCheck = static_cast< Dimension::Type >( 1 << i );
}
// Propagate down to children
- for( unsigned int i = 0, childCount = actor.GetChildCount(); i < childCount; ++i )
+ for( uint32_t i = 0, childCount = actor.GetChildCount(); i < childCount; ++i )
{
Dali::Actor child = actor.GetChildAt( i );
Actor& childImpl = GetImplementation( child );
// Only add the rootActor if it is not already recorded
bool found = false;
- for( unsigned int i = 0, count = mDirtyLayoutSubTrees.Size(); i < count; ++i )
+ for( auto&& item : mDirtyLayoutSubTrees )
{
- if( mDirtyLayoutSubTrees[ i ] == actorPtr )
+ if( item == actorPtr )
{
found = true;
break;
// has to fill with all the actors it has not done any size negotiation for.
actorImpl.NegotiateSize( size, *mRelayoutStack );
+
+ // Reset the flag so that size negotiation will respect the actor's original resize policy
+ actorImpl.SetUseAssignedSize( false );
}
}