-//
-// 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 <dali-toolkit/public-api/controls/control.h>
+
+// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
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()
}
Control::Control(const Control& uiControl)
-: CustomActor( uiControl ? static_cast<const ControlImpl&>( uiControl.GetImplementation() ).GetOwner() : NULL)
+: CustomActor( uiControl ? static_cast< const Internal::Control& >( uiControl.GetImplementation() ).GetOwner() : NULL)
{
}
Control Control::DownCast( BaseHandle handle )
{
- return DownCast<Control, ControlImpl>(handle);
+ return DownCast< Control, Internal::Control >(handle);
}
-ControlImpl& Control::GetImplementation()
+Internal::Control& Control::GetImplementation()
{
- return static_cast<ControlImpl&>(CustomActor::GetImplementation());
+ return static_cast<Internal::Control&>(CustomActor::GetImplementation());
}
-const ControlImpl& Control::GetImplementation() const
+const Internal::Control& Control::GetImplementation() const
{
- return static_cast<const ControlImpl&>(CustomActor::GetImplementation());
+ return static_cast<const Internal::Control&>(CustomActor::GetImplementation());
}
void Control::SetSizePolicy( SizePolicy widthPolicy, SizePolicy heightPolicy )
GetImplementation().ClearKeyInputFocus();
}
-Control::KeyEventSignalV2& Control::KeyEventSignal()
+PinchGestureDetector Control::GetPinchGestureDetector() const
{
- return GetImplementation().KeyEventSignal();
+ return GetImplementation().GetPinchGestureDetector();
}
-/**
- * @copydoc ConnectionTrackerInterface::SignalConnected
- */
-void Control::SignalConnected( SlotObserver* slotObserver, CallbackBase* callback )
+PanGestureDetector Control::GetPanGestureDetector() const
{
- GetImplementation().SignalConnected(slotObserver, callback );
+ return GetImplementation().GetPanGestureDetector();
}
-/**
- * @copydoc ConnectionTrackerInterface::SignalDisconnected
- */
-void Control::SignalDisconnected( SlotObserver* slotObserver, CallbackBase* callback )
+TapGestureDetector Control::GetTapGestureDetector() const
{
- GetImplementation().SignalDisconnected(slotObserver, callback );
+ return GetImplementation().GetTapGestureDetector();
}
-/**
- * @copydoc ConnectionTrackerInterface::GetConnectionCount
- */
-std::size_t Control::GetConnectionCount() const
+LongPressGestureDetector Control::GetLongPressGestureDetector() const
+{
+ return GetImplementation().GetLongPressGestureDetector();
+}
+
+void Control::SetBackgroundColor( const Vector4& color )
+{
+ GetImplementation().SetBackgroundColor( color );
+}
+
+Vector4 Control::GetBackgroundColor() const
{
- return GetImplementation().GetConnectionCount( );
+ return GetImplementation().GetBackgroundColor();
}
+void Control::SetBackground( Image image )
+{
+ GetImplementation().SetBackground( image );
+}
+
+void Control::ClearBackground()
+{
+ 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)
{
}
Control::Control(Dali::Internal::CustomActor* internal)
: CustomActor(internal)
{
- VerifyCustomActorPointer<ControlImpl>(internal);
+ VerifyCustomActorPointer<Internal::Control>(internal);
}
} // namespace Toolkit