X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Ftext-controls%2Ftext-label.cpp;h=6591d8d7995393f2e1a22d1b6700bda384ef64be;hb=b3f769e350cf3c159ab22bd947f1e98d47cb4038;hp=7a61615bbdeb6008c3b00b77ee7ad62b8b73bde3;hpb=56d412791a44c2a79135d2293c13fddb135c9d54;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/public-api/controls/text-controls/text-label.cpp b/dali-toolkit/public-api/controls/text-controls/text-label.cpp index 7a61615..6591d8d 100644 --- a/dali-toolkit/public-api/controls/text-controls/text-label.cpp +++ b/dali-toolkit/public-api/controls/text-controls/text-label.cpp @@ -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. @@ -23,59 +23,64 @@ namespace Dali { - namespace Toolkit { - TextLabel TextLabel::New() { return Internal::TextLabel::New(); } -TextLabel TextLabel::New( const std::string& text ) +TextLabel TextLabel::New(const std::string& text) { TextLabel label = Internal::TextLabel::New(); - label.SetProperty( TextLabel::Property::TEXT, text ); + label.SetProperty(TextLabel::Property::TEXT, text); return label; } -TextLabel::TextLabel() +TextLabel TextLabel::New(ControlBehaviour additionalBehaviour) { + return Internal::TextLabel::New(static_cast(additionalBehaviour)); } -TextLabel::TextLabel( const TextLabel& handle ) -: Control( handle ) +TextLabel TextLabel::New(ControlBehaviour additionalBehaviour, const std::string& text) { + TextLabel label = Internal::TextLabel::New(static_cast(additionalBehaviour)); + label.SetProperty(TextLabel::Property::TEXT, text); + + return label; } -TextLabel& TextLabel::operator=( const TextLabel& handle ) +TextLabel::TextLabel() { - if( &handle != this ) - { - Control::operator=( handle ); - } - return *this; } +TextLabel::TextLabel(const TextLabel& handle) = default; + +TextLabel::TextLabel(TextLabel&& rhs) = default; + +TextLabel& TextLabel::operator=(const TextLabel& handle) = default; + +TextLabel& TextLabel::operator=(TextLabel&& rhs) = default; + TextLabel::~TextLabel() { } -TextLabel TextLabel::DownCast( BaseHandle handle ) +TextLabel TextLabel::DownCast(BaseHandle handle) { return Control::DownCast(handle); } -TextLabel::TextLabel( Internal::TextLabel& implementation ) +TextLabel::TextLabel(Internal::TextLabel& implementation) : Control(implementation) { } -TextLabel::TextLabel( Dali::Internal::CustomActor* internal ) -: Control( internal ) +TextLabel::TextLabel(Dali::Internal::CustomActor* internal) +: Control(internal) { - VerifyCustomActorPointer( internal ); + VerifyCustomActorPointer(internal); } } // namespace Toolkit