1 #ifndef DALI_TOOLKIT_INTERNAL_TEXT_ITALIC_SPAN_IMPL_H
2 #define DALI_TOOLKIT_INTERNAL_TEXT_ITALIC_SPAN_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/italic-span.h>
26 #include <dali-toolkit/internal/text/logical-model-impl.h>
27 #include <dali-toolkit/internal/text/spannable/spans/base-span-impl.h>
38 using ItalicSpanPtr = IntrusivePtr<ItalicSpan>;
41 * @copydoc Dali::Toolkit::Text::ItalicSpan
43 class ItalicSpan : public BaseSpan
47 * @brief Creates a new ItalicSpan object.
49 static Dali::Toolkit::Text::ItalicSpan New();
56 ///< Deleted copy constructor
57 ItalicSpan(const ItalicSpan&) = delete;
59 ///< Deleted move constructor
60 ItalicSpan(ItalicSpan&&) = delete;
62 ///< Deleted copy assignment operator
63 ItalicSpan& operator=(const ItalicSpan&) = delete;
65 ///< Deleted move assignment operator
66 ItalicSpan& operator=(ItalicSpan&&) = delete;
71 * A reference counted object may only be deleted by calling Unreference().
73 ~ItalicSpan() override;
75 //Methods for internal only
77 * @copydoc Dali::Toolkit::Text::BaseSpan::CreateStyleCharacterRun
79 void CreateStyleCharacterRun(IntrusivePtr<LogicalModel>& logicalModel, const Dali::Toolkit::Text::Range& range) const override;
81 }; // class ItalicSpan
83 } // namespace Internal
85 // Helpers for public-api forwarding methods
87 inline Internal::ItalicSpan& GetImplementation(Dali::Toolkit::Text::ItalicSpan& italicSpan)
89 DALI_ASSERT_ALWAYS(italicSpan && "italicSpan handle is empty");
91 BaseObject& object = italicSpan.GetBaseObject();
93 return static_cast<Internal::ItalicSpan&>(object);
96 inline const Internal::ItalicSpan& GetImplementation(const Dali::Toolkit::Text::ItalicSpan& italicSpan)
98 DALI_ASSERT_ALWAYS(italicSpan && "italicSpan handle is empty");
100 const BaseObject& object = italicSpan.GetBaseObject();
102 return static_cast<const Internal::ItalicSpan&>(object);
107 } // namespace Toolkit
112 #endif // DALI_TOOLKIT_INTERNAL_TEXT_ITALIC_SPAN_IMPL_H