/*
- * 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)
+: 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::operator=(RadioButton&& rhs) = default;
RadioButton::RadioButton(Dali::Internal::CustomActor* internal)
- : Button(internal)
+: Button(internal)
{
- VerifyCustomActorPointer<Internal::RadioButton>( internal );
+ VerifyCustomActorPointer<Internal::RadioButton>(internal);
}
RadioButton::~RadioButton()
RadioButton RadioButton::New(const std::string& label)
{
RadioButton radioButton = Internal::RadioButton::New();
- radioButton.SetLabel(label);
- return radioButton;
-}
-
-RadioButton RadioButton::New(Actor label)
-{
- RadioButton radioButton = Internal::RadioButton::New();
- radioButton.SetLabel(label);
+ radioButton.SetProperty(Toolkit::Button::Property::LABEL, label);
return radioButton;
}
RadioButton RadioButton::DownCast(BaseHandle handle)
{
- return Control::DownCast<RadioButton, Internal::RadioButton>( handle );
-}
-
-void RadioButton::SetLabel(const std::string& label)
-{
- Dali::Toolkit::GetImplementation(*this).SetLabel(label);
-}
-
-void RadioButton::SetLabel(Actor label)
-{
- Dali::Toolkit::GetImplementation(*this).SetLabel(label);
-}
-
-Actor RadioButton::GetLabel() const
-{
- return Dali::Toolkit::GetImplementation(*this).GetLabel();
-}
-
-void RadioButton::SetSelected(bool selected)
-{
- Dali::Toolkit::GetImplementation(*this).SetSelected(selected);
-}
-
-bool RadioButton::IsSelected()const
-{
- return Dali::Toolkit::GetImplementation(*this).IsSelected();
-}
-
-void RadioButton::ToggleState()
-{
- Dali::Toolkit::GetImplementation(*this).ToggleState();
+ return Control::DownCast<RadioButton, Internal::RadioButton>(handle);
}
} // namespace Toolkit