X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=base%2Fdali-toolkit%2Finternal%2Fbuilder%2Fbuilder-impl.h;h=a51a35054f14851d009cb21fc210ca3eefc7bd90;hp=eae2f71f6b928d258ffd9ede3ccd2213fd969859;hb=b7118cd60dccec726fa77b5fc496289ecb9a9ac0;hpb=022b76df6f53c2860f2684ef1ffee81af1805e2e diff --git a/base/dali-toolkit/internal/builder/builder-impl.h b/base/dali-toolkit/internal/builder/builder-impl.h index eae2f71..a51a350 100644 --- a/base/dali-toolkit/internal/builder/builder-impl.h +++ b/base/dali-toolkit/internal/builder/builder-impl.h @@ -1,28 +1,29 @@ #ifndef __DALI_TOOLKIT_INTERNAL_BUILDER_H__ #define __DALI_TOOLKIT_INTERNAL_BUILDER_H__ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Flora License, Version 1.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://floralicense.org/license/ -// -// 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. -// +/* + * Copyright (c) 2014 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 #include #include -#include -#include +#include +#include #include // INTERNAL INCLUDES @@ -81,7 +82,7 @@ public: /** * @copydoc Toolkit::Builder::AddConstants */ - void AddConstants( const PropertyValueMap& map ); + void AddConstants( const Property::Map& map ); /** * @copydoc Toolkit::Builder::AddConstant @@ -91,7 +92,7 @@ public: /** * @copydoc Toolkit::Builder::GetConstants */ - const PropertyValueMap& GetConstants() const; + const Property::Map& GetConstants() const; /** * @copydoc Toolkit::Builder::GetConstant @@ -104,9 +105,9 @@ public: Animation CreateAnimation( const std::string& animationName ); /** - * @copydoc Toolkit::Builder::CreateAnimation( const std::string& animationName, const PropertyValueMap& map ); + * @copydoc Toolkit::Builder::CreateAnimation( const std::string& animationName, const Property::Map& map ); */ - Animation CreateAnimation( const std::string& animationName, const PropertyValueMap& map ); + Animation CreateAnimation( const std::string& animationName, const Property::Map& map ); /** * @copydoc Toolkit::Builder::CreateAnimation( const std::string&,Dali::Actor); @@ -114,9 +115,9 @@ public: Animation CreateAnimation( const std::string& animationName, Dali::Actor sourceActor ); /** - * @copydoc Toolkit::Builder::CreateAnimation( const std::string&,const PropertyValueMap&,Dali::Actor); + * @copydoc Toolkit::Builder::CreateAnimation( const std::string&,const Property::Map&, Dali::Actor); */ - Animation CreateAnimation( const std::string& animationName, const PropertyValueMap& map, Dali::Actor sourceActor ); + Animation CreateAnimation( const std::string& animationName, const Property::Map& map, Dali::Actor sourceActor ); /** * @copydoc Toolkit::Builder::Create( const std::string& templateName ); @@ -124,37 +125,25 @@ public: BaseHandle Create( const std::string& templateName ); /** - * @copydoc Toolkit::Builder::Create( const std::string& templateName, const PropertyValueMap& map ); - */ - BaseHandle Create( const std::string& templateName, const PropertyValueMap& map ); - - /** - * @copydoc Toolkit::Builder::GetFont - */ - Font GetFont(const std::string &name) const; - - /** - * @copydoc Toolkit::Builder::GetTextStyle + * @copydoc Toolkit::Builder::Create( const std::string& templateName, const Property::Map& map ); */ - TextStyle GetTextStyle(const std::string &name) const; + BaseHandle Create( const std::string& templateName, const Property::Map& map ); /** - * @copydoc Toolkit::Builder::GetImage + * @copydoc Toolkit::Builder::CreateFromJson( const std::string& json ); */ - Image GetImage(const std::string &name) const; + BaseHandle CreateFromJson( const std::string& json ); /** - * @copydoc Toolkit::Builder::GetActor + * @copydoc Toolkit::Builder::ApplyFromJson( Handle& handle, const std::string& json ); */ - Actor GetActor( const std::string &name ) const; + bool ApplyFromJson( Handle& handle, const std::string& json ); /** * @copydoc Toolkit::Builder::ApplyStyle */ bool ApplyStyle( const std::string& styleName, Handle& handle ); - void AnimateTo( const std::string& styleName, Handle& handle ); - /** * @copydoc Toolkit::Builder::AddActors */ @@ -166,11 +155,6 @@ public: void AddActors( const std::string §ionName, Actor toActor ); /** - * @copydoc Toolkit::Builder::GetAnimation - */ - Animation GetAnimation( const std::string &name ) const; - - /** * @copydoc Toolkit::Builder::CreateRenderTask */ void CreateRenderTask( const std::string &name ); @@ -196,9 +180,18 @@ public: FrameBufferImage GetFrameBufferImage( const std::string &name, const Replacement& constant ); /** - * @copydoc Toolkit::Builder::GetTopLevelActors + * @copydoc Toolkit::Builder::GetPath + */ + Path GetPath( const std::string &name ); + /** + * @copydoc Toolkit::Builder::QuitSignal + */ + Toolkit::Builder::Signal& QuitSignal(); + + /** + * Emits the quit signal */ - ActorContainer GetTopLevelActors( void ) const; + void EmitQuitSignal(); protected: @@ -220,15 +213,18 @@ private: typedef std::map ShaderEffectLut; ShaderEffectLut mShaderEffectLut; + typedef std::map PathLut; + PathLut mPathLut; + SlotDelegate mSlotDelegate; - PropertyValueMap mReplacementMap; + Property::Map mReplacementMap; BaseHandle Create( const std::string& templateName, const Replacement& constant ); BaseHandle DoCreate( const TreeNode& root, const TreeNode& node, Actor parent, const Replacement& replacements ); - void LoadConstants( const TreeNode& root, PropertyValueMap& intoMap ); + void LoadConstants( const TreeNode& root, Property::Map& intoMap ); void LoadIncludes( const std::string& data ); @@ -247,6 +243,7 @@ private: void SetProperties( const TreeNode& node, Handle& handle, const Replacement& constant ); + Toolkit::Builder::Signal mQuitSignal; }; } // namespace Internal