X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Ftext-controls%2Ftext-label.cpp;h=b80e48b47d352f7c3c23dd02180b93ce2cce6131;hb=HEAD;hp=39450c7cc04e66c5e9324639b4b20aad7d72e5fe;hpb=d886d0a7b8637b2ad52844096091b63991157ff3;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 39450c7..b80e48b 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) 2020 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,19 +23,30 @@ 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::New(ControlBehaviour additionalBehaviour) +{ + return Internal::TextLabel::New(static_cast(additionalBehaviour)); +} + +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; } @@ -44,32 +55,32 @@ TextLabel::TextLabel() { } -TextLabel::TextLabel( const TextLabel& handle ) = default; +TextLabel::TextLabel(const TextLabel& handle) = default; -TextLabel::TextLabel( TextLabel&& rhs ) = default; +TextLabel::TextLabel(TextLabel&& rhs) noexcept = default; -TextLabel& TextLabel::operator=( const TextLabel& handle ) = default; +TextLabel& TextLabel::operator=(const TextLabel& handle) = default; -TextLabel& TextLabel::operator=( TextLabel&& rhs ) = default; +TextLabel& TextLabel::operator=(TextLabel&& rhs) noexcept = 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