projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "If the currently focused actor is hidden, it should lose focus. and If VISIBL...
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
public-api
/
controls
/
control.cpp
diff --git
a/dali-toolkit/public-api/controls/control.cpp
b/dali-toolkit/public-api/controls/control.cpp
index
b987ade
..
245bdd5
100644
(file)
--- a/
dali-toolkit/public-api/controls/control.cpp
+++ b/
dali-toolkit/public-api/controls/control.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 20
14
Samsung Electronics Co., Ltd.
+ * Copyright (c) 20
22
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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-18,165
+18,139
@@
// CLASS HEADER
#include <dali-toolkit/public-api/controls/control.h>
// CLASS HEADER
#include <dali-toolkit/public-api/controls/control.h>
+// EXTERNAL INCLUDES
+#include <dali/integration-api/debug.h>
+
// INTERNAL INCLUDES
// INTERNAL INCLUDES
+#include <dali-toolkit/internal/controls/control/control-data-impl.h>
#include <dali-toolkit/public-api/controls/control-impl.h>
namespace Dali
{
#include <dali-toolkit/public-api/controls/control-impl.h>
namespace Dali
{
-
namespace Toolkit
{
namespace Toolkit
{
-
Control Control::New()
{
Control Control::New()
{
- return Internal::Control::New();
+ return
Toolkit::
Internal::Control::New();
}
}
-Control::Control()
-{
-}
-
-Control::Control(const Control& uiControl)
-: CustomActor( uiControl ? static_cast< const Internal::Control& >( uiControl.GetImplementation() ).GetOwner() : NULL)
-{
-}
-
-Control::~Control()
+Control Control::New(ControlBehaviour additionalBehaviour)
{
{
+ return Toolkit::Internal::Control::New(static_cast<Toolkit::Internal::Control::ControlBehaviour>(additionalBehaviour));
}
}
-Control
& Control::operator=( const Control& handle
)
+Control
::Control(
)
{
{
- if( &handle != this )
- {
- CustomActor::operator=( handle );
- }
- return *this;
}
}
-Control Control::DownCast( BaseHandle handle )
-{
- return DownCast< Control, Internal::Control >(handle);
-}
+Control::Control(const Control& uiControl) = default;
-Internal::Control& Control::GetImplementation()
-{
- return static_cast<Internal::Control&>(CustomActor::GetImplementation());
-}
+Control::Control(Control&& rhs) = default;
-const Internal::Control& Control::GetImplementation() const
+Control::~Control()
{
{
- return static_cast<const Internal::Control&>(CustomActor::GetImplementation());
}
}
-void Control::SetSizePolicy( SizePolicy widthPolicy, SizePolicy heightPolicy )
-{
- GetImplementation().SetSizePolicy( widthPolicy, heightPolicy );
-}
+Control& Control::operator=(const Control& handle) = default;
-void Control::GetSizePolicy( SizePolicy& widthPolicy, SizePolicy& heightPolicy ) const
-{
- GetImplementation().GetSizePolicy( widthPolicy, heightPolicy );
-}
+Control& Control::operator=(Control&& rhs) = default;
-
void Control::SetMinimumSize( const Vector3& size
)
+
Control Control::DownCast(BaseHandle handle
)
{
{
-
GetImplementation().SetMinimumSize( size
);
+
return DownCast<Control, Internal::Control>(handle
);
}
}
-const Vector3& Control::GetMinimumSize() const
+void Control::SetKeyInputFocus()
{
{
-
return GetImplementation().GetMinimumSize
();
+
Internal::GetImplementation(*this).SetKeyInputFocus
();
}
}
-
void Control::SetMaximumSize( const Vector3& size
)
+
bool Control::HasKeyInputFocus(
)
{
{
-
GetImplementation().SetMaximumSize( size
);
+
return Internal::GetImplementation(*this).HasKeyInputFocus(
);
}
}
-const Vector3& Control::GetMaximumSize() const
+void Control::ClearKeyInputFocus()
{
{
-
return GetImplementation().GetMaximumSize
();
+
Internal::GetImplementation(*this).ClearKeyInputFocus
();
}
}
-Vector3 Control::GetNaturalSize()
+PinchGestureDetector Control::GetPinchGestureDetector() const
{
{
- return
GetImplementation().GetNaturalSize
();
+ return
Internal::GetImplementation(*this).GetPinchGestureDetector
();
}
}
-float Control::GetHeightForWidth( float width )
+PanGestureDetector Control::GetPanGestureDetector() const
{
{
- return
GetImplementation().GetHeightForWidth( width
);
+ return
Internal::GetImplementation(*this).GetPanGestureDetector(
);
}
}
-float Control::GetWidthForHeight( float height )
+TapGestureDetector Control::GetTapGestureDetector() const
{
{
- return
GetImplementation().GetWidthForHeight( height
);
+ return
Internal::GetImplementation(*this).GetTapGestureDetector(
);
}
}
-void Control::SetKeyInputFocus()
+LongPressGestureDetector Control::GetLongPressGestureDetector() const
{
{
-
GetImplementation().SetKeyInputFocus
();
+
return Internal::GetImplementation(*this).GetLongPressGestureDetector
();
}
}
-
bool Control::HasKeyInputFocus(
)
+
void Control::SetStyleName(const std::string& styleName
)
{
{
-
return GetImplementation().HasKeyInputFocus(
);
+
Internal::GetImplementation(*this).SetStyleName(styleName
);
}
}
-void Control::ClearKeyInputFocus()
+const std::string& Control::GetStyleName() const
{
{
-
GetImplementation().ClearKeyInputFocus
();
+
return Internal::GetImplementation(*this).GetStyleName
();
}
}
-PinchGestureDetector Control::GetPinchGestureDetector() const
+void Control::SetBackgroundColor(const Vector4& color)
{
{
-
return GetImplementation().GetPinchGestureDetector(
);
+
Internal::GetImplementation(*this).SetBackgroundColor(color
);
}
}
-PanGestureDetector Control::GetPanGestureDetector() const
+void Control::ClearBackground()
{
{
-
return GetImplementation().GetPanGestureDetector
();
+
Internal::GetImplementation(*this).ClearBackground
();
}
}
-
TapGestureDetector Control::GetTapGestureDetector
() const
+
bool Control::IsResourceReady
() const
{
{
-
return GetImplementation().GetTapGestureDetector(
);
-}
+
const Internal::Control& internalControl = Toolkit::Internal::GetImplementation(*this
);
+ const Internal::Control::Impl& controlDataImpl = Internal::Control::Impl::Get(internalControl);
-LongPressGestureDetector Control::GetLongPressGestureDetector() const
-{
- return GetImplementation().GetLongPressGestureDetector();
+ return controlDataImpl.IsResourceReady();
}
}
-
void Control::SetBackgroundColor( const Vector4& color
)
+
Toolkit::Visual::ResourceStatus Control::GetVisualResourceStatus(Dali::Property::Index index
)
{
{
- GetImplementation().SetBackgroundColor( color );
+ const Internal::Control& internalControl = Toolkit::Internal::GetImplementation(*this);
+ const Internal::Control::Impl& controlDataImpl = Internal::Control::Impl::Get(internalControl);
+ return controlDataImpl.GetVisualResourceStatus(index);
}
}
-Vector4 Control::GetBackgroundColor() const
+Control::KeyEventSignalType& Control::KeyEventSignal()
{
{
- return
GetImplementation().GetBackgroundColor
();
+ return
Internal::GetImplementation(*this).KeyEventSignal
();
}
}
-
void Control::SetBackground( Image image
)
+
Control::KeyInputFocusSignalType& Control::KeyInputFocusGainedSignal(
)
{
{
-
GetImplementation().SetBackground( image
);
+
return Internal::GetImplementation(*this).KeyInputFocusGainedSignal(
);
}
}
-
void Control::ClearBackground
()
+
Control::KeyInputFocusSignalType& Control::KeyInputFocusLostSignal
()
{
{
-
GetImplementation().ClearBackground
();
+
return Internal::GetImplementation(*this).KeyInputFocusLostSignal
();
}
}
-Actor Control::GetBackgroundActor() const
+Control::ResourceReadySignalType& Control::ResourceReadySignal()
{
{
-
return GetImplementation().GetBackgroundActor(
);
-}
+
Internal::Control& internalControl = Toolkit::Internal::GetImplementation(*this
);
+ Internal::Control::Impl& controlImpl = Internal::Control::Impl::Get(internalControl);
-Control::KeyEventSignalType& Control::KeyEventSignal()
-{
- return GetImplementation().KeyEventSignal();
+ return controlImpl.mResourceReadySignal;
}
Control::Control(Internal::Control& implementation)
}
Control::Control(Internal::Control& implementation)