1 #ifndef DALI_TOOLKIT_INTERNAL_TEXT_BOLDSPAN_IMPL_H
2 #define DALI_TOOLKIT_INTERNAL_TEXT_BOLDSPAN_IMPL_H
5 * Copyright (c) 2022 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali-toolkit/devel-api/text/spans/bold-span.h>
25 #include <dali-toolkit/internal/text/spannable/spans/base-span-impl.h>
26 #include <dali-toolkit/internal/text/logical-model-impl.h>
37 using BoldSpanPtr = IntrusivePtr<BoldSpan>;
40 * @copydoc Dali::Toolkit::Text::BoldSpan
42 class BoldSpan : public BaseSpan
46 * @brief Creates a new BoldSpan object.
48 * @return Dali::Toolkit::Text::BoldSpan
50 static Dali::Toolkit::Text::BoldSpan New();
53 * @brief Construct a new Bold Span object
58 ///< Deleted copy constructor
59 BoldSpan(const BoldSpan& rhs) = delete;
61 ///< Deleted move constructor
62 BoldSpan(BoldSpan&& rhs) = delete;
64 ///< Deleted copy assignment operator
65 BoldSpan& operator=(const BoldSpan& rhs) = delete;
67 ///< Deleted move assignment operator
68 BoldSpan& operator=(BoldSpan&& rhs) = delete;
72 * A reference counted object may only be deleted by calling Unreference().
77 * @copydoc Dali::Toolkit::Text::BaseSpan::CreateStyleCharacterRun
79 void CreateStyleCharacterRun(IntrusivePtr<LogicalModel>& logicalModel, const Dali::Toolkit::Text::Range& range) const override;
83 } // namespace Internal
85 // Helpers for public-api forwarding methods
87 inline Internal::BoldSpan& GetImplementation(Dali::Toolkit::Text::BoldSpan& boldSpan)
89 DALI_ASSERT_ALWAYS(boldSpan && "boldSpan handle is empty");
91 BaseObject& object = boldSpan.GetBaseObject();
93 return static_cast<Internal::BoldSpan&>(object);
96 inline const Internal::BoldSpan& GetImplementation(const Dali::Toolkit::Text::BoldSpan& boldSpan)
98 DALI_ASSERT_ALWAYS(boldSpan && "boldSpan handle is empty");
100 const BaseObject& object = boldSpan.GetBaseObject();
102 return static_cast<const Internal::BoldSpan&>(object);
107 } // namespace Toolkit
111 #endif //DALI_TOOLKIT_INTERNAL_TEXT_BOLDSPAN_IMPL_H