X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=dali-toolkit%2Fpublic-api%2Fbuilder%2Fbuilder.cpp;h=38c54750d512390f4ffb6e036a56fbce6bb9145e;hb=22e89375677d1fe737d5472e21ab681f2f3e4ca7;hp=8613016f88edad7a12095d1116c051245990dd2f;hpb=e2eda444afbe82e9591fe198eef339227f90a616;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/public-api/builder/builder.cpp b/dali-toolkit/public-api/builder/builder.cpp index 8613016..38c5475 100644 --- a/dali-toolkit/public-api/builder/builder.cpp +++ b/dali-toolkit/public-api/builder/builder.cpp @@ -1,18 +1,19 @@ -// -// 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. + * + */ // CLASS HEADER @@ -53,54 +54,79 @@ void Builder::LoadFromString( const std::string &data, UIFormat rep ) GetImpl(*this).LoadFromString( data ); } +void Builder::AddConstants( const Property::Map& map ) +{ + GetImpl(*this).AddConstants( map ); +} + +void Builder::AddConstant( const std::string& key, const Property::Value& value ) +{ + GetImpl(*this).AddConstant( key, value ); +} + +const Property::Map& Builder::GetConstants() const +{ + return GetImpl(*this).GetConstants(); +} + +const Property::Value& Builder::GetConstant( const std::string& key ) const +{ + return GetImpl(*this).GetConstant( key ); +} + Animation Builder::CreateAnimation( const std::string& animationName ) { return GetImpl(*this).CreateAnimation( animationName ); } -BaseHandle Builder::CreateFromStyle( const std::string& styleName ) +Animation Builder::CreateAnimation( const std::string& animationName, const Property::Map& map ) { - return GetImpl(*this).CreateFromStyle( styleName ); + return GetImpl(*this).CreateAnimation( animationName, map ); } -void Builder::ApplyStyle( const std::string& styleName, Handle& handle ) +Animation Builder::CreateAnimation( const std::string& animationName, Dali::Actor sourceActor ) { - GetImpl(*this).ApplyStyle( styleName, handle ); + return GetImpl(*this).CreateAnimation( animationName, sourceActor ); } -void Builder::AddActors( Actor toActor ) +Animation Builder::CreateAnimation( const std::string& animationName, const Property::Map& map, Dali::Actor sourceActor ) { - GetImpl(*this).AddActors( toActor ); + return GetImpl(*this).CreateAnimation( animationName, map, sourceActor ); } -void Builder::AddActors( const std::string §ionName, Actor toActor ) +BaseHandle Builder::Create( const std::string& templateName ) { - GetImpl(*this).AddActors( sectionName, toActor ); + return GetImpl(*this).Create( templateName ); } -Font Builder::GetFont( const std::string &name ) const +BaseHandle Builder::Create( const std::string& templateName, const Property::Map& map ) { - return GetImpl(*this).GetFont( name ); + return GetImpl(*this).Create( templateName, map ); } -TextStyle Builder::GetTextStyle( const std::string &name ) const +BaseHandle Builder::CreateFromJson( const std::string& json ) { - return GetImpl(*this).GetTextStyle( name ); + return GetImpl(*this).CreateFromJson( json ); } -Image Builder::GetImage( const std::string &name ) const +bool Builder::ApplyStyle( const std::string& styleName, Handle& handle ) { - return GetImpl(*this).GetImage( name ); + return GetImpl(*this).ApplyStyle( styleName, handle ); } -Actor Builder::GetActor( const std::string &name ) const +bool Builder::ApplyFromJson( Handle& handle, const std::string& json ) { - return GetImpl(*this).GetActor( name ); + return GetImpl(*this).ApplyFromJson( handle, json ); } -Animation Builder::GetAnimation( const std::string &name ) const +void Builder::AddActors( Actor toActor ) { - return GetImpl(*this).GetAnimation( name ); + GetImpl(*this).AddActors( toActor ); +} + +void Builder::AddActors( const std::string §ionName, Actor toActor ) +{ + GetImpl(*this).AddActors( sectionName, toActor ); } void Builder::CreateRenderTask( const std::string &name ) @@ -118,9 +144,14 @@ FrameBufferImage Builder::GetFrameBufferImage( const std::string &name ) return GetImpl(*this).GetFrameBufferImage( name ); } -ActorContainer Builder::GetTopLevelActors( void ) const +Path Builder::GetPath( const std::string &name ) +{ + return GetImpl(*this).GetPath( name ); +} + +Builder::BuilderSignalType& Builder::QuitSignal() { - return GetImpl(*this).GetTopLevelActors(); + return GetImpl( *this ).QuitSignal(); } } // namespace Toolkit