2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
17 #include <dali-toolkit/public-api/controls/page-turn-view/page-factory.h>
25 const std::string PageFactory::ACTOR_HITTABLE( "actor-hittable" );
27 PageFactory::PageFactory( )
28 : mNeedOffscreenRendering( false )
32 PageFactory::~PageFactory()
36 void PageFactory::EnableOffscreenRendering( )
38 mNeedOffscreenRendering = true;
41 bool PageFactory::IsOffscreenRenderingNeeded()
43 return mNeedOffscreenRendering;
46 void PageFactory::SetActorHittability( Actor actor, bool hittable )
48 // Create actor focusable property if not already created.
49 Property::Index propertyActorHittable = actor.GetPropertyIndex(ACTOR_HITTABLE);
50 if(propertyActorHittable == Property::INVALID_INDEX && hittable)
52 propertyActorHittable = actor.RegisterProperty(ACTOR_HITTABLE, true);
56 actor.SetProperty( propertyActorHittable, hittable );
60 bool PageFactory::GetActorHittability( Actor actor )
62 bool hittable = false;
64 Property::Index propertyActorHittable = actor.GetPropertyIndex(ACTOR_HITTABLE);
65 if(propertyActorHittable != Property::INVALID_INDEX)
67 hittable = actor.GetProperty<bool>( propertyActorHittable );
73 PageFactory::RefreshSignal& PageFactory::PageRefreshSignal()
75 return mPageRefreshSignal;
78 void PageFactory::EmitPageRefreshSignal( int pageId )
80 mPageRefreshSignal.Emit( pageId );
83 } // namespace Toolkit