/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control-impl.h>
#include <dali-toolkit/internal/controls/control/control-data-impl.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
namespace Dali
{
-
namespace Toolkit
{
-
Control Control::New()
{
- return Internal::Control::New();
+ return Toolkit::Internal::Control::New();
+}
+
+Control Control::New(ControlBehaviour additionalBehaviour)
+{
+ return Toolkit::Internal::Control::New(static_cast<Toolkit::Internal::Control::ControlBehaviour>(additionalBehaviour));
}
Control::Control()
{
}
-Control::Control( const Control& uiControl ) = default;
+Control::Control(const Control& uiControl) = default;
-Control::Control( Control&& rhs ) = default;
+Control::Control(Control&& rhs) = default;
Control::~Control()
{
}
-Control& Control::operator=( const Control& handle ) = default;
+Control& Control::operator=(const Control& handle) = default;
-Control& Control::operator=( Control&& rhs ) = default;
+Control& Control::operator=(Control&& rhs) = default;
-Control Control::DownCast( BaseHandle handle )
+Control Control::DownCast(BaseHandle handle)
{
- return DownCast< Control, Internal::Control >(handle);
+ return DownCast<Control, Internal::Control>(handle);
}
void Control::SetKeyInputFocus()
return Internal::GetImplementation(*this).GetLongPressGestureDetector();
}
-void Control::SetStyleName( const std::string& styleName )
+void Control::SetStyleName(const std::string& styleName)
{
- Internal::GetImplementation(*this).SetStyleName( styleName );
+ Internal::GetImplementation(*this).SetStyleName(styleName);
}
const std::string& Control::GetStyleName() const
return Internal::GetImplementation(*this).GetStyleName();
}
-void Control::SetBackgroundColor( const Vector4& color )
+void Control::SetBackgroundColor(const Vector4& color)
{
- Internal::GetImplementation(*this).SetBackgroundColor( color );
+ Internal::GetImplementation(*this).SetBackgroundColor(color);
}
void Control::ClearBackground()
bool Control::IsResourceReady() const
{
- const Internal::Control& internalControl = Toolkit::Internal::GetImplementation( *this );
- const Internal::Control::Impl& controlDataImpl = Internal::Control::Impl::Get( internalControl );
-
- return controlDataImpl.IsResourceReady();
+ return Internal::GetImplementation(*this).IsResourceReady();
}
-Toolkit::Visual::ResourceStatus Control::GetVisualResourceStatus( Dali::Property::Index index )
+Toolkit::Visual::ResourceStatus Control::GetVisualResourceStatus(Dali::Property::Index index)
{
- const Internal::Control& internalControl = Toolkit::Internal::GetImplementation( *this );
- const Internal::Control::Impl& controlDataImpl = Internal::Control::Impl::Get( internalControl );
- return controlDataImpl.GetVisualResourceStatus( index );
+ const Internal::Control& internalControl = Toolkit::Internal::GetImplementation(*this);
+ const Internal::Control::Impl& controlDataImpl = Internal::Control::Impl::Get(internalControl);
+ return controlDataImpl.GetVisualResourceStatus(index);
}
Control::KeyEventSignalType& Control::KeyEventSignal()
return Internal::GetImplementation(*this).KeyInputFocusLostSignal();
}
-Control::ResourceReadySignalType& Control::ResourceReadySignal()
+Control::ResourceReadySignalType& Control::ResourceReadySignal()
{
- Internal::Control& internalControl = Toolkit::Internal::GetImplementation( *this );
- Internal::Control::Impl& controlImpl = Internal::Control::Impl::Get( internalControl );
+ Internal::Control& internalControl = Toolkit::Internal::GetImplementation(*this);
+ Internal::Control::Impl& controlImpl = Internal::Control::Impl::Get(internalControl);
return controlImpl.mResourceReadySignal;
}