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.
19 #include <dali/public-api/actors/custom-actor-impl.h>
22 #include <dali/public-api/common/dali-common.h>
23 #include <dali/internal/event/actors/custom-actor-internal.h>
28 CustomActorImpl::~CustomActorImpl()
32 CustomActor CustomActorImpl::Self() const
34 return CustomActor(mOwner);
37 void CustomActorImpl::OnPropertySet( Property::Index index, Property::Value propertyValue )
41 CustomActorImpl::CustomActorImpl(bool requiresTouchEvents)
43 mRequiresTouchEvents(requiresTouchEvents),
44 mRequiresHoverEvents(false),
45 mRequiresMouseWheelEvents(false)
49 void CustomActorImpl::Initialize(Internal::CustomActor& owner)
51 DALI_ASSERT_DEBUG(mOwner == NULL); // should not already be owned
56 Internal::CustomActor* CustomActorImpl::GetOwner() const
61 bool CustomActorImpl::RequiresTouchEvents() const
63 return mRequiresTouchEvents;
66 bool CustomActorImpl::RequiresHoverEvents() const
68 return mRequiresHoverEvents;
71 void CustomActorImpl::SetRequiresHoverEvents(bool requiresHoverEvents)
73 mRequiresHoverEvents = requiresHoverEvents;
76 bool CustomActorImpl::RequiresMouseWheelEvents() const
78 return mRequiresMouseWheelEvents;
81 void CustomActorImpl::SetRequiresMouseWheelEvents(bool requiresMouseWheelEvents)
83 mRequiresMouseWheelEvents = requiresMouseWheelEvents;
86 void CustomActorImpl::RelayoutRequest()
88 mOwner->RelayoutRequest();
91 float CustomActorImpl::CalculateChildSizeBase( const Dali::Actor& child, Dimension::Type dimension )
93 return mOwner->CalculateChildSizeBase( child, dimension );
96 bool CustomActorImpl::RelayoutDependentOnChildrenBase( Dimension::Type dimension )
98 return mOwner->RelayoutDependentOnChildrenBase( dimension );