From: Adeel Kazmi Date: Tue, 5 Jan 2016 12:51:31 +0000 (+0000) Subject: Restored control-depth-index-ranges.h to released version but using devel values... X-Git-Tag: dali_1.1.16~5^2~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=refs%2Fchanges%2F37%2F56237%2F7 Restored control-depth-index-ranges.h to released version but using devel values internally Change-Id: I1a6a0f46c1ac24d126866df2583030e4f34e4b2d --- diff --git a/dali-toolkit/devel-api/controls/control-depth-index-ranges.h b/dali-toolkit/devel-api/controls/control-depth-index-ranges.h new file mode 100644 index 0000000..d010c11 --- /dev/null +++ b/dali-toolkit/devel-api/controls/control-depth-index-ranges.h @@ -0,0 +1,47 @@ +#ifndef __DALI_TOOLKIT_DEVEL_CONTROL_DEPTH_INDEX_RANGES_H__ +#define __DALI_TOOLKIT_DEVEL_CONTROL_DEPTH_INDEX_RANGES_H__ + +/* + * Copyright (c) 2016 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// EXTERNAL INCLUDES +#include + +namespace Dali +{ + +namespace Toolkit +{ + +namespace DepthIndex +{ + +enum Ranges +{ + BACKGROUND = -Dali::Layer::TREE_DEPTH_MULTIPLIER / 10, + CONTENT = 0, + TEXT = Dali::Layer::TREE_DEPTH_MULTIPLIER / 100, + DECORATION = Dali::Layer::TREE_DEPTH_MULTIPLIER / 10 +}; + +} // namespace DepthIndex + +} // namespace Toolkit + +} // namespace Dali + +#endif // __DALI_TOOLKIT_DEVEL_CONTROL_DEPTH_INDEX_RANGES_H__ diff --git a/dali-toolkit/internal/controls/buttons/check-box-button-impl.cpp b/dali-toolkit/internal/controls/buttons/check-box-button-impl.cpp index 44d62a5..79ef935 100644 --- a/dali-toolkit/internal/controls/buttons/check-box-button-impl.cpp +++ b/dali-toolkit/internal/controls/buttons/check-box-button-impl.cpp @@ -23,8 +23,8 @@ #include //INTERNAL INCLUDES -#include #include +#include #include namespace Dali @@ -93,7 +93,7 @@ void CheckBoxButton::SetTickUVEffect() Property::Map shaderMap = CreateImageRegionEffect(); imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, shaderMap ); - GetImpl( imageView ).SetDepthIndex( DECORATION_DEPTH_INDEX ); + GetImpl( imageView ).SetDepthIndex( DepthIndex::DECORATION ); } } diff --git a/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp index d8b7244..e31213e 100644 --- a/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp @@ -28,8 +28,8 @@ #include // INTERNAL INCLUDES -#include #include +#include #include #include #include @@ -1009,7 +1009,7 @@ void TextField::RenderText() Actor renderableActor; if( mRenderer ) { - renderableActor = mRenderer->Render( mController->GetView(), TEXT_DEPTH_INDEX ); + renderableActor = mRenderer->Render( mController->GetView(), DepthIndex::TEXT ); } if( renderableActor != mRenderableActor ) diff --git a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp index 6b19664..11364d0 100644 --- a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp @@ -23,8 +23,8 @@ #include // INTERNAL INCLUDES -#include #include +#include #include #include #include @@ -519,7 +519,7 @@ void TextLabel::RenderText() Actor renderableActor; if( mRenderer ) { - renderableActor = mRenderer->Render( mController->GetView(), TEXT_DEPTH_INDEX ); + renderableActor = mRenderer->Render( mController->GetView(), DepthIndex::TEXT ); } if( renderableActor != mRenderableActor ) diff --git a/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp index 6022879..c19b920 100644 --- a/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp @@ -18,13 +18,9 @@ // CLASS HEADER #include -// INTERNAL INCLUDES -#include -#include -#include -#include - // EXTERNAL INCLUDES +#include +#include #include #include #include @@ -34,8 +30,11 @@ #include #include -#include -#include +// INTERNAL INCLUDES +#include +#include +#include +#include namespace Dali { diff --git a/dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.cpp index 0c49761..81ec840 100644 --- a/dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.cpp @@ -18,18 +18,18 @@ // CLASS HEADER #include -// INTERNAL INCLUDES -#include -#include -#include - // EXTERNAL INCLUDES +#include #include #include #include #include #include -#include + +// INTERNAL INCLUDES +#include +#include +#include namespace Dali { diff --git a/dali-toolkit/internal/text/decorator/text-decorator.cpp b/dali-toolkit/internal/text/decorator/text-decorator.cpp index 3e6e33d..fc3328d 100644 --- a/dali-toolkit/internal/text/decorator/text-decorator.cpp +++ b/dali-toolkit/internal/text/decorator/text-decorator.cpp @@ -33,9 +33,9 @@ #include // INTERNAL INCLUDES -#include #include #include +#include #include #ifdef DEBUG_ENABLED @@ -660,7 +660,7 @@ struct Decorator::Impl : public ConnectionTracker if( !grabHandle.actor ) { grabHandle.actor = ImageView::New( mHandleImages[GRAB_HANDLE][HANDLE_IMAGE_RELEASED] ); - GetImpl( grabHandle.actor).SetDepthIndex( DECORATION_DEPTH_INDEX ); + GetImpl( grabHandle.actor).SetDepthIndex( DepthIndex::DECORATION ); grabHandle.actor.SetAnchorPoint( AnchorPoint::TOP_CENTER ); // Area that Grab handle responds to, larger than actual handle so easier to move #ifdef DECORATOR_DEBUG @@ -734,7 +734,7 @@ struct Decorator::Impl : public ConnectionTracker primary.actor.SetName("SelectionHandleOne"); #endif primary.actor.SetAnchorPoint( AnchorPoint::TOP_RIGHT ); // Change to BOTTOM_RIGHT if Look'n'Feel requires handle above text. - GetImpl( primary.actor ).SetDepthIndex( DECORATION_DEPTH_INDEX ); + GetImpl( primary.actor ).SetDepthIndex( DepthIndex::DECORATION ); primary.actor.SetColor( mHandleColor ); primary.grabArea = Actor::New(); // Area that Grab handle responds to, larger than actual handle so easier to move @@ -768,7 +768,7 @@ struct Decorator::Impl : public ConnectionTracker secondary.actor.SetName("SelectionHandleTwo"); #endif secondary.actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); // Change to BOTTOM_LEFT if Look'n'Feel requires handle above text. - GetImpl( secondary.actor ).SetDepthIndex( DECORATION_DEPTH_INDEX ); + GetImpl( secondary.actor ).SetDepthIndex( DepthIndex::DECORATION ); secondary.actor.SetColor( mHandleColor ); secondary.grabArea = Actor::New(); // Area that Grab handle responds to, larger than actual handle so easier to move diff --git a/dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp b/dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp index 33423eb..35bb46f 100644 --- a/dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp +++ b/dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp @@ -25,7 +25,7 @@ #include // INTERNAL INCLUDES -#include +#include #include #include #include @@ -490,7 +490,7 @@ struct AtlasRenderer::Impl Material material = mGlyphManager.GetMaterial( meshRecord.mAtlasId ); Dali::Renderer renderer = Dali::Renderer::New( quadGeometry, material ); - renderer.SetDepthIndex( CONTENT_DEPTH_INDEX + mDepth ); + renderer.SetDepthIndex( DepthIndex::CONTENT + mDepth ); Actor actor = Actor::New(); #if defined(DEBUG_ENABLED) actor.SetName( "Text renderable actor" ); diff --git a/dali-toolkit/public-api/controls/control-depth-index-ranges.h b/dali-toolkit/public-api/controls/control-depth-index-ranges.h index 95e8624..d0f4187 100644 --- a/dali-toolkit/public-api/controls/control-depth-index-ranges.h +++ b/dali-toolkit/public-api/controls/control-depth-index-ranges.h @@ -2,7 +2,7 @@ #define __DALI_TOOLKIT_CONTROL_DEPTH_INDEX_RANGES_H__ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2016 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. @@ -18,7 +18,9 @@ * */ +// EXTERNAL INCLUDES #include + namespace Dali { namespace Toolkit @@ -28,12 +30,16 @@ namespace Toolkit * @{ */ -enum ControlDepthIndexRanges +/** + * @deprecated DALi 1.1.16 + * + * @brief These depth indices should not be used. + */ +enum DepthIndexRanges { - BACKGROUND_DEPTH_INDEX = -Dali::Layer::TREE_DEPTH_MULTIPLIER / 10, - CONTENT_DEPTH_INDEX = 0, - TEXT_DEPTH_INDEX = Dali::Layer::TREE_DEPTH_MULTIPLIER / 100, - DECORATION_DEPTH_INDEX = Dali::Layer::TREE_DEPTH_MULTIPLIER / 10 + BACKGROUND_DEPTH_INDEX = static_cast( -Dali::Layer::TREE_DEPTH_MULTIPLIER * 0.1f ), ///< @deprecated DALi 1.1.16 + CONTENT_DEPTH_INDEX = 0, ///< @deprecated DALi 1.1.16 + DECORATION_DEPTH_INDEX = static_cast( Dali::Layer::TREE_DEPTH_MULTIPLIER * 0.1f ) ///< @deprecated DALi 1.1.16 }; /** @@ -43,5 +49,4 @@ enum ControlDepthIndexRanges } - #endif diff --git a/dali-toolkit/public-api/controls/control-impl.cpp b/dali-toolkit/public-api/controls/control-impl.cpp index 6d1a28d..df7bb8c 100644 --- a/dali-toolkit/public-api/controls/control-impl.cpp +++ b/dali-toolkit/public-api/controls/control-impl.cpp @@ -32,11 +32,11 @@ #include // INTERNAL INCLUDES -#include -#include -#include #include #include +#include +#include +#include #include #include #include @@ -452,7 +452,7 @@ void Control::SetBackgroundColor( const Vector4& color ) Actor self( Self() ); Toolkit::RendererFactory factory = Toolkit::RendererFactory::Get(); factory.ResetRenderer( mImpl->mBackgroundRenderer, self, color ); - mImpl->mBackgroundRenderer.SetDepthIndex( BACKGROUND_DEPTH_INDEX ); + mImpl->mBackgroundRenderer.SetDepthIndex( DepthIndex::BACKGROUND ); } Vector4 Control::GetBackgroundColor() const @@ -488,7 +488,7 @@ void Control::SetBackground(const Property::Map& map) mImpl->mBackgroundRenderer = factory.GetControlRenderer( map ); if( mImpl->mBackgroundRenderer && self.OnStage() ) // Request control renderer with a property map might return an empty handle { - mImpl->mBackgroundRenderer.SetDepthIndex( BACKGROUND_DEPTH_INDEX ); + mImpl->mBackgroundRenderer.SetDepthIndex( DepthIndex::BACKGROUND ); mImpl->mBackgroundRenderer.SetOnStage( self ); } } @@ -498,7 +498,7 @@ void Control::SetBackgroundImage( Image image ) Actor self( Self() ); Toolkit::RendererFactory factory = Toolkit::RendererFactory::Get(); factory.ResetRenderer( mImpl->mBackgroundRenderer, self, image ); - mImpl->mBackgroundRenderer.SetDepthIndex( BACKGROUND_DEPTH_INDEX ); + mImpl->mBackgroundRenderer.SetDepthIndex( DepthIndex::BACKGROUND ); } void Control::ClearBackground()