[dali_2.3.24] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / popup / popup.cpp
index 9b74a3d..5cb4670 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 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.
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/controls/popup/popup-impl.h>
-#include <dali-toolkit/public-api/controls/buttons/button.h>
 
 using namespace Dali;
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // Popup
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -38,27 +35,21 @@ Popup::Popup()
 {
 }
 
-Popup::Popup( const Popup& handle )
-: Control( handle )
-{
-}
+Popup::Popup(const Popup& handle) = default;
 
-Popup& Popup::operator=( const Popup& handle )
-{
-  if( &handle != this )
-  {
-    Control::operator=( handle );
-  }
-  return *this;
-}
+Popup& Popup::operator=(const Popup& handle) = default;
+
+Popup::Popup(Popup&& handle) = default;
+
+Popup& Popup::operator=(Popup&& handle) = default;
 
 Popup::Popup(Internal::Popup& implementation)
 : Control(implementation)
 {
 }
 
-Popup::Popup( Dali::Internal::CustomActor* internal )
-: Control( internal )
+Popup::Popup(Dali::Internal::CustomActor* internal)
+: Control(internal)
 {
   VerifyCustomActorPointer<Internal::Popup>(internal);
 }
@@ -72,72 +63,76 @@ Popup::~Popup()
 {
 }
 
-Popup Popup::DownCast( BaseHandle handle )
+Popup Popup::DownCast(BaseHandle handle)
 {
   return Control::DownCast<Popup, Internal::Popup>(handle);
 }
 
-void Popup::SetBackgroundImage( Actor image )
+// Properties:
+
+void Popup::SetTitle(Actor titleActor)
 {
-  GetImpl(*this).SetBackgroundImage( image );
+  GetImpl(*this).SetTitle(titleActor);
 }
 
-void Popup::SetTitle( const std::string& text )
+Actor Popup::GetTitle() const
 {
-  GetImpl(*this).SetTitle( text );
+  return GetImpl(*this).GetTitle();
 }
 
-std::string Popup::GetTitle() const
+void Popup::SetContent(Actor content)
 {
-  return GetImpl(*this).GetTitle();
+  GetImpl(*this).SetContent(content);
 }
 
-void Popup::AddButton( Button button )
+Actor Popup::GetContent() const
 {
-  GetImpl(*this).AddButton( button );
+  return GetImpl(*this).GetContent();
 }
 
-void Popup::SetState( PopupState state )
+void Popup::SetFooter(Actor footer)
 {
-  GetImpl(*this).SetState( state );
+  GetImpl(*this).SetFooter(footer);
 }
 
-void Popup::SetState( PopupState state, float duration )
+Actor Popup::GetFooter() const
 {
-  GetImpl(*this).SetState( state, duration );
+  return GetImpl(*this).GetFooter();
 }
 
-Popup::PopupState Popup::GetState() const
+void Popup::SetDisplayState(Toolkit::Popup::DisplayState displayState)
 {
-  return GetImpl(*this).GetState();
+  GetImpl(*this).SetDisplayState(displayState);
 }
 
-void Popup::Show()
+Toolkit::Popup::DisplayState Popup::GetDisplayState() const
 {
-  GetImpl(*this).SetState( POPUP_SHOW );
+  return GetImpl(*this).GetDisplayState();
 }
 
-void Popup::Hide()
+// Signals:
+
+Popup::TouchedOutsideSignalType& Popup::OutsideTouchedSignal()
 {
-  GetImpl(*this).SetState( POPUP_HIDE );
+  return GetImpl(*this).OutsideTouchedSignal();
 }
 
-void Popup::ShowTail(const Vector3& position)
+Popup::DisplayStateChangeSignalType& Popup::ShowingSignal()
 {
-  GetImpl(*this).ShowTail( position );
+  return GetImpl(*this).ShowingSignal();
 }
 
-void Popup::HideTail()
+Popup::DisplayStateChangeSignalType& Popup::ShownSignal()
 {
-  GetImpl(*this).HideTail();
+  return GetImpl(*this).ShownSignal();
 }
 
-Popup::TouchedOutsideSignalType& Popup::OutsideTouchedSignal()
+Popup::DisplayStateChangeSignalType& Popup::HidingSignal()
 {
-  return GetImpl(*this).OutsideTouchedSignal();
+  return GetImpl(*this).HidingSignal();
 }
 
-Popup::HiddenSignalType& Popup::HiddenSignal()
+Popup::DisplayStateChangeSignalType& Popup::HiddenSignal()
 {
   return GetImpl(*this).HiddenSignal();
 }