2 * Copyright (c) 2015 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.
19 #include <dali-toolkit/devel-api/controls/page-turn-view/page-factory.h>
27 const std::string PageFactory::ACTOR_HITTABLE( "actor-hittable" );
29 PageFactory::PageFactory( )
30 : mNeedOffscreenRendering( false )
34 PageFactory::~PageFactory()
38 void PageFactory::EnableOffscreenRendering( )
40 mNeedOffscreenRendering = true;
43 bool PageFactory::IsOffscreenRenderingNeeded()
45 return mNeedOffscreenRendering;
48 void PageFactory::SetActorHittability( Actor actor, bool hittable )
50 // Create actor focusable property if not already created.
51 Property::Index propertyActorHittable = actor.GetPropertyIndex(ACTOR_HITTABLE);
52 if(propertyActorHittable == Property::INVALID_INDEX && hittable)
54 actor.RegisterProperty(ACTOR_HITTABLE, true);
58 actor.SetProperty( propertyActorHittable, hittable );
62 bool PageFactory::GetActorHittability( Actor actor )
64 bool hittable = false;
66 Property::Index propertyActorHittable = actor.GetPropertyIndex(ACTOR_HITTABLE);
67 if(propertyActorHittable != Property::INVALID_INDEX)
69 hittable = actor.GetProperty<bool>( propertyActorHittable );
75 PageFactory::RefreshSignal& PageFactory::PageRefreshSignal()
77 return mPageRefreshSignal;
80 void PageFactory::EmitPageRefreshSignal( int pageId )
82 mPageRefreshSignal.Emit( pageId );
85 } // namespace Toolkit