Formatting API
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / buttons / radio-button.cpp
index c698225..6030031 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 RadioButton::RadioButton()
-  : Button()
+: Button()
 {
 }
 
-RadioButton::RadioButton( Internal::RadioButton& implementation )
-  : Button( implementation )
+RadioButton::RadioButton(Internal::RadioButton& implementation)
+: Button(implementation)
 {
 }
 
-RadioButton::RadioButton( const RadioButton& radioButton )
-  : Button( radioButton )
-{
-}
+RadioButton::RadioButton(const RadioButton& radioButton) = default;
 
-RadioButton& RadioButton::operator=( const RadioButton& radioButton )
-{
-  if( &radioButton != this )
-  {
-    Button::operator=( radioButton );
-  }
-  return *this;
-}
+RadioButton::RadioButton(RadioButton&& rhs) = default;
+
+RadioButton& RadioButton::operator=(const RadioButton& radioButton) = default;
 
-RadioButton::RadioButton( Dali::Internal::CustomActor* internal )
-  : Button( internal )
+RadioButton& RadioButton::operator=(RadioButton&& rhs) = default;
+
+RadioButton::RadioButton(Dali::Internal::CustomActor* internal)
+: Button(internal)
 {
-  VerifyCustomActorPointer<Internal::RadioButton>( internal );
+  VerifyCustomActorPointer<Internal::RadioButton>(internal);
 }
 
 RadioButton::~RadioButton()
@@ -68,23 +60,16 @@ RadioButton RadioButton::New()
   return Internal::RadioButton::New();
 }
 
-RadioButton RadioButton::New( const std::string& label )
-{
-  RadioButton radioButton = Internal::RadioButton::New();
-  radioButton.SetLabel( label );
-  return radioButton;
-}
-
-RadioButton RadioButton::New( Actor label )
+RadioButton RadioButton::New(const std::string& label)
 {
   RadioButton radioButton = Internal::RadioButton::New();
-  radioButton.SetLabel( label );
+  radioButton.SetProperty(Toolkit::Button::Property::LABEL, label);
   return radioButton;
 }
 
-RadioButton RadioButton::DownCast( BaseHandle handle )
+RadioButton RadioButton::DownCast(BaseHandle handle)
 {
-  return Control::DownCast<RadioButton, Internal::RadioButton>( handle );
+  return Control::DownCast<RadioButton, Internal::RadioButton>(handle);
 }
 
 } // namespace Toolkit