2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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.
18 #include <dali-toolkit/public-api/controls/page-turn-view/page-factory.h>
26 const std::string PageFactory::ACTOR_HITTABLE( "actor-hittable" );
28 PageFactory::PageFactory( )
29 : mNeedOffscreenRendering( false )
33 PageFactory::~PageFactory()
37 void PageFactory::EnableOffscreenRendering( )
39 mNeedOffscreenRendering = true;
42 bool PageFactory::IsOffscreenRenderingNeeded()
44 return mNeedOffscreenRendering;
47 void PageFactory::SetActorHittability( Actor actor, bool hittable )
49 // Create actor focusable property if not already created.
50 Property::Index propertyActorHittable = actor.GetPropertyIndex(ACTOR_HITTABLE);
51 if(propertyActorHittable == Property::INVALID_INDEX && hittable)
53 actor.RegisterProperty(ACTOR_HITTABLE, true);
57 actor.SetProperty( propertyActorHittable, hittable );
61 bool PageFactory::GetActorHittability( Actor actor )
63 bool hittable = false;
65 Property::Index propertyActorHittable = actor.GetPropertyIndex(ACTOR_HITTABLE);
66 if(propertyActorHittable != Property::INVALID_INDEX)
68 hittable = actor.GetProperty<bool>( propertyActorHittable );
74 PageFactory::RefreshSignal& PageFactory::PageRefreshSignal()
76 return mPageRefreshSignal;
79 void PageFactory::EmitPageRefreshSignal( int pageId )
81 mPageRefreshSignal.Emit( pageId );
84 } // namespace Toolkit