X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fcontrol.cpp;h=b987adec30bce29a302c23a1ddcc3ad7d5c13900;hp=bf3d9cc1825d7d5ee2d5fe155e8d2fa1189ca08e;hb=e217915091790637a8b4ea7e34480e852d242efd;hpb=818994dc0acac601b0b27c0b715259b504ef4ceb diff --git a/dali-toolkit/public-api/controls/control.cpp b/dali-toolkit/public-api/controls/control.cpp index bf3d9cc..b987ade 100644 --- a/dali-toolkit/public-api/controls/control.cpp +++ b/dali-toolkit/public-api/controls/control.cpp @@ -1,20 +1,24 @@ -// -// 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 #include + +// INTERNAL INCLUDES #include namespace Dali @@ -23,12 +27,9 @@ namespace Dali namespace Toolkit { -const char* const Control::ACTION_CONTROL_ACTIVATED = "control-activated"; -const char* const Control::SIGNAL_KEY_EVENT = "key-event"; - Control Control::New() { - return ControlImpl::New(); + return Internal::Control::New(); } Control::Control() @@ -36,7 +37,7 @@ Control::Control() } Control::Control(const Control& uiControl) -: CustomActor( uiControl ? static_cast( uiControl.GetImplementation() ).GetOwner() : NULL) +: CustomActor( uiControl ? static_cast< const Internal::Control& >( uiControl.GetImplementation() ).GetOwner() : NULL) { } @@ -55,17 +56,17 @@ Control& Control::operator=( const Control& handle ) Control Control::DownCast( BaseHandle handle ) { - return DownCast(handle); + return DownCast< Control, Internal::Control >(handle); } -ControlImpl& Control::GetImplementation() +Internal::Control& Control::GetImplementation() { - return static_cast(CustomActor::GetImplementation()); + return static_cast(CustomActor::GetImplementation()); } -const ControlImpl& Control::GetImplementation() const +const Internal::Control& Control::GetImplementation() const { - return static_cast(CustomActor::GetImplementation()); + return static_cast(CustomActor::GetImplementation()); } void Control::SetSizePolicy( SizePolicy widthPolicy, SizePolicy heightPolicy ) @@ -148,37 +149,37 @@ LongPressGestureDetector Control::GetLongPressGestureDetector() const return GetImplementation().GetLongPressGestureDetector(); } -Control::KeyEventSignalV2& Control::KeyEventSignal() +void Control::SetBackgroundColor( const Vector4& color ) { - return GetImplementation().KeyEventSignal(); + GetImplementation().SetBackgroundColor( color ); } -/** - * @copydoc ConnectionTrackerInterface::SignalConnected - */ -void Control::SignalConnected( SlotObserver* slotObserver, CallbackBase* callback ) +Vector4 Control::GetBackgroundColor() const { - GetImplementation().SignalConnected(slotObserver, callback ); + return GetImplementation().GetBackgroundColor(); } -/** - * @copydoc ConnectionTrackerInterface::SignalDisconnected - */ -void Control::SignalDisconnected( SlotObserver* slotObserver, CallbackBase* callback ) +void Control::SetBackground( Image image ) { - GetImplementation().SignalDisconnected(slotObserver, callback ); + GetImplementation().SetBackground( image ); } -/** - * @copydoc ConnectionTrackerInterface::GetConnectionCount - */ -std::size_t Control::GetConnectionCount() const +void Control::ClearBackground() { - return GetImplementation().GetConnectionCount( ); + GetImplementation().ClearBackground(); } +Actor Control::GetBackgroundActor() const +{ + return GetImplementation().GetBackgroundActor(); +} + +Control::KeyEventSignalType& Control::KeyEventSignal() +{ + return GetImplementation().KeyEventSignal(); +} -Control::Control(ControlImpl& implementation) +Control::Control(Internal::Control& implementation) : CustomActor(implementation) { } @@ -186,7 +187,7 @@ Control::Control(ControlImpl& implementation) Control::Control(Dali::Internal::CustomActor* internal) : CustomActor(internal) { - VerifyCustomActorPointer(internal); + VerifyCustomActorPointer(internal); } } // namespace Toolkit